private void editRunOptionsButton_Click(object sender, EventArgs e) { EditRunOptionsBase editOptionsPopup = new EditRunOptionsBase( ); editOptionsPopup.ShowDialog( ); runOptions = new RunOptions( ); runOptions.DeserializeRunOptions( ); testRunnerRunOptionsDictionary = runOptions.runOptionsDictionary; runOptions.DeserializeRunOptionsBrowserList( ); testRunnerBrowserList = runOptions.browserList; if (testRunnerBrowserList != null) { loadDataHandler.PopulateBrowserDropdowns(new List <ComboBox>( ) { runBrowserSelector }, testRunnerBrowserList); } if (testRunnerRunOptionsDictionary != null) { loadDataHandler.SetDefaultBrowser(runBrowserSelector, testRunnerRunOptionsDictionary); loadDataHandler.SetMaxAndDefaultValueForWorkerInput(workersNumberSetterInput, testRunnerRunOptionsDictionary); } }
public EditRunOptionsBase( ) { InitializeComponent( ); closeButton.MouseEnter += buttonControls.controlButtons_MouseEnter; closeButton.MouseLeave += buttonControls.controlButtons_MouseLeave; saveSettingsButton.MouseEnter += buttonControls.controlButtons_MouseEnter; saveSettingsButton.MouseLeave += buttonControls.controlButtons_MouseLeave; helpButton.MouseEnter += buttonControls.controlButtons_MouseEnter; helpButton.MouseLeave += buttonControls.controlButtons_MouseLeave; RunOptions editFormRunOptions = new RunOptions( ); editFormRunOptions.DeserializeRunOptions( ); editFormRunOptions.DeserializeRunOptionsBrowserList( ); if (editFormRunOptions.runOptionsDictionary != null) { editFormRunOptionsDictionary = editFormRunOptions.runOptionsDictionary; } if (editFormRunOptions.browserList != null) { editFormBrowserList = editFormRunOptions.browserList; } tabButtonForeColorDictionary = new Dictionary <Button, Color>( ) { [generalSettingsButton] = generalSettingsButton.ForeColor, [reportOptionsButton] = reportOptionsButton.ForeColor, [browserOptionsButton] = browserOptionsButton.ForeColor, [workersOptionsButton] = workersOptionsButton.ForeColor }; tabButtonBackColorDictionary = new Dictionary <Button, Color>( ) { [generalSettingsButton] = generalSettingsButton.BackColor, [reportOptionsButton] = reportOptionsButton.BackColor, [browserOptionsButton] = browserOptionsButton.BackColor, [workersOptionsButton] = workersOptionsButton.BackColor }; }
public TestRunnerGUI( ) { loadDataHandler = new DataLoadHandlers( ); ButtonControl buttonControls = new ButtonControl(); FormControl formControls = new FormControl(); InitializeComponent( ); testSelectorDropdown.DrawItem += testSelectorDropdown_DrawItem; editDropdownButton.MouseEnter += buttonControls.controlButtons_MouseEnter; editDropdownButton.MouseLeave += buttonControls.controlButtons_MouseLeave; editRunOptionsButton.MouseEnter += buttonControls.controlButtons_MouseEnter; editRunOptionsButton.MouseLeave += buttonControls.controlButtons_MouseLeave; setCurrentTest.MouseEnter += buttonControls.controlButtons_MouseEnter; setCurrentTest.MouseLeave += buttonControls.controlButtons_MouseLeave; selectTestExecutableFromFileExplorer.MouseEnter += buttonControls.controlButtons_MouseEnter; selectTestExecutableFromFileExplorer.MouseLeave += buttonControls.controlButtons_MouseLeave; runTestButton.MouseEnter += buttonControls.controlButtons_MouseEnter; runTestButton.MouseLeave += buttonControls.controlButtons_MouseLeave; closeButton.MouseEnter += buttonControls.controlButtons_MouseEnter; closeButton.MouseLeave += buttonControls.controlButtons_MouseLeave; minimizeButton.MouseEnter += buttonControls.controlButtons_MouseEnter; minimizeButton.MouseLeave += buttonControls.controlButtons_MouseLeave; helpButton.MouseEnter += buttonControls.controlButtons_MouseEnter; helpButton.MouseLeave += buttonControls.controlButtons_MouseLeave; this.MouseDown += formControls.form_MouseDown; this.MouseMove += formControls.form_MouseMove; this.MouseUp += formControls.form_MouseUp; testList = new TestList(testListNamePath); testList.DeserializeTestDictionary( ); foreach (KeyValuePair <string, string> currentDictionaryItem in testList.testListNamePath) { testListNamePath.Add(currentDictionaryItem.Key, currentDictionaryItem.Value); } loadDataHandler.LoadInTestListToDropdown(testSelectorDropdown, testListNamePath); runOptions = new RunOptions( ); runOptions.DeserializeRunOptions( ); testRunnerRunOptionsDictionary = runOptions.runOptionsDictionary; runOptions.DeserializeRunOptionsBrowserList( ); testRunnerBrowserList = runOptions.browserList; if (testRunnerBrowserList != null) { loadDataHandler.PopulateBrowserDropdowns(new List <ComboBox>( ) { runBrowserSelector }, testRunnerBrowserList); } if (testRunnerRunOptionsDictionary != null) { loadDataHandler.SetDefaultBrowser(runBrowserSelector, testRunnerRunOptionsDictionary); loadDataHandler.SetMaxAndDefaultValueForWorkerInput(workersNumberSetterInput, testRunnerRunOptionsDictionary); } LinkTestListBuildable linkTestListBuildable = new LinkTestListBuildable( ); linkTestListBuildable.DeserializeTestDictionary( ); testLinkedToBuildableDictionary = linkTestListBuildable.testNameBuildableDictionary; }