private void RestoreVisualState() { if (loader != null) { string fileName = VisualState.GetVisualStateFileName(loader.TestFileName); if (File.Exists(fileName)) { VisualState.LoadFrom(fileName).Restore(this); } } }
private void OnTestUnloaded(object sender, TestEventArgs e) { ClosePropertiesDialog(); if (Services.UserSettings.GetSetting("Gui.TestTree.SaveVisualState", true) && loader != null) { try { new VisualState(this).Save(VisualState.GetVisualStateFileName(loader.TestFileName)); } catch (Exception ex) { Debug.WriteLine("Unable to save visual state."); Debug.WriteLine(ex); } } Clear(); explicitlySelectedNode = null; runCommandEnabled = false; }