Ejemplo n.º 1
0
        private void SystaffBlazorApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (System.Diagnostics.Debugger.IsAttached)
            {
                e.Updater.Update();
                e.Handled = true;
            }
            else
            {
                e.Updater.Update();
                e.Handled = true;
                //string message = "The application cannot connect to the specified database, " +
                //    "because the database doesn't exist, its version is older " +
                //    "than that of the application or its schema does not match " +
                //    "the ORM data model structure. To avoid this error, use one " +
                //    "of the solutions from the https://www.devexpress.com/kb=T367835 KB Article.";

                //if(e.CompatibilityError != null && e.CompatibilityError.Exception != null) {
                //    message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
                //}
                //throw new InvalidOperationException(message);
            }
#endif
        }
Ejemplo n.º 2
0
        void XVideoRentalWindowsFormsApplication_DatabaseVersionMismatch(object sender,
                                                                         DatabaseVersionMismatchEventArgs e) {
            
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (this.DropDatabaseOnVersionMissmatch() > 0)
                Application.ExitThread();
            if (Debugger.IsAttached) {
                e.Updater.Update();
                e.Handled = true;
            }
            else {
                throw new InvalidOperationException(
                    "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
                    "This error occurred  because the automatic database update was disabled when the application was started without debugging.\r\n" +
                    "To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the " +
                    "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
                    "or manually create a database using the 'DBUpdater' tool.\r\n" +
                    "Anyway, refer to the 'Update Application and Database Versions' help topic at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument2795.htm " +
                    "for more detailed information. If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/");
            }
#endif
        }
Ejemplo n.º 3
0
        void ApplicationOnDatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs databaseVersionMismatchEventArgs)
        {
            var xafApplication = ((XafApplication)sender);

            xafApplication.DatabaseVersionMismatch -= ApplicationOnDatabaseVersionMismatch;
            xafApplication.StatusUpdating          += XafApplicationOnStatusUpdating;
        }
Ejemplo n.º 4
0
        protected override void OnDatabaseVersionMismatch(DatabaseVersionMismatchEventArgs args)
        {
#if EASYTEST
            args.Updater.Update();
            args.Handled = true;
#else
            if (System.Diagnostics.Debugger.IsAttached)
            {
                args.Updater.Update();
                args.Handled = true;
            }
            else
            {
                throw new InvalidOperationException(
                    "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
                    "This error occurred  because the automatic database update was disabled when the application was started without debugging.\r\n" +
                    "To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the " +
                    "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
                    "or manually create a database using the 'DBUpdater' tool.\r\n" +
                    "Anyway, refer to the 'Update Application and Database Versions' help topic at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument2795.htm " +
                    "for more detailed information. If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/");
            }
#endif

            base.OnDatabaseVersionMismatch(args);
        }
Ejemplo n.º 5
0
 protected override void OnDatabaseVersionMismatch(DatabaseVersionMismatchEventArgs args)
 {
     _ = args ?? throw new ArgumentNullException(nameof(args));
     args.Updater.Update();
     args.Handled = true;
     base.OnDatabaseVersionMismatch(args);
 }
Ejemplo n.º 6
0
        private void ValidationTesterAspNetApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e) {
#if EASYTEST
			e.Updater.Update();
			e.Handled = true;
#else
            e.Updater.Update();
            e.Handled = true;
            if (Debugger.IsAttached) {
                e.Updater.Update();
                e.Handled = true;
            } else {
                string message = "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
                    "This error occurred  because the automatic database update was disabled when the application was started without debugging.\r\n" +
                    "To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the " +
                    "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
                    "or manually create a database using the 'DBUpdater' tool.\r\n" +
                    "Anyway, refer to the following help topics for more detailed information:\r\n" +
                    "'Update Application and Database Versions' at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument2795.htm\r\n" +
                    "'Database Security References' at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument3237.htm\r\n" +
                    "If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/";

                if (e.CompatibilityError != null && e.CompatibilityError.Exception != null) {
                    message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
                }
                throw new InvalidOperationException(message);
            }
#endif
        }
Ejemplo n.º 7
0
        void EmailTesterAspNetApplication_DatabaseVersionMismatch(object sender,
                                                                  DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (Debugger.IsAttached)
            {
                e.Updater.Update();
                e.Handled = true;
            }
            else
            {
                string message =
                    "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
                    "This error occurred  because the automatic database update was disabled when the application was started without debugging.\r\n" +
                    "To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the " +
                    "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
                    "or manually create a database using the 'DBUpdater' tool.\r\n" +
                    "Anyway, refer to the following help topics for more detailed information:\r\n" +
                    "'Update Application and Database Versions' at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument2795.htm\r\n" +
                    "'Database Security References' at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument3237.htm\r\n" +
                    "If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/";

                if (e.CompatibilityError != null && e.CompatibilityError.Exception != null)
                {
                    message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
                }
                throw new InvalidOperationException(message);
            }
#endif
        }
