Exemplo n.º 1
0
 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;
         }
     }
 }
 private void menuItemBackupData_Click(object sender, EventArgs e)
 {
     FrmDatabaseSettings frmDatabaseSettings = new FrmDatabaseSettings(FrmDatabaseSettingsEnum.SqlServerSettings, false, true);
     frmDatabaseSettings.ShowDialog();
 }
Exemplo n.º 3
0
        private void _LoadDatabaseSettingsForm(FrmDatabaseSettingsEnum pFrmDatabaseSettingsEnum)
        {
            FrmDatabaseSettings databaseSettings = new FrmDatabaseSettings(pFrmDatabaseSettingsEnum,true,false);
            databaseSettings.ShowDialog();

            CheckConfiguration(true);
        }