Exemplo n.º 1
0
        public static GlobalOptionsDialog New()
        {
            GlobalOptionsDialog globalOptionsDialog = new GlobalOptionsDialog(Program.TheForm);

            globalOptionsDialog.InitializeControlsFromPreferences();
            return(globalOptionsDialog);
        }
Exemplo n.º 2
0
 public static void ShowGlobalOptionsDialog()
 {
     using (GlobalOptionsDialog globalOptionsDialog = GlobalOptionsDialog.New())
     {
         if (globalOptionsDialog.ShowDialog() == DialogResult.OK)
         {
             globalOptionsDialog.UpdatePreferences();
             Program.Preferences.NeedToSave = true;
             Program.Preferences.Save();
             Program.TheForm.LockWindowSize();
             Program.TheForm.SetMainMenuVisibility();
             ServerTree.Instance.UpdateColors();
             ServerTree.Instance.SortAllNodes();
             ServerTree.Instance.OnGroupChanged(ServerTree.Instance.RootNode, ChangeType.PropertyChanged);
             Program.TheForm.UpdateAutoSaveTimer();
         }
     }
 }