Пример #1
0
        public void CreateOrFocusTestResultTab(TestResult testResult)
        {
            // Names cannot have spaces in
            string tabName = testResult.Name.Replace(" ", "") + "Tab";
            TestResultTabViewModel tabItem = null;

            if (Tabs.Any(x => x.Name == tabName))
            {
                // Tab already exists so select it and then exit - no need to create a new one
                tabItem = Tabs.First(x => x.Name == tabName);
            }
            else
            {
                tabItem = new TestResultTabViewModel(testResult);
                Tabs.Add(tabItem);
            }

            tabItem.IsSelected = true;
        }
Пример #2
0
 public void CloseTab(TestResultTabViewModel testResultViewModel)
 {
     Tabs.Remove(testResultViewModel);
 }