public EditVocs(string boxNameFromRecent) { InitializeComponent(); dbFilePath = Miscellaneous.GenealValues.APPDATA_PATH + boxNameFromRecent + ".db"; Fach1 = DBAdapter.GetVocsByClass(dbFilePath, 1); Fach2 = DBAdapter.GetVocsByClass(dbFilePath, 2); Fach3 = DBAdapter.GetVocsByClass(dbFilePath, 3); Fach4 = DBAdapter.GetVocsByClass(dbFilePath, 4); Fach5 = DBAdapter.GetVocsByClass(dbFilePath, 5); Fach6 = DBAdapter.GetVocsByClass(dbFilePath, 6); Fach7 = DBAdapter.GetVocsByClass(dbFilePath, 7); Fach8 = DBAdapter.GetVocsByClass(dbFilePath, 8); Fach9 = DBAdapter.GetVocsByClass(dbFilePath, 9); Fach10 = DBAdapter.GetVocsByClass(dbFilePath, 10); UpdateElements(); this.BackColor = Miscellaneous.CustomColors.EditVocs; flp_VocabList.BackColor = Miscellaneous.CustomColors.EditVocs; gb_Info.BackColor = Miscellaneous.CustomColors.EditVocs; pnl_Info.BackColor = Miscellaneous.CustomColors.EditVocs; tb_EigeneSprache.BackColor = Miscellaneous.CustomColors.EditVocs; tb_Fremdsprache.BackColor = Miscellaneous.CustomColors.EditVocs; }
public LearnBox(string boxNameFromRecent) { InitializeComponent(); dbFilePath = Miscellaneous.GenealValues.APPDATA_PATH + boxNameFromRecent + ".db"; lb_Title.Text = boxNameFromRecent; startWindow = DateTime.Now; lb_EigeneSprache.Text = DBAdapter.GetLabelEntry(dbFilePath, "nativeLanguage") + ":"; lb_Fremdsprache.Text = DBAdapter.GetLabelEntry(dbFilePath, "translationLanguage") + ":"; lb_DirectionEF.Text = DBAdapter.GetLabelEntry(dbFilePath, "nativeLanguage") + " > " + DBAdapter.GetLabelEntry(dbFilePath, "translationLanguage"); lb_DirectionFE.Text = DBAdapter.GetLabelEntry(dbFilePath, "translationLanguage") + " > " + DBAdapter.GetLabelEntry(dbFilePath, "nativeLanguage"); Fach[0] = DBAdapter.GetVocsByClass(dbFilePath, 0); Fach[1] = DBAdapter.GetVocsByClass(dbFilePath, 1); Fach[2] = DBAdapter.GetVocsByClass(dbFilePath, 2); Fach[3] = DBAdapter.GetVocsByClass(dbFilePath, 3); Fach[4] = DBAdapter.GetVocsByClass(dbFilePath, 4); Fach[5] = DBAdapter.GetVocsByClass(dbFilePath, 5); Fach[6] = DBAdapter.GetVocsByClass(dbFilePath, 6); Fach[7] = DBAdapter.GetVocsByClass(dbFilePath, 7); Fach[8] = DBAdapter.GetVocsByClass(dbFilePath, 8); Fach[9] = DBAdapter.GetVocsByClass(dbFilePath, 9); Fach[10] = DBAdapter.GetVocsByClass(dbFilePath, 10); if (DBAdapter.GetLabelEntry(dbFilePath, "lastClass") == "none") { if (!FindNewClass()) { MessageBox.Show("In der Ausgewählten Box sind keine Vokabeln enthalten. Gehe zu Hauptmenü > Vorhandene Box öffnen > Vokabeln verwalten um neue Vokabeln hinzufügen", "Keine Vokabeln gefunden", MessageBoxButtons.OK, MessageBoxIcon.Error); CloseMeFunction?.Invoke(this, null); } } else { currentClass = Convert.ToInt32(DBAdapter.GetLabelEntry(dbFilePath, "lastClass")); } DBAdapter.UpdateLabel(dbFilePath, "lastClass", currentClass.ToString()); NextExercise(); UpdateClassVisibility(); sts_info.BackColor = Miscellaneous.CustomColors.LearnBox; }