예제 #1
0
        public static GlobalOptionsDialog New()
        {
            GlobalOptionsDialog globalOptionsDialog = new GlobalOptionsDialog(Program.TheForm);

            globalOptionsDialog.InitializeControlsFromPreferences();
            return(globalOptionsDialog);
        }
예제 #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();
         }
     }
 }