/// <summary> /// Constructor. /// </summary> /// <param name="userConfigurableFileGroup">The FileGroup instance this user control operates on.</param> public FileGroupConfiguratorUserControl(UserConfigurableFileGroup userConfigurableFileGroup) { this.userConfigurableFileGroup = userConfigurableFileGroup; InitializeComponent(); this.labelDescription.Text = userConfigurableFileGroup.Description; this.labelWildCards.Text = ""; for (int index = 0; index < userConfigurableFileGroup.Wildcards.Count; index++) { if (index == 0) { this.labelWildCards.Text += userConfigurableFileGroup.Wildcards[index]; } else { this.labelWildCards.Text += ", " + userConfigurableFileGroup.Wildcards[index]; } } this.groupBoxCurrentApplicationRun.Text = "Do the following with these files stored during the last run of the " + this.userConfigurableFileGroup.FileGroups.ApplicationName; this.groupBoxPreviousApplicationRuns.Text = "Do the following with these files stored during the previous runs of the " + this.userConfigurableFileGroup.FileGroups.ApplicationName; CopySettingsFromUserConfigurableFileGroup(); }
/// <summary> /// Create a new tab page for the tab control. /// </summary> /// <param name="userConfigurableFileGroup">The FileGroup instance to create a new tab page for.</param> /// <returns></returns> private TabPage CreateTabPage(UserConfigurableFileGroup userConfigurableFileGroup) { // // Create new fileGroupConfiguratorUserControl instance. // FileGroupConfiguratorUserControl fileGroupConfiguratorUserControl = new FileGroupConfiguratorUserControl(userConfigurableFileGroup); fileGroupConfiguratorUserControl.Dock = System.Windows.Forms.DockStyle.Fill; fileGroupConfiguratorUserControls.Add(fileGroupConfiguratorUserControl); // // Create new tab page containing the newly created FileGroup instance. // TabPage tabPage = new TabPage(); tabPage.Text = userConfigurableFileGroup.Name; tabPage.Controls.Add(fileGroupConfiguratorUserControl); return(tabPage); }
/// <summary> /// Create a new tab page for the tab control. /// </summary> /// <param name="userConfigurableFileGroup">The FileGroup instance to create a new tab page for.</param> /// <returns></returns> private TabPage CreateTabPage(UserConfigurableFileGroup userConfigurableFileGroup) { // // Create new fileGroupConfiguratorUserControl instance. // FileGroupConfiguratorUserControl fileGroupConfiguratorUserControl = new FileGroupConfiguratorUserControl(userConfigurableFileGroup); fileGroupConfiguratorUserControl.Dock = System.Windows.Forms.DockStyle.Fill; fileGroupConfiguratorUserControls.Add(fileGroupConfiguratorUserControl); // // Create new tab page containing the newly created FileGroup instance. // TabPage tabPage = new TabPage(); tabPage.Text = userConfigurableFileGroup.Name; tabPage.Controls.Add(fileGroupConfiguratorUserControl); return (tabPage); }