Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.

WizardXpUserControl.cs

Description du code

WizardXpUserControl.cs est un fichier du projet BrolDev.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/broldev/src/.

Projet BrolDev : Librairie de composants réutilisables pour les applications BrolDev en CSharp.

Code source ou contenu du fichier

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. using be.gaudry.notsafe.XPExplorerBar;
  6.  
  7. namespace be.gaudry.view.controls
  8. {
  9. public partial class WizardXpUserControl : UserControl, IWizardUC
  10. {
  11. private List<StepControl> stepControls;
  12. private int index;
  13. public WizardXpUserControl()
  14. {
  15. stepControls = new List<StepControl>();
  16. index = 0;
  17. InitializeComponent();
  18. testOS();
  19. }
  20.  
  21. private void testOS()
  22. {
  23. switch (Environment.OSVersion.Platform)
  24. {
  25. case PlatformID.Win32NT :
  26. if (Environment.OSVersion.Version.Major == 6)
  27. {
  28. if (be.gaudry.view.style.XpStyle.IsThemeActive())
  29. {
  30. //splitContainer1.SplitterDistance = 0;
  31. splitContainer1.Panel1Collapsed = true;
  32. }
  33. }
  34. break;
  35.  
  36. }
  37. }
  38. /// <summary>
  39. /// Display current action and execute previous action if needed
  40. /// </summary>
  41. /// <param name="actionIndex">(int) new action index</param>
  42. public void displayAction(int actionIndex)
  43. {
  44. if (actionIndex >= 0 && actionIndex <= stepControls.Count)
  45. {
  46. //execute previous action if needed
  47. if (actionIndex != index)
  48. {
  49. if(stepControls[index].eventHandler!=null)
  50. stepControls[index].eventHandler(this, new EventArgs());
  51. stepControls[index].expandoBtn.Visible = true;
  52. //set new index
  53. index = actionIndex;
  54. }
  55.  
  56. //expand only curent expando
  57. this.taskPane1.CollapseAllButOne(stepControls[index].expando);
  58. stepControls[index].expandoBtn.Visible = false;
  59. //set action panel
  60. actionsPanel.Controls.Clear();
  61. actionsPanel.Controls.Add(stepControls[index].control);
  62. //check action navigation buttons
  63. enableActions();
  64. }
  65. }
  66. /// <summary>
  67. /// Add an action panel
  68. /// </summary>
  69. /// <param name="content">(String) Info to display on the right panel</param>
  70. /// <param name="title">(String) title of the action</param>
  71. /// <param name="info">(String) info about the action</param>
  72. public void addStepControl(String content, String title, String info)
  73. {
  74. //todo : place content on a InfoControl
  75. throw new Exception("The method or operation is not implemented.");
  76. }
  77. /// <summary>
  78. /// Add an action panel
  79. /// </summary>
  80. /// <param name="control">(Control) action panel (may be a usercontrol)</param>
  81. /// <param name="title">(String) title of the action</param>
  82. /// <param name="info">(String) info about the action</param>
  83. public void addStepControl(Control control, String title, String info)
  84. {
  85. addStepControl(control, null, title, info);
  86. }
  87. /// <summary>
  88. /// Add an action panel
  89. /// </summary>
  90. /// <param name="control">(Control) action panel (may be a usercontrol)</param>
  91. /// <param name="eventHandler">(EventHandler) eventHandler to execute</param>
  92. /// <param name="title">(String) title of the action</param>
  93. /// <param name="info">(String) info about the action</param>
  94. public void addStepControl(Control control, EventHandler eventHandler, String title, String info)
  95. {
  96. addStepControl(control, eventHandler, title, info, null, null);
  97. }
  98. /// <summary>
  99. /// Add an action panel
  100. /// </summary>
  101. /// <param name="control">(Control) action panel (may be a usercontrol)</param>
  102. /// <param name="eventHandler">(EventHandler) eventHandler to execute</param>
  103. /// <param name="title">(String) title of the action</param>
  104. /// <param name="info">(String) info about the action</param>
  105. /// <param name="titleImage">(Image) Image to display on the title bar</param>
  106. /// <param name="watermark">(Image) Image to display as watermak on the body of the action item</param>
  107. public void addStepControl(Control control, EventHandler eventHandler, String title, String info, Image titleImage, Image watermark)
  108. {
  109. Expando expando = new Expando();
  110. Label expandoLbl = new Label();
  111. Button expandoBtn = new Button();
  112.  
  113. //set label
  114. expandoLbl.Dock = DockStyle.Top;
  115. expandoLbl.AutoSize = true;
  116. expandoLbl.MaximumSize = new System.Drawing.Size(200, 0);
  117. expandoLbl.Text = info;
  118.  
  119.  
  120. //set button
  121. //expandoBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
  122. expandoBtn.Text = "Afficher";
  123. expandoBtn.UseVisualStyleBackColor = true;
  124. int i = stepControls.Count;
  125. expandoBtn.Click += delegate
  126. {
  127. displayAction(i);
  128. };
  129.  
  130.  
  131.  
  132. /*((System.ComponentModel.ISupportInitialize)(this.taskPane1)).BeginInit();
  133.   this.taskPane1.SuspendLayout();
  134.   ((System.ComponentModel.ISupportInitialize)(expando)).BeginInit();
  135.   expando.SuspendLayout();*/
  136.  
  137. //set expando
  138. this.taskPane1.Expandos.Add(expando);
  139. expando.AutoLayout = true;
  140. expando.Collapsed = true;
  141. if (titleImage != null)
  142. expando.TitleImage = titleImage;
  143. if (watermark != null)
  144. expando.Watermark = watermark;
  145. expando.Items.Add(expandoLbl);
  146.  
  147. expando.Items.Add(expandoBtn);
  148. expando.Text = title;
  149.  
  150. /*this.taskPane1.ResumeLayout(false);
  151.   ((System.ComponentModel.ISupportInitialize)(expando)).EndInit();
  152.   expando.ResumeLayout(false);
  153.   ((System.ComponentModel.ISupportInitialize)(this.taskPane1)).EndInit();
  154.   this.taskPane1.ResumeLayout(false);*/
  155.  
  156. control.Dock = DockStyle.Fill;
  157. if (control is UserControl)
  158. ((UserControl)control).AutoScroll = true;
  159. stepControls.Add(new StepControl(control, eventHandler, expando, expandoBtn));
  160. }
  161.  
  162. private void actNextBtn_Click(object sender, EventArgs e)
  163. {
  164. displayAction(index+1);
  165. }
  166.  
  167. private void actPrevBtn_Click(object sender, EventArgs e)
  168. {
  169. displayAction(index-1);
  170. }
  171.  
  172. private void enableActions()
  173. {
  174. actPrevBtn.Enabled = (index > 0);
  175. actNextBtn.Enabled = (index < stepControls.Count-1);
  176. }
  177.  
  178. protected class StepControl
  179. {
  180. public Control control;
  181. public EventHandler eventHandler;
  182. public Expando expando;
  183. public Button expandoBtn;
  184.  
  185. public StepControl(Control control, EventHandler eventHandler, Expando expando, Button expandoBtn)
  186. {
  187. this.control = control;
  188. this.eventHandler = eventHandler;
  189. this.expando = expando;
  190. this.expandoBtn = expandoBtn;
  191. }
  192. }
  193.  
  194. private void WizardUserControl_Load(object sender, EventArgs e)
  195. {
  196. this.ParentForm.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ParentForm_FormClosing);
  197.  
  198. }
  199.  
  200. private void ParentForm_FormClosing(object sender, FormClosingEventArgs e)
  201. {
  202. //execute modifications if needed
  203. if(stepControls[index].eventHandler!=null)
  204. stepControls[index].eventHandler(this, new EventArgs());
  205. }
  206. }
  207. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/controls/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1714373816 29/04/2024 08:56:56
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/view/controls/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csToolBarHomeControl.Designer.cs7.41 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csWizardUserControl.Designer.cs6.79 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csHeaderPanel.Designer.cs1.19 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csDGVLayoutOptionsControl.cs7.55 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csXPGroupBox.cs15.83 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csWizardXpUserControl.Designer.cs7.85 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csToolBarHomeControl.cs2.32 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csVersionControl.Designer.cs4.09 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csWizardUserControl.cs2.01 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .resx|.resxWizardXpUserControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csBrolBoxUserControl.Designer.cs5.92 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxChartControl.resx6.58 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csHeaderPanel.cs35.93 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csIWizardUC.cs2.35 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxAboutUserControl.resx5.68 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csTextBoxDragDrop.cs8.59 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csSystemInfoControl.cs5.46 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxXPGroupBox.resx17.7 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csHeaderPanelNativeMethods.cs21.09 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csToolBarManagerControl.cs6.99 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csTextBoxDragDrop.Designer.cs1.11 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxSystemInfoControl.resx6.22 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csSystemInfoControl.Designer.cs4.79 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxHeaderPanel.resx5.85 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csScrollablePictureBoxUserControl.cs5.55 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csBrolBoxUserControl.cs4.7 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxDGVLayoutOptionsControl.resx5.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxWizardUserControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csUpdateControl.cs7.55 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIconList.cs2.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csVersionControl.cs463 octets31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxBrolBoxUserControl.resx5.68 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csAboutUserControl.cs6.75 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxToolBarManagerControl.resx5.88 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csToolBarManagerControl.Designer.cs10.66 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIToolBarControl.cs1.07 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csWizardXpUserControl.cs8.11 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csImageCombo.cs15.49 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csAboutUserControl.Designer.cs12.31 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .resx|.resxScrollablePictureBoxUserControl.resx5.68 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csScrollablePictureBoxUserControl.Designer.cs5.64 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxVersionControl.resx5.68 Ko31/10/2018 18:33:13-refusé-
Afficher le fichier .cs|.csChartControl.Designer.cs18.45 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csUpdateControl.Designer.cs3.92 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .resx|.resxUpdateControl.resx5.68 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csChartControl.cs15.11 Ko31/10/2018 18:33:10-refusé-
Afficher le fichier .cs|.csDGVLayoutOptionsControl.Designer.cs17.39 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .cs|.csToolStrip.cs1.06 Ko31/10/2018 18:33:12-refusé-
Afficher le fichier .cs|.csIconList.Designer.cs1.1 Ko31/10/2018 18:33:11-refusé-
Afficher le fichier .resx|.resxToolBarHomeControl.resx48.51 Ko31/10/2018 18:33:12-refusé-

Utilisation de l'explorateur de code

  • Navigation :
    • Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
    • Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
    • La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
    • Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
  • Affichage :
    • Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
  • Actions :
    • Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 16/10/2009, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/cs-broldev-source-rf-view/controls/WizardXpUserControl.cs.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.