public PropertyExplorerPanelViewModel() { // Setup initial conditions. testHarnessModel = TestHarnessModel.Instance; delayedAction = new DelayedAction(0.1, OnDelayTimedOut); propertyExplorerModel = new PropertyExplorerViewModel { GetCategory = GetCategory, GetProperties = GetProperties }; // Load settings. storedSettings = testHarnessModel.Settings.PropertyExplorer; SelectedDataOption = storedSettings.ReadPropertyDataFrom; propertyExplorerModel.IncludeHierarchy = storedSettings.IncludeHierarchy; // Wire up events. testHarnessModel.PropertyChanged += (sender, e) => { if (e.PropertyName == TestHarnessModel.PropCurrentClass) OnCurrentClassChanged(); }; propertyExplorerModel.PropertyChanged += (sender, e) => { if (e.PropertyName == PropertyExplorerViewModel.PropSelectedObject) OnPropertyChanged(PropSelectedObject); if (e.PropertyName == PropertyExplorerViewModel.PropIncludeHierarchy) { storedSettings.IncludeHierarchy = propertyExplorerModel.IncludeHierarchy; SaveSettings(); } }; }
internal TestHarnessSettings(TestHarnessModel testHarness) { settings = IsolatedStorageSettings.ApplicationSettings; // Setup initial conditions. this.testHarness = testHarness; PropertyExplorer = new PropertyExplorerSettings(); ControlDisplayOptionSettings = new ControlDisplayOptionSettings(); }
public ModuleLoader(TestHarnessModel testHarness) { // Store values. this.testHarness = testHarness; // Wire up events. testHarness.Settings.Cleared += delegate { AddModules(); }; settingsoObserver = new PropertyObserver<TestHarnessSettings>(testHarness.Settings) .RegisterHandler(m => m.RecentSelections, () => LoadRecentSelectionsModule(RecentSelectionsModule)); }
public SelectorPanelViewModel(RootViewModel parent) { // Setup initial conditions. this.parent = parent; model = TestHarnessModel.Instance; modules = new ObservableCollectionWrapper<ViewTestClassesModule, ModuleNodeViewModel>(model.Modules, item => new ModuleNodeViewModel(item)); Strings = new StringLibrary(); // Create commands. AddAssemblyCommand = new DelegateCommand<Button>(param => OnAddAssemblyClick()); AutoRunTestsCommand = new DelegateCommand<Button>(param => OnAutoRunTestsClick()); RunUnitTests = new DelegateCommand<Button>(param => OnRunUnitTests()); // Wire up events. model.PropertyChanged += (sender, e) => { if (e.PropertyName == TestHarnessModel.PropCurrentClass) UpdateTestSelectorModel(); }; }
/// <summary>Creates a new instance of the singleton (see the 'Instance' property).</summary> internal static void ResetSingleton() { Instance = new TestHarnessModel(); }
internal TestHarnessSettings(TestHarnessModel testHarness) : base(IsolatedStorageType.Application, "~~-TestHarness.Settings-~~") { this.testHarness = testHarness; PropertyExplorer = new PropertyExplorerSettings(); ControlDisplayOptionSettings = new ControlDisplayOptionSettings(); }