protected override void Configure() { try { SetupDb(); // Check and update modules var updateModules = Properties.Settings.Default.UpdateModules; FrameworkManager.UpdateModules(updateModules); // Init admin FrameworkManager.AdminExists(true); // Clean data and files FrameworkManager.CleanFiles(); // Reload new modules FrameworkManager.ReloadModules(); // Load Settings in memory DataHelpers.PosSettings = PosSettings.getInstance(); var viewManager = this.Container.Get <ViewManager>(); var setting = new ElvaSettings().getInstance(); DataHelpers.Settings = setting; } catch (Exception s) { MessageBox.Show(s.Message); } }
public void ReloadAllModules() { try { var updateModules = Properties.Settings.Default.UpdateModules; FrameworkManager.UpdateModules(updateModules); } catch (Exception s) { SetError(s.Message); } }
protected override void OnLaunch() { try { base.OnLaunch(); FrameworkManager.CreateCulture(); // TEMP // FrameworkManager.GenerateLicence(); // FrameworkManager.CreateLicenceTrial("admin", "admin"); // FrameworkManager.CreateLicenceStandard("pos", "*****@*****.**"); // Check AppInit var setting = new ElvaSettings().getInstance(); FrameworkManager.CheckValidation(); if (setting.AppInitialized == false) { MessageBox.Show("Configuration de premiére utilisation"); // Setup modules FrameworkManager.UpdateModules(); // setup series FrameworkManager.CreateSeries(); setting.AppInitialized = true; setting.Save(); MessageBox.Show("Configuration terminée"); } } catch (Exception s) { MessageBox.Show(s.Message); } }
public void ReloadModules() { FrameworkManager.UpdateModules(true); DataHelpers.Shell.SetupSideMenu().Wait(); }
private void Worker_DoWork(object sender, DoWorkEventArgs e) { DoCheckApplicationFolders(); SetNote("startup.label.loadingdb"); StartServerDatabase(); Worker.ReportProgress(10); // SetNote("startup.label.checkingdb"); //if( EnsureServerIsRunning() == false) // { // SetError("Server Off!"); // return; // } SetNote("startup.label.loadingmodule"); LoadModulesDll(); Worker.ReportProgress(20); SetNote("startup.label.logging"); StartLogger(); SetNote("startup.label.data"); LoadTypesToDatahelper(); SetNote("startup.label.initdb"); InstallDefaultDatabase(); Worker.ReportProgress(30); SetNote("startup.label.cultures"); SetDefaultCultureOnThread(); Worker.ReportProgress(40); SetNote("startup.label.lang"); CheckDefaultLang(); Worker.ReportProgress(55); SetNote("startup.label.checkmodules"); ReloadAllModules(); var setting = ElvaSettings.getInstance(); if (setting.IsRestheatUsed) { StartServerApi(); } if (setting.AppInitialized == false) { Mode = StartupMode.ALL; } else { Mode = StartupMode.LAUNCH; } if (Mode == StartupMode.ALL) { SetNote("startup.label.init"); RestoreDatabaseDump(); Worker.ReportProgress(50); SetNote("startup.label.data"); FrameworkManager.UpdateModules(); Worker.ReportProgress(60); SetNote("startup.label.series"); InitSeries(); Worker.ReportProgress(70); // SetNote("Lancement assistant"); //Execute.PostToUIThread(() => OpenAppAssistant()); // Worker.ReportProgress(80); //Execute.OnUIThread(() => { _windowManager.ShowMessageBox("Vous devez relancer l'application aprés cette configuration"); }); } else { SetNote("startup.label.lang"); SetDefaultLang(); Worker.ReportProgress(50); } Worker.ReportProgress(60); SetNote("startup.label.checkadmin"); InstallDefaultUser(); SetNote("startup.label.data"); ReloadAllModules(); Worker.ReportProgress(60); SetNote("startup.label.temp"); CleanTempFiles(); Worker.ReportProgress(70); SetNote("startup.label.loadingmodule"); CheckForNewModules(); Worker.ReportProgress(80); LoadSettingsInDatahelpers(); Worker.ReportProgress(90); SetNote("startup.label.updates"); CheckForUpdates(); Worker.ReportProgress(95); }