private void OnTestSuitesSelectionChanged(object sender, EventArgs e) { if (_mainForm == null || _isInitialising || _optionSettings == null) { return; } var selectedItem = cboTestSuites.SelectedItem as ComboBoxItem; if (selectedItem == null || selectedItem.Tag == null) { return; } var testSuite = selectedItem.Tag as SvgTestSuite; if (testSuite == null) { return; } string localSuitePath = testSuite.LocalSuitePath; if (OptionSettings.IsTestSuiteAvailable(localSuitePath) == false) { PromptDialog dlg = new PromptDialog(); dlg.Owner = _mainForm; dlg.OptionSettings = _optionSettings; var dialogResult = dlg.ShowDialog(); if (dialogResult == DialogResult.Cancel) { return; } } _isInitialising = true; txtSvgSuitePath.Text = _optionSettings.GetPath(testSuite.LocalSuitePath); txtSvgSuitePathWeb.Text = testSuite.WebSuitePath; _optionSettings.LocalSuitePath = testSuite.LocalSuitePath; _optionSettings.WebSuitePath = testSuite.WebSuitePath; testSuite.SetSelected(_optionSettings.TestSuites); _isGeneralModified = true; _isInitialising = false; }
private void OnSvgSuitePathTextChanged(object sender, EventArgs e) { string selectePath = txtSvgSuitePath.Text; if (selectePath != null) { selectePath = selectePath.Trim(); } if (string.IsNullOrWhiteSpace(selectePath) || !Directory.Exists(selectePath)) { btnPathLocate.Enabled = false; return; } btnPathLocate.Enabled = true; if (OptionSettings.IsTestSuiteAvailable(selectePath)) { _isGeneralModified = true; _optionSettings.LocalSuitePath = selectePath; } }