예제 #1
0
        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);
        }
예제 #2
0
파일: FrmMain.cs 프로젝트: sysylcf/QingNote
        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);
        }
예제 #3
0
파일: FrmMain.cs 프로젝트: sysylcf/QingNote
 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();
 }
예제 #4
0
파일: FrmMain.cs 프로젝트: sysylcf/QingNote
        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));
        }
예제 #5
0
파일: FrmMain.cs 프로젝트: sysylcf/QingNote
 private void FrmMain_FormClosed(object sender, FormClosedEventArgs e)
 {
     SettingsFileData.saveSettings();
 }