Exemplo n.º 1
0
 private void RestoreVisualState()
 {
     if (loader != null)
     {
         string fileName = VisualState.GetVisualStateFileName(loader.TestFileName);
         if (File.Exists(fileName))
         {
             VisualState.LoadFrom(fileName).Restore(this);
         }
     }
 }
Exemplo n.º 2
0
        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;
        }