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(); }
internal TestHarnessSettings(TestHarnessModel testHarness) : base(IsolatedStorageType.Application, "~~-TestHarness.Settings-~~") { this.testHarness = testHarness; PropertyExplorer = new PropertyExplorerSettings(); ControlDisplayOptionSettings = new ControlDisplayOptionSettings(); }