Ejemplo n.º 8
0
        void XVideoRentalWindowsFormsApplication_DatabaseVersionMismatch(object sender,
                                                                         DatabaseVersionMismatchEventArgs e)
        {
            e.Updater.Update();
            e.Handled = true;
#if EASYTEST
#else
//            if (this.DropDatabaseOnVersionMissmatch() > 0)
//                Application.ExitThread();
//            if (Debugger.IsAttached) {
//                e.Updater.Update();
//                e.Handled = true;
//            }
//            else {
//                throw new InvalidOperationException(
//                    "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
//                    "This error occurred  because the automatic database update was disabled when the application was started without debugging.\r\n" +
//                    "To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the " +
//                    "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
//                    "or manually create a database using the 'DBUpdater' tool.\r\n" +
//                    "Anyway, refer to the 'Update Application and Database Versions' help topic at http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument2795.htm " +
//                    "for more detailed information. If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/");
//            }
#endif
        }
Ejemplo n.º 9
0
        void IOTesterAspNetApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            e.Updater.Update();
            e.Handled = true;
#endif
        }
Ejemplo n.º 10
0
 private void DCSecurityDemoAspNetApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e) {
     try {
         e.Updater.Update();
         e.Handled = true;
     } catch (CompatibilityException exception) {
         if (exception.Error is CompatibilityUnableToOpenDatabaseError) {
             throw new UserFriendlyException(
             "The connection to the database failed. This demo requires the local instance of Microsoft SQL Server Express. To use another database server,\r\nopen the demo solution in Visual Studio and modify connection string in the \"app.config\" file.");
         }
     }
 }
Ejemplo n.º 11
0
        private void ReportsTesterWindowsFormsApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e) {
#if EASYTEST
			e.Updater.Update();
			e.Handled = true;
#else
            if (true) {
                e.Updater.Update();
                e.Handled = true;
            }
#endif
        }
Ejemplo n.º 12
0
        void WorldCreatorTesterWindowsFormsApplication_DatabaseVersionMismatch(object sender,
                                                                               DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (true)
            {
                e.Updater.Update();
                e.Handled = true;
            }
#endif
        }
Ejemplo n.º 13
0
        private void AspNetApplicationDatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (true)
            {
                if (this.DropDatabaseOnVersionMissmatch() > 0)
                {
                    Exit();
                }
                e.Updater.ForceUpdateDatabase = true;
                e.Updater.Update();
                e.Handled = true;
            }
#endif
        }
Ejemplo n.º 14
0
        //        protected override ShowViewStrategyBase CreateShowViewStrategy() {
        //            return new ShowInSingleWindowStrategy(this);
        //        }

        private void FeatureCenterWindowsFormsApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e) {

#if EASYTEST
			e.Updater.Update();
			e.Handled = true;
#else
            if (true) {
                if (this.DropDatabaseOnVersionMissmatch() > 0)
                    Application.ExitThread();
                e.Updater.Update();
                e.Handled = true;
            } else {
                throw new InvalidOperationException(
                    "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
                    "The automatic update is disabled, because the application was started without debugging.\r\n" +
                    "You should start the application under Visual Studio, or modify the " +
                    "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
                    "or manually create a database using the 'DBUpdater' tool.");
            }
#endif
        }
 private void MainDemoBlazorApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 16
0
 private void OnDatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 17
0
        private void ProjectManagerBlazorApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (System.Diagnostics.Debugger.IsAttached)
            {
                e.Updater.Update();  //jesli uruchamiana na linux docer wymagane dociągnięcie "docker pull mcr.microsoft.com/mssql/server:2019-latest"
                e.Handled = true;
            }
            else
            {
                string message = "The application cannot connect to the specified database, " +
                                 "because the database doesn't exist, its version is older " +
                                 "than that of the application or its schema does not match " +
                                 "the ORM data model structure. To avoid this error, use one " +
                                 "of the solutions from the https://www.devexpress.com/kb=T367835 KB Article.";

                if (e.CompatibilityError != null && e.CompatibilityError.Exception != null)
                {
                    message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
                }
                throw new InvalidOperationException(message);
            }
#endif
        }
Ejemplo n.º 18
0
 private void OnDatabaseVersionMismatch(object o, DatabaseVersionMismatchEventArgs e){
     e.Updater.Update();
 }
Ejemplo n.º 19
0
 private static void serverApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
 private void AIR_ERPAspNetApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 21
0
 private void DCSecurityDemoAspNetApplication_DatabaseVersionMismatch(object sender2, DatabaseVersionMismatchEventArgs e)
 {
     try {
         e.Updater.Update();
         e.Handled = true;
     } catch (CompatibilityException exception) {
         if (exception.Error is CompatibilityUnableToOpenDatabaseError)
         {
             throw new UserFriendlyException(
                       "The connection to the database failed. This demo requires the local instance of Microsoft SQL Server Express. To use another database server,\r\nopen the demo solution in Visual Studio and modify connection string in the \"app.config\" file.");
         }
     }
 }
Ejemplo n.º 22
0
 private void AIR_ERPAspNetApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 23
0
 private void ExcelImporterTesterAspNetApplication_DatabaseVersionMismatch(object sender,
                                                                           DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 24
0
        private void ModelArtifactStateTesterWindowsFormsApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (true)
            {
                e.Updater.Update();
                e.Handled = true;
            }
#endif
        }
Ejemplo n.º 25
0
        /// <summary>
        /// http://www.devexpress.com/Help/?document=ExpressApp/CustomDocument2795.htm 
        /// ЗДЕСЬ ПРОИСХОДИТ ОБНОВЛЕНИЕ БД !!!
        /// </summary>
        private void Application_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
            if (e.CompatibilityError is CompatibilityDatabaseIsOldError)
            { // если база есть, но другой версии

                SplashScreenStop();

                string compatibilityError = e.CompatibilityError.Message;
                System.Windows.Forms.DialogResult dialog = XtraMessageBox.Show(Strings.WinApplication_CompatibilityDatabaseIsOldWarning,
                    this.ApplicationName, System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Warning);

                if (dialog == System.Windows.Forms.DialogResult.Yes)
                {
                    this.StartSplash();

                    CreateDatabaseBackup();

                    try
                    {
                        SplashScreenSetDisplayText(Strings.SplashScreenText_Application_DatabaseUpdateBegin);

                        e.Updater.Update();
                        e.Handled = true;

                        SplashScreenSetDisplayText(Strings.SplashScreenText_Application_DatabaseUpdateEnd);

                    }
                    catch (Exception ex)
                    {
                        string UpdateError = ex.Message;

                        SplashScreenStop();

                        Config.Data.UserSettings.DBPathIsInstalled = false;
                        Config.Data.UserSettings.Save();

                        string message = String.Format("{0}\n{1}\n{2}", Strings.WinApplication_DatabaseUpdateGlobalError, compatibilityError, UpdateError);

                        ErrorManager.RaiseException(ErrorCode.Application_DatabaseUpdateFailed, message);
                    }
                }
                else
                {// если пользователь отменил обновление
                    ErrorManager.RaiseException(ErrorCode.Application_DatabaseUpdateCanceled, "");
                }

                return;

            }
            else if (e.CompatibilityError is CompatibilityUnableToOpenDatabaseError)
            { // если базы нету совсем

                string compatibilityError = e.CompatibilityError.Message;
                try
                {
                    string databaseDirectory = Path.GetDirectoryName(Config.Data.AppSettings.DatabaseFile);

                    if (Directory.Exists(databaseDirectory) == false)
                        Directory.CreateDirectory(databaseDirectory);

                    SplashScreenSetDisplayText(Strings.SplashScreenText_Application_DatabaseCreateBegin);

                    e.Updater.Update();
                    e.Handled = true;

                    CreateBuiltInObjects();

                    SplashScreenSetDisplayText(Strings.SplashScreenText_Application_DatabaseCreateEnd);

                    //this.SetUserSetting("DBPathIsInstalled", "true");
                }
                catch (Exception ex)
                {
                    string UpdateError = ex.Message;

                    SplashScreenStop();

                    Config.Data.UserSettings.DBPathIsInstalled = false;
                    Config.Data.UserSettings.Save();
                    //Config.SaveAll();

                    string message = String.Format("{0}\n{1}\n{2}", Strings.WinApplication_DatabaseCreateGlobalError, compatibilityError, UpdateError);

                    ErrorManager.RaiseException(ErrorCode.Application_DatabaseCreateFailed, message);

                }

                SplashScreenStop();

                // Показывем форму перовначальной настройки
                ShowFirstLaunchPatameters();
            }
        }
Ejemplo n.º 26
0
        private void FeatureCenterWindowsFormsApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (Debugger.IsAttached)
            {
                if (this.DropDatabaseOnVersionMissmatch() > 0)
                {
                    Application.ExitThread();
                }
                e.Updater.Update();
                e.Handled = true;
            }
            else
            {
                throw new InvalidOperationException(
                          "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
                          "The automatic update is disabled, because the application was started without debugging.\r\n" +
                          "You should start the application under Visual Studio, or modify the " +
                          "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
                          "or manually create a database using the 'DBUpdater' tool.");
            }
#endif
        }
Ejemplo n.º 27
0
 protected override void OnDatabaseVersionMismatch(DatabaseVersionMismatchEventArgs args)
 {
     args.Handled = true;
     base.OnDatabaseVersionMismatch(args);
 }
Ejemplo n.º 28
0
 void OnVersionMismatch(object sender, DatabaseVersionMismatchEventArgs args) {
     args.Updater.Update();
     args.Handled = true;
 }
Ejemplo n.º 29
0
 private void FullXCRMWebApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
 void app_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Handled = true;
 }
Ejemplo n.º 31
0
 private void XtraDashboardTesterAspNetApplication_DatabaseVersionMismatch(object sender,
                                                                           DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 32
0
        private void ModuleNameWindowsFormsApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if (UseEasyTest)
//-:cnd:noEmit
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
            return;
#endif
//+:cnd:noEmit
#endif
//-:cnd:noEmit
#if DEBUG
//+:cnd:noEmit
            e.Updater.Update();
            e.Handled = true;
//-:cnd:noEmit
#endif
//+:cnd:noEmit
//-:cnd:noEmit
#if RELEASE
//+:cnd:noEmit
            var message = "The application cannot connect to the specified database, " +
                          "because the database doesn't exist, its version is older " +
                          "than that of the application or its schema does not match " +
                          "the ORM data model structure. To avoid this error, use one " +
                          "of the solutions from the https://www.devexpress.com/kb=T367835 KB Article.";

            if (e.CompatibilityError != null && e.CompatibilityError.Exception != null)
            {
                message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
            }
            throw new InvalidOperationException(message);
//-:cnd:noEmit
#endif
//+:cnd:noEmit
        }
Ejemplo n.º 33
0
		private void EFDemoWebApplication_DatabaseVersionMismatch(Object sender, DatabaseVersionMismatchEventArgs e) {
			e.Updater.Update();
			e.Handled = true;
		}
Ejemplo n.º 34
0
 protected override void OnDatabaseVersionMismatch(DatabaseVersionMismatchEventArgs args) {
     args.Updater.Update();
     args.Handled = true;
 }
Ejemplo n.º 35
0
        private void FMWindowsFormsApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
        {
#if EASYTEST
            e.Updater.Update();
            e.Handled = true;
#else
            if (Debugger.IsAttached)
            {
                e.Updater.Update();
                e.Handled = true;
            }
            else
            {
                throw new InvalidOperationException(
                          "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.\r\n" +
                          "This error occurred  because the automatic database update was disabled when the application was started without debugging.\r\n" +
                          "To avoid this error, you should either start the application under Visual Studio in debug mode, or modify the " +
                          "source code of the 'DatabaseVersionMismatch' event handler to enable automatic database update, " +
                          "or manually create a database using the 'DBUpdater' tool.\r\n" +
                          "Anyway, refer to the 'Update Application and Database Versions' help topic at http://help.devexpress.com/#Xaf/CustomDocument2795 " +
                          "for more detailed information. If this doesn't help, please contact our Support Team at http://www.devexpress.com/Support/Center/");
            }
#endif
        }
Ejemplo n.º 36
0
 void SecuritySystemExampleWindowsFormsApplication_DatabaseVersionMismatch(object sender,
                                                                           DatabaseVersionMismatchEventArgs e)
 {
     throw new InvalidOperationException(
               "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.");
 }
Ejemplo n.º 37
0
 void OnVersionMismatch(object sender, DatabaseVersionMismatchEventArgs args)
 {
     args.Updater.Update();
     args.Handled = true;
 }
Ejemplo n.º 38
0
 private void WorkflowTesterWindowsFormsApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 39
0
 void SecuritySystemExampleWindowsFormsApplication_DatabaseVersionMismatch(object sender,
                                                                           DatabaseVersionMismatchEventArgs e) {
     throw new InvalidOperationException(
         "The application cannot connect to the specified database, because the latter doesn't exist or its version is older than that of the application.");
 }
Ejemplo n.º 40
0
 protected override void OnDatabaseVersionMismatch(DatabaseVersionMismatchEventArgs args)
 {
     args.Updater.Update();
     args.Handled = true;
 }
Ejemplo n.º 41
0
 private void EFDemoWinApplication_DatabaseVersionMismatch(Object sender, DatabaseVersionMismatchEventArgs e)
 {
     e.Updater.Update();
     e.Handled = true;
 }
Ejemplo n.º 42
0
        //protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
        //{
        //    args.ObjectSpaceProvider = new XPObjectSpaceProvider(args.ConnectionString, args.Connection);
        //}

        //public override Window MainWindow
        //{
        //    get
        //    {
        //        return mainWindow;
        //    }
        //}

        //public void CreateMainWindow()
        //{
        //    mainWindow = base.CreateWindow(TemplateContext.ApplicationWindow, null, true, true);
        //}

        protected override void OnDatabaseVersionMismatch(DatabaseVersionMismatchEventArgs e)
        {
            base.OnDatabaseVersionMismatch(e);
            e.Updater.Update();
            e.Handled = true;
        }