private void ShowDbExplorer() { _dbe = DbExplorerForm.Instance(this); _dbe.WindowState = FormWindowState.Normal; _dbe.Show(); _dbe.BringToFront(); }
private void FBXpertMainForm_Load(object sender, EventArgs e) { // LanguageClass.Instance().InitEmbedded(this,"FBXpert.Languages","Language","de"); LanguageClass.Instance().InitFile(this, $@"{Application.StartupPath}\Languages\", "Language", ".", "de"); LanguageClass.Instance().OnRaiseLanguageExceptionHandler += FbXpertMainForm_OnRaiseLanguageExceptionHandler; LanguageClass.Instance().ChangeLanguage(LanguageClass.German); Text = $@"FBXpert V {Assembly.GetAssembly(GetType()).GetName().Version}"; Application.DoEvents(); var cf = FBXInfo.Instance(); cf.MdiParent = this; cf.Show(); _dbe = DbExplorerForm.Instance(this); if (_dbe.ReadDatabaseDefinition()) { Application.DoEvents(); NotifiesClass.Instance().InfoThreshold = eInfoLevel.normal; _dbe.SetCaption(); _dbe.Show(); _dbe.Enabled = false; _dbe.MakeDatabaseTree(false); _dbe.OpenActiveDatabases(); if (NotificationsForm.Instance().Visible) { NotificationsForm.Instance().Close(); } NotifiesClass.Instance().InfoThreshold = eInfoLevel.few; } DbExplorerForm.Instance().Enabled = true; LanguageClass.Instance().ChangeLanguage(LanguageClass.German); }
private void FBXpertMainForm_Load(object sender, EventArgs e) { // LanguageClass.Instance.InitEmbedded(this,"FBXpert.Languages","Language","de"); ProgramAttributes.Instance.Init(System.Reflection.Assembly.GetExecutingAssembly()); LanguageClass.Instance.InitFile(this.GetType().Assembly, $@"{ApplicationPathClass.Instance.ApplicationPath}\Languages\", "Language", ".", "de"); LanguageClass.Instance.OnRaiseLanguageExceptionHandler += FbXpertMainForm_OnRaiseLanguageExceptionHandler; LanguageClass.Instance.ChangeLanguage(LanguageConsts.Deutsch); string test = LanguageClass.Instance.GetString("test"); this.Text = $@"{ProgramAttributes.Instance.GetAppName()} V {ProgramAttributes.Instance.GetAppVersion()}"; Application.DoEvents(); FBXInfo.Instance.MdiParent = this; FBXInfo.Instance.Show(); _dbe = DbExplorerForm.Instance(this); string pf = $@"{AppSettingsClass.Instance.PathSettings.DatabasesConfigPath}\{AppSettingsClass.Instance.PathSettings.DatabaseConfigFile}"; bool dz = DatabaseDefinitions.Instance.Deserialize(pf); SetLastLoadedDefinition(pf); if (dz) { Application.DoEvents(); NotifiesClass.Instance.InfoGranularity = eMessageGranularity.normal; _dbe.SetCaption(); _dbe.Show(); _dbe.Enabled = false; _dbe.MakeDatabaseTree(false); int n = DatabaseDefinitions.Instance.CountToOpen(); if (n > AppSettingsClass.Instance.DatabaseSettings.OpenDatabaseCount) { object[] p = { n, Environment.NewLine }; if (SEMessageBox.ShowMDIDialog(FbXpertMainForm.Instance(), "OpenDatabases", "DoYouWantOpenDatabases", FormStartPosition.CenterScreen, SEMessageBoxButtons.NoYes, SEMessageBoxIcon.Exclamation, null, p) == SEDialogResult.Yes) { _dbe.OpenActiveDatabases(); } else { DatabaseDefinitions.Instance.DataState = EditStateClass.eDataState.UnSaved; DatabaseDefinitions.Instance.MarkDatabasesActiv(false); } } else { _dbe.OpenActiveDatabases(); } if (NotificationsForm.Instance().Visible) { NotificationsForm.Instance().Close(); } NotifiesClass.Instance.InfoGranularity = eMessageGranularity.few; } DbExplorerForm.Instance().Enabled = true; LanguageClass.Instance.ChangeLanguage(LanguageConsts.Deutsch); SEHotSpot.Controller.Instance.NewKeyboardHooks(this); DbExplorerForm.Instance().Select(); }