// Completed Method void GetRemoteCapabilityBackgroundWorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Cancelled) { } else if (!remoteAvailable) { Title = "RegTesting LocalTest (Local)"; } else { Title = "RegTesting LocalTest (Local+Remote)"; string language = _localTestLogic.GetAppSetting("Language"); if (String.IsNullOrEmpty(language)) { language = ""; } string browser = _localTestLogic.GetAppSetting("Browser"); if (String.IsNullOrEmpty(browser)) { browser = ""; } SelectItems(lstBrowser, browser.Split('|'), true); SelectItems(languages, language.Split('|'), true); } }
/// <summary> /// Create and Initialize MainWindow /// </summary> public MainWindow() { InitializeComponent(); _localTestLogic = new LocalTestLogic(); lstBrowser.MouseLeftButtonUp += _SelectionChanged; lstBrowser.SelectionChanged += _SelectionChanged; languages.MouseLeftButtonUp += _SelectionChanged; languages.SelectionChanged += _SelectionChanged; string testsystem = _localTestLogic.GetAppSetting("Testsystem"); if (String.IsNullOrEmpty(testsystem)) { testsystem = "dev"; } txtTestsystem.Text = testsystem; string language = _localTestLogic.GetAppSetting("Language"); if (String.IsNullOrEmpty(language)) { language = ""; } string browser = _localTestLogic.GetAppSetting("Browser"); if (String.IsNullOrEmpty(browser)) { browser = ""; } languages.Items.Add(GetCheckBoxRow("DE")); SelectItems(languages, language.Split('|'), true); _testcases = new List <string>(); string testcaseFile = _localTestLogic.GetAppSetting("TestcaseFile"); if (!String.IsNullOrEmpty(testcaseFile)) { LoadTestcaseFile(testcaseFile); } string filterTestcases = _localTestLogic.GetAppSetting("TestcaseFilter"); txtFilter.Text = filterTestcases; AddLocalBrowserCapabilities(LocalPrefix + "firefox"); AddLocalBrowserCapabilities(LocalPrefix + "chrome"); AddLocalBrowserCapabilities(LocalPrefix + "internet explorer"); AddLocalBrowserCapabilities(LocalPrefix + "phantomjs"); SelectItems(lstBrowser, browser.Split('|'), true); AddRemoteTestingVariants(); }
private void LoadTestcaseFile(String filename) { _testcases.Clear(); try { _localTestLogic.LoadTestFile(filename); txtFile.Text = filename; _testcases.AddRange(_localTestLogic.GetTestcases()); string strTestcase = _localTestLogic.GetAppSetting("Testcase"); if (String.IsNullOrEmpty(strTestcase)) { strTestcase = ""; } UpdateTextcaseSearch(); SelectItems(lstViewTestcases, strTestcase.Split('|'), false); } catch (FileNotFoundException) { //File not found... Don't show an error. Should only occur when initially starting app and //we try to reload the last loaded file... Instead of displaying an error, just don't load anything. } catch (TypeLoadException) { //File was found, but the file doesn't contain the typesloader we need to search for testclasses UpdateTextcaseSearch(); } }