Beispiel #1
0
        void _dbConfigProcess_Exited(object sender, EventArgs e)
        {
            if (this.Dispatcher.CheckAccess())
            {
                Mouse.OverrideCursor = null;

                int exitCode = -1;

                if (_dbConfigProcess != null)
                {
                    exitCode = _dbConfigProcess.ExitCode;
                    _dbConfigProcess.Close();
                    _dbConfigProcess = null;
                }

                // will be 0 on success
                if (exitCode == 0)
                {
                    // reload DB settings
                    DBConfigSettings.Settings.Load();

                    _clientLogic.AdminCopyIndex(_copyContextId,
                                                DBConfigSettings.Settings.ProfileFolder,
                                                DBConfigSettings.Settings.ProfileName,
                                                DBConfigSettings.Settings.ConnectionString,
                                                DBConfigSettings.Settings.ProfileName,
                                                _copyContextIsActive,
                                                DBConfigSettings.Settings.IsDatabaseInCabFolder);
                }
            }
            else
            {
                this.Dispatcher.BeginInvoke(new Action <object, EventArgs>(_dbConfigProcess_Exited), sender, e);
            }
        }