Example #1
0
 private void OnSettings(object sender, EventArgs e)
 {
     try
     {
         // show option form
         OptionsFormPLMPackLib form = new OptionsFormPLMPackLib();
         DialogResult          dres = form.ShowDialog();
         if (DialogResult.OK == dres)
         {
             // need to force saving of Pic.Factory2D.Properties.Settings
             Pic.Factory2D.Control.Properties.Settings.Default.Save();
             // need to force saving of Pic.Plugin.ViewCtrl.Properties.Settings
             PluginViewCtrl.SaveSettings();
             // if need to restart application, indicate the user that the application will need to restart before exiting
             if (form.ApplicationMustRestart)
             {
                 MessageBox.Show(string.Format(Resources.ID_APPLICATIONMUSTRESTART, Application.ProductName));
                 Application.Exit();
             }
         }
     }
     catch (Exception ex)
     {
         Debug.Fail(ex.ToString());
         _log.Error(ex.ToString());
     }
 }
Example #2
0
 private void toolStripMenuItemCustomize_Click(object sender, EventArgs e)
 {
     try
     {
         // show option form
         OptionsFormPLMPackLib form = new OptionsFormPLMPackLib();
         DialogResult dres = form.ShowDialog();
         if (DialogResult.OK == dres)
         {
             // need to force saving of Pic.Factory2D.Properties.Settings
             Pic.Factory2D.Control.Properties.Settings.Default.Save();
             // need to force saving of Pic.Factory2D.Properties.Settings
             Pic.Factory2D.Control.Properties.Settings.Default.Save();
             // need to force saving of Pic.Plugin.ViewCtrl.Properties.Settings
             Pic.Plugin.ViewCtrl.Properties.Settings.Default.Save();
             // if need to restart application, indicate the user that the application will need to restart before exiting
             if (form.ApplicationMustRestart)
             {
                 MessageBox.Show(string.Format(Properties.Resources.ID_APPLICATIONMUSTRESTART, Application.ProductName));
                 Application.Exit();
             }
         }
     }
     catch (Exception ex)
     {
         Debug.Fail(ex.ToString());
         _log.Error(ex.ToString());
     }
 }