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); }
public void SetLanguageControls() { this.Text = $@"{AppName}, V{AppVersion} Copyright by {s.Company} 2019"; toolStripMenuItemWindows.Text = LanguageClass.Instance().GetString("Windows"); toolStripMenuItemLanguage.Text = LanguageClass.Instance().GetString("Language"); toolStripMenuItemCloseApplication.Text = LanguageClass.Instance().GetString("CloseApplication"); }
private FbXpertMainForm() { InitializeComponent(); NotificationsForm.Instance().Init(); NotifiesClass.Instance().Notify.OnRaiseInfoHandler += InfoRaised; NotifiesClass.Instance().Notify.OnRaiseErrorHandler += ErrorRaised; LanguageClass.Instance().OnRaiseLanguageChangedHandler += FBXpertMainForm_OnRaiseLanguageChangedHandler; NotificationsForm.Instance().SetMDIForm(this); string appfile = Application.StartupPath + "\\config\\AppSettings.json"; if (File.Exists(appfile)) { AppSettingsClass appset = fastJSON.JSON.ToObject(File.ReadAllText(appfile)) as AppSettingsClass; AppSettingsClass.Instance().Load(appset); } else { AppSettingsClass.Instance(); } NotifiesClass.Instance().InfoThreshold = eInfoLevel.normal; //(eInfoLevel) AppSettingsClass.Instance().BehavierSettings.DebugThreshold; }
public void RefreshLanguageText() { hsPageRefresh.Text = LanguageClass.Instance().GetString("REFRESH"); hsExportData.Text = LanguageClass.Instance().GetString("EXPORT"); hsCancelGettingData.Text = LanguageClass.Instance().GetString("CANCEL_READING"); hsCancelExport.Text = LanguageClass.Instance().GetString("CANCEL_READING"); hsSaveSQL.Text = LanguageClass.Instance().GetString("SAVE_SQL"); hsLoadSQL.Text = LanguageClass.Instance().GetString("LOAD_SQL"); hsRunStatement.Text = LanguageClass.Instance().GetString("EXECUTE_SQL"); hsRefreshExportData.Text = LanguageClass.Instance().GetString("REFRESH"); rbINSERT.Text = LanguageClass.Instance().GetString("INSERT"); rbUPDATE.Text = LanguageClass.Instance().GetString("UPDATE"); rbINSERTUPDATE.Text = LanguageClass.Instance().GetString("INSERT_UPDATE"); tabPageFIELDS.Text = LanguageClass.Instance().GetString("FIELDS"); tabPageDATA.Text = LanguageClass.Instance().GetString("DATA"); tabPageDependenciesTo.Text = LanguageClass.Instance().GetString("DEPENDENCIES_TO"); tabPageExport.Text = LanguageClass.Instance().GetString("EXPORT_DATA"); tabPageMessages.Text = LanguageClass.Instance().GetString("MESSAGES"); gbMaxRows.Text = LanguageClass.Instance().GetString("MAX_ROWS"); cbExportToScreen.Text = LanguageClass.Instance().GetString("EXPORT_TO_SCREEN"); cbExportToFile.Text = LanguageClass.Instance().GetString("EXPORT_TO_FILE"); gbExportFile.Text = LanguageClass.Instance().GetString("FILE"); gbInsertUpdate.Text = LanguageClass.Instance().GetString("INSERT_UPDATE_TYPE"); }
private void hsSaveSourceCodes_Click(object sender, EventArgs e) { var items = selDBObjects.CheckedItemDatas; pbExport.Minimum = 0; pbExport.Value = 0; pbExport.Maximum = items.Count; if (ckDeleteOldSourceFiles.Checked) { string[] files = Directory.GetFiles(txtSourceCodePath.Text); foreach (string file in files) { try { File.Delete($@"{file}"); } catch (Exception ex) { } } } var gsource = MakeGlobalCode(); try { var fi = new FileInfo(txtSourceCodePath.Text + "\\DBGlobalFunctionsClass.cs"); if (fi.Directory != null && fi.Directory.Exists) { File.WriteAllText(txtSourceCodePath.Text + "\\DBGlobalFunctionsClass.cs", gsource); } } catch (Exception ex) { _localNotify?.AddToERROR(AppStaticFunctionsClass.GetFormattedError($@"hsSaveSourceCodes_Click", ex)); } foreach (var itm in items) { var source = itm.Text.StartsWith("Cb") ? MakeCbSourceCode(itm.Object) : MakeSourceCode(itm.Object); try { var fi = new FileInfo(txtSourceCodePath.Text + "\\" + itm.Text + "Class.cs"); if (fi.Directory != null && fi.Directory.Exists) { File.WriteAllText(txtSourceCodePath.Text + "\\" + itm.Text + "Class.cs", source); } } catch (Exception ex) { _localNotify?.AddToERROR(AppStaticFunctionsClass.GetFormattedError($@"hsSaveSourceCodes_Click", ex)); } pbExport.Value++; gbExportProgress.Text = LanguageClass.Instance().GetString("PROGRESS") + $@" ({pbExport.Value}/{pbExport.Maximum})"; Application.DoEvents(); } }
public void RefreshLanguageText() { lblTableName.Text = LanguageClass.Instance().GetString("EVENTS_TRACKING"); this.Text = DevelopmentClass.Instance().GetDBInfo(_dbReg, LanguageClass.Instance().GetString("EVENTS_TRACKING")); hsSaveTRACKING.Text = LanguageClass.Instance().GetString("SAVE_TRACKING"); hsLoadTRACKING.Text = LanguageClass.Instance().GetString("LOAD_TRACKING"); }
private void LanguageChanged() { gbFoundLines.Text = LanguageClass.Instance().GetString("FoundLines"); gbSearchCode.Text = LanguageClass.Instance().GetString("SEARCH"); tabPageObjects.Text = LanguageClass.Instance().GetString("OBJECTS"); tabPageOptions.Text = LanguageClass.Instance().GetString("SETTINGS"); }
private void InfoRaised(object sender, MessageEventArgs k) { fctMessages.CurrentLineColor = Color.Blue; fctMessages.AppendText(k.Meldung); _messagesCount++; fctMessages.ScrollLeft(); tabPageMessages.Text = Format(LanguageClass.Instance().GetString("MESSAGES_INFO_ERROR"), _messagesCount, _errorCount); }
public void RefreshLanguage() { tsmiUtilities.Text = LanguageClass.Instance().GetString("UTILITIES"); tsmiNotifications.Text = LanguageClass.Instance().GetString("NOTIFICATIONS") + @" (" + (_errors + _notifications).ToString() + @")"; tsmiShowWindows.Text = LanguageClass.Instance().GetString("SHOWWINDOWS"); tsmiErrors.Text = LanguageClass.Instance().GetString("ERRORS") + @" (" + (_errors).ToString() + @")"; Refresh(); }
public DatabaseCompareFrom(Form parent, DBRegistrationClass reg) { InitializeComponent(); MdiParent = parent; _dbReg = reg; LanguageClass.Instance().OnRaiseLanguageChangedHandler += LanguageChanged; }
private void contextMenuStrip2_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem == tsmiDesignEarth) { var pc = new ProgressClockForm(this) { X = 50, Y = 200 }; pc.Show(); } else if (e.ClickedItem == tsmiDesign) { AppDesign = ReloadDesign(eColorDesigns.Gray); } else if (e.ClickedItem == tsmiAppSettings) { var af = new AppSettingsForm(this); af.Show(); } else if (e.ClickedItem == tsmiDatabaseDesign) { DatabaseDesignForm.Instance().SetParent(MdiParent); DatabaseDesignForm.Instance().Show(); } else if (e.ClickedItem == tsmiCreateUUID) { var uuid = new UUIDForm(MdiParent); uuid.Show(); } else if (e.ClickedItem == tsmiScripting) { var dbReg = new DBRegistrationClass(); var dbm = new ScriptingForm(dbReg); dbm.Show(); } else if (e.ClickedItem == tsmiDatabasRegistration) { var cfg = new DatabaseConfigForm(Instance(), ActRegistrationObject) { Cloned = false }; cfg.SetBearbeitenMode(EditStateClass.eBearbeiten.eEdit); cfg.Show(); } else if (e.ClickedItem == tsmiGerman) { LanguageClass.Instance().ChangeLanguage(LanguageClass.German); } else if (e.ClickedItem == tsmiEnglish) { LanguageClass.Instance().ChangeLanguage(LanguageClass.English); } else if (e.ClickedItem == tsmiJapanese) { LanguageClass.Instance().ChangeLanguage(LanguageClass.Japanese); } }
private void FBXpertMainForm_FormClosing(object sender, FormClosingEventArgs e) { FormOnClosing = true; //CopyrightForm.Instance().Close(); //DbExplorerForm.Instance().Close(); DatabaseDefinitions.Instance().SerializeCurrent("Definition data changed"); LanguageClass.Instance().OnRaiseLanguageChangedHandler -= FBXpertMainForm_OnRaiseLanguageChangedHandler; Application.Exit(); }
public XmlDesignForm(Form parent, DBRegistrationClass reg) { InitializeComponent(); MdiParent = parent; _dbReg = reg; _localNotify.Notify.OnRaiseInfoHandler += InfoRaised; _localNotify.Notify.OnRaiseErrorHandler += ErrorRaised; LanguageClass.Instance().OnRaiseLanguageChangedHandler += LanguageChanged; }
private void ErrorRaised(object sender, MessageEventArgs k) { fctMessages.CurrentLineColor = Color.Red; fctMessages.AppendText(k.Meldung); _errorCount++; fctMessages.ScrollLeft(); object[] param = { _messagesCount, _errorCount }; tabPageMessages.Text = LanguageClass.Instance().GetString("MESSAGES_INFO_ERROR", param); }
public HarpSlotsForm() { InitializeComponent(); sharedFolder = $@"{Application.StartupPath}\temp\"; FormInstances.Instance().HarpNotifies.Register4Info(NotifyInfoHandler); LanguageClass.Instance().RegisterChangeNotifiy(languageChanged); }
private void ChangeLanguage_click(object sender, EventArgs e) { if (sender == deutschToolStripMenuItem) { LanguageClass.Instance().ChangeLanguage("de"); } else if (sender == englischToolStripMenuItem) { LanguageClass.Instance().ChangeLanguage("en"); } }
private void hsClearMessages_Click(object sender, EventArgs e) { fctMessages.Clear(); messages_count = 0; error_count = 0; var sb = new StringBuilder(); sb.Append($@"{LanguageClass.Instance().GetString("MESSAGES")} ({messages_count}) "); sb.Append($@"{LanguageClass.Instance().GetString("ERRORS")} ({error_count})"); tabPageMessages.Text = sb.ToString(); }
private void hsLoad_Click(object sender, EventArgs e) { openFileDialog1.DefaultExt = "*.fdb"; openFileDialog1.Filter = @"Firebird DB|*.fdb|All|*.*"; openFileDialog1.Title = LanguageClass.Instance().GetString("SELECT_DATABSE"); if (openFileDialog1.ShowDialog() == DialogResult.OK) { txtLocation.Text = openFileDialog1.FileName; } }
private void LanguageChanged() { gbExportProgress.Text = LanguageClass.Instance().GetString("PROGRESS"); hsSaveSourceCodes.Text = LanguageClass.Instance().GetString("CreateSourcecode"); gbSourceCode.Text = LanguageClass.Instance().GetString("SourcecodePath"); gbFoundLines.Text = LanguageClass.Instance().GetString("FoundLines"); gbSearchCode.Text = LanguageClass.Instance().GetString("SEARCH"); object[] param = { _messagesCount, _errorCount }; tabPageMessages.Text = LanguageClass.Instance().GetString("MESSAGES_INFO_ERROR", param); tabPageCreateAttributes.Text = LanguageClass.Instance().GetString("SETTINGS"); hsClearMessages.Text = LanguageClass.Instance().GetString("CLEAR_ENTRIES"); }
public static CopyrightForm Instance(Form parent) { if (_instance != null) { return(_instance); } _instance = new CopyrightForm { MdiParent = parent }; LanguageClass.Instance().OnRaiseLanguageChangedHandler += CopyrightForm_OnRaiseLanguageChangedHandler; return(_instance); }
void InfoRaised(object sender, MessageEventArgs k) { if (k.Key.ToString() == "CLEAR_NOTIFIES") { _notifications = 0; } else { _notifications++; } tsmiNotifications.Text = LanguageClass.Instance().GetString("NOTIFICATIONS") + @" (" + (_errors + _notifications).ToString() + @")"; tsmiNotes.Text = LanguageClass.Instance().GetString("NOTES") + @" (" + (_notifications).ToString() + @")"; }
private void AppMainForm_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Minimized; this.Visible = true; this.LayoutMdi(System.Windows.Forms.MdiLayout.ArrangeIcons); Assembly asb = System.Reflection.Assembly.GetExecutingAssembly(); AppName = asb.GetName().ToString().Split(',')[0]; AppVersion = asb.GetName().Version.ToString(); string nm = asb.GetName().Name; object[] cp = asb.GetCustomAttributes(true); s = (AssemblyCompanyAttribute)cp[6]; LanguageClass.Instance().InitEmbedded(this.GetType().Assembly, "HarpMeNow", "LanguageResource", "_", SelectedClass.Instance().Culture, LanguageClass.English); LanguageClass.Instance().ChangeLanguage(SelectedClass.Instance().Culture); SetLanguageControls(); FormInstances.Create(this); FormInstances.Instance().LoadHarps(); FormInstances.Instance().soundAttributeForm.Show(); FormInstances.Instance().soundAttributeForm.SendToBack(); FormInstances.Instance().harpSlotsForm.Show(); FormInstances.Instance().harpSlotsForm.SendToBack(); FormInstances.Instance().songSequenceForm.Show(); FormInstances.Instance().songSequenceForm.SendToBack(); FormInstances.Instance().harpSequenceForm.Show(); FormInstances.Instance().harpSequenceForm.SendToBack(); FormInstances.Instance().harpPlayForm.Show(); FormInstances.Instance().harpPlayForm.SendToBack(); FormInstances.Instance().harpPlayForm.Top = FormInstances.Instance().harpSlotsForm.Top; FormInstances.Instance().harpPlayForm.Left = FormInstances.Instance().harpSlotsForm.Left + FormInstances.Instance().harpSlotsForm.Width + 16; FormInstances.Instance().harpPlayForm.Height = FormInstances.Instance().harpSlotsForm.Height; FormInstances.Instance().songSequenceForm.Top = FormInstances.Instance().harpSlotsForm.Top + FormInstances.Instance().harpSlotsForm.Height + 16; FormInstances.Instance().songSequenceForm.Left = FormInstances.Instance().harpSlotsForm.Left; FormInstances.Instance().harpSequenceForm.Top = FormInstances.Instance().harpSlotsForm.Top + FormInstances.Instance().harpSlotsForm.Height + 16; FormInstances.Instance().harpSequenceForm.Left = FormInstances.Instance().songSequenceForm.Left + FormInstances.Instance().songSequenceForm.Width + 16; FormInstances.Instance().soundAttributeForm.Top = FormInstances.Instance().harpSequenceForm.Top; FormInstances.Instance().soundAttributeForm.Left = FormInstances.Instance().harpSequenceForm.Left + FormInstances.Instance().harpSequenceForm.Width + 16; this.WindowState = FormWindowState.Maximized; var cf = FBXInfo.Instance(this); cf.MdiParent = this; cf.Show(); SetPositions(); }
private void hsLoadClientLib_Click(object sender, EventArgs e) { openFileDialog1.DefaultExt = "*.dll"; openFileDialog1.Filter = "DLL|*.dll|All|*.*"; openFileDialog1.Title = LanguageClass.Instance().GetString("CHOOSE_CLIENT_LIBRARY"); openFileDialog1.InitialDirectory = Application.StartupPath; if (openFileDialog1.ShowDialog() != DialogResult.OK) { return; } FileInfo fi = new FileInfo(openFileDialog1.FileName); txtClientLibrary.Text = fi.FullName; }
private void hsCreateCVS_Click(object sender, EventArgs e) { var items = selDBObjects.CheckedItemDatas; pbExport.Minimum = 0; pbExport.Value = 0; pbExport.Maximum = items.Count; var sb = new StringBuilder(); sb.Append($@"DBNAME;LINKTYPE;LINKART;OBJTYPE_A;OBJ_A;OBJ_A_FIELD;OBJTYPE_B;OBJ_B;OBJ_B_FIELD;STAT;NR{Environment.NewLine}"); int n = 0; string dbname = _dbReg.Alias.Replace(" ", "_"); foreach (var itm in items) { if (itm.Object.GetType() == typeof(TableClass) && (!itm.Text.StartsWith("Cb"))) { var obj = (TableClass)itm.Object; foreach (var field in obj.Fields) { if (field.Value.Name.EndsWith("_ID")) { string tabname = field.Value.Name.Substring(0, field.Value.Name.Length - 3); sb.Append($@"{dbname};LOGICAL;TT;TABLE;{tabname};ID;TABLE;{obj.Name};{field.Value.Name};1;{n++}{Environment.NewLine}"); } } } else if (itm.Object.GetType() == typeof(ViewClass) && (!itm.Text.StartsWith("Cb"))) { var obj = (ViewClass)itm.Object; foreach (var field in obj.Fields) { if (field.Value.Name.EndsWith("__ID")) { string tabname = field.Value.Name.Substring(0, field.Value.Name.Length - 4); sb.Append($@"{dbname};LOGICAL;TV;TABLE;{tabname};ID;VIEW;{obj.Name};{field.Value.Name};2;{n++}{Environment.NewLine}"); } } } pbExport.Value++; gbExportProgress.Text = LanguageClass.Instance().GetString("PROGRESS") + $@" ({pbExport.Value}/{pbExport.Maximum})"; Application.DoEvents(); } fctSource.Text = sb.ToString(); }
void MeldungRaised(object sender, MessageEventArgs k) { fctMessages.CurrentLineColor = System.Drawing.Color.Blue; fctMessages.AppendText(k.Meldung); var sb = new StringBuilder(); messages_count++; if (messages_count > 0) { sb.Append($@"{LanguageClass.Instance().GetString("MESSAGES")} ({messages_count}) "); } if (error_count > 0) { sb.Append($@"{LanguageClass.Instance().GetString("ERRORS")} ({error_count})"); } tabPageMessages.Text = sb.ToString(); fctMessages.ScrollLeft(); }
public void SetLanguageControls() { hsCloseApp.Text = LanguageClass.Instance().GetString("Close"); }
public SongSequenceForm() { InitializeComponent(); LanguageClass.Instance().RegisterChangeNotifiy(languageChanged); }
void ErrorRaised(object sender, MessageEventArgs k) { _errors++; tsmiNotifications.Text = LanguageClass.Instance().GetString("NOTIFICATIONS") + @" (" + (_errors + _notifications).ToString() + @")"; tsmiErrors.Text = LanguageClass.Instance().GetString("ERRORS") + @" (" + (_errors).ToString() + @")"; }
public SoundAttributesForm() { InitializeComponent(); LanguageClass.Instance().RegisterChangeNotifiy(languageChanged); }
//NotifyClass NotifyHandler; public AppMainForm() { InitializeComponent(); LanguageClass.Instance().RegisterChangeNotifiy(languageChanged); }