/// <summary> /// Loads the fabricator extensions from the app.config /// </summary> private void LoadExtensions() { try { StringCollection extensionList = new StringCollection(); // read the configuration file (ClickThrough.exe.config) AppCommon.ReadConfiguration(extensionList); this.extensions = new ClickThroughUIExtension[extensionList.Count]; // load all extensions for (int i = 0; i < extensionList.Count; ++i) { string extensionType = extensionList[i]; this.extensions[i] = ClickThroughUIExtension.Load(extensionType); } } catch (Exception e) { this.OnMessage(WixErrors.UnexpectedException(e.Message, e.GetType().ToString(), e.StackTrace)); if (e is NullReferenceException || e is SEHException) { throw; } } }
/// <summary> /// Shows the work page for the specified extension. /// </summary> /// <param name="sender">Control that sent the work page request.</param> /// <param name="extension">Extension to show the work page for.</param> internal void ShowWorkPage(object sender, ClickThroughUIExtension extension) { this.SuspendLayout(); this.workPage = new WorkPage(); this.workPage.Dock = DockStyle.Fill; this.workPage.Extension = extension; this.Controls.Clear(); this.Controls.Add(this.workPage); this.Controls.Add(this.statusStrip); this.ResumeLayout(true); }
/// <summary> /// Populates the welcome page with the list of extensions. /// </summary> /// <param name="extensions">Array of fabricators to display in welcome page.</param> internal void AddExtensions(ClickThroughUIExtension[] extensions) { this.SuspendLayout(); this.extensionComboBox.SuspendLayout(); this.extensionComboBox.Items.Clear(); for (int i = 0; i < extensions.Length; ++i) { Fabricator f = extensions[i].Fabricator; this.extensionComboBox.Items.Add(f.Title); } this.extensionComboBox.Tag = extensions; this.extensionComboBox.ResumeLayout(false); this.ResumeLayout(true); }
/// <summary> /// Shows the work page for the specified extension. /// </summary> /// <param name="sender">Control that sent the work page request.</param> /// <param name="extension">Extension to show the work page for.</param> internal void ShowWorkPage(object sender, ClickThroughUIExtension extension) { this.SuspendLayout(); this.workPage = new WorkPage(); this.workPage.Dock = DockStyle.Fill; this.workPage.Extension = extension; this.Controls.Clear(); this.Controls.Add(this.workPage); this.Controls.Add(this.statusStrip); this.ResumeLayout(true); this.workPage.Focus(); }
/// <summary> /// Creates a new workpage. /// </summary> public WorkPage() { this.extension = null; this.InitializeComponent(); }