コード例 #1
0
 private void menuItemAdvancedSettings_Click(object sender, System.EventArgs e)
 {
     Form form = new FrmUserSettings();
     form.ShowDialog();
     if (form.DialogResult == DialogResult.OK)
     {
         MessageBox.Show(MultiLanguageStrings.GetString(Ressource.LotrasmicMainWindowForm, "advancedSettingsChanged.Text"));
         Restart.LaunchRestarter();
     }
 }
コード例 #2
0
ファイル: AppMain.cs プロジェクト: nareshoogit/opencbs
 private static void _ParseApplicationSettings(IEnumerable<string> pArgs)
 {
     foreach (String arg in pArgs)
     {
         if (arg == PARAM_ONLINE_MODE)
             TechnicalSettings.UseOnlineMode = true;
         if (arg == PARAM_HELP)
         {
             MessageBox.Show(HELP, @"OMFS " + TechnicalSettings.SoftwareVersion, MessageBoxButtons.OK, MessageBoxIcon.Information);
             Environment.Exit(1);
         }
         else if (arg.StartsWith(PARAM_DATE))
         {
             TimeProvider.SetToday(DateTime.Parse(arg.Substring(PARAM_DATE.Length)));
         }
         else if (arg.StartsWith(PARAM_USER))
         {
             _user = arg.Substring(PARAM_USER.Length);
         }
         else if (arg.StartsWith(PARAM_PASSWORD))
         {
             _password = arg.Substring(PARAM_PASSWORD.Length);
         }
         else if (arg.StartsWith(PARAM_DATABASE))
         {
             TechnicalSettings.CheckSettings();
             ServicesProvider.GetInstance().GetDatabaseServices().SaveDatabaseDiagramsInXml(false, TechnicalSettings.DatabaseName);
             Environment.Exit(1);
         }
         else if (arg == PARAM_USER_SETTINGS)
         {
             TechnicalSettings.CheckSettings();
             Form frm = new FrmUserSettings();
             frm.ShowDialog();
             Environment.Exit(1);
         }
         else if(arg == PARAM_SETUP)
         {
             TechnicalSettings.CheckSettings();
             Form frm = new FrmDatabaseSettings(FrmDatabaseSettingsEnum.SqlServerConnection, true, true);
             frm.ShowDialog();
             Environment.Exit(1);
         }
         else if (arg == PARAM_DUMP_OBJECTS)
         {
             TechnicalSettings.CheckSettings();
             ServicesProvider.GetInstance().GetDatabaseServices().DumpObjects(TechnicalSettings.DatabaseName);
             Environment.Exit(1);
         }
         else if (arg == "--skip-schema-check")
         {
             _skipSchemaCheck = true;
         }
     }
 }