private void btnCommit_Click(object sender, EventArgs e) { CardBoxFileData boxData = new CardBoxFileData(); boxData.title = txtBoxName.Text; if (rbtByCategory.Checked) { boxData.indexing = BoxIndexing.CATEGORY; } else if (rbtByChapter.Checked) { boxData.indexing = BoxIndexing.CHAPTERS; } else if (rbtByTime.Checked) { boxData.indexing = BoxIndexing.CHRONOLOGICAL; } else { boxData.indexing = BoxIndexing.INVALID; } boxData.dateCreated = IOUtil.formatNow(); boxData.creator = SettingsFileData.getSettingItem(Localization.FileKeywords.Settings_UsersName); boxData.writeFile(txtBoxPath.Text); DirectoriesFileData.addCardBoxAndSave(txtBoxPath.Text); }
private void btnSwitchCardBox_Click(object sender, EventArgs e) { var dlgMBoxes = new DialogManageBoxes(); dlgMBoxes.ShowDialog(); mountCardTree(dlgMBoxes.cTree); SettingsFileData.setSettingItem(Localization.FileKeywords.Settings_LastPath, cTree.boxDirectory); }
private void mountCardTree(CardBoxTree tree) { if (tree == null) { return; } cTree = tree; cTree.loadCardDirectories(); lblBoxTitle.Text = lblBoxTitleDef + cBox.title; SettingsFileData.setSettingItem(Localization.FileKeywords.Settings_LastPath, cBoxPath); initTreeView(); }
public FrmMain() { System.Threading.Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo (SettingsFileData.getSettingItem(Localization.FileKeywords.Settings_CurrentLanguage)); InitializeComponent(); //txtCardContent.Height = lblKeyWords.Top - PADDING - txtCardContent.Top; lstSearchResults.Height = txtSearchInput.Top - PADDING - lstSearchResults.Top; lblBoxTitleDef = lblBoxTitle.Text; lblKeywordsDef = lblKeywords.Text; setPathAndLoad(SettingsFileData.getSettingItem(Localization.FileKeywords.Settings_LastPath)); }
private void FrmMain_FormClosed(object sender, FormClosedEventArgs e) { SettingsFileData.saveSettings(); }