예제 #1
0
 private void BtnOption_Click(object sender, EventArgs e)
 {
     // Selectes Button Options
     if (BtnOption.Text == "Open")
     {
         // Open File Routine
         DirectoryInfo dinfo     = new DirectoryInfo(SysDir);
         String        FileFound = dinfo + LBxListMyFiles.SelectedItem.ToString();
         RTxWritingPad.LoadFile(FileFound, RichTextBoxStreamType.RichText);
         RTPreview.Clear();
     }
     else if (BtnOption.Text == "Save")
     {
         // Save File Routine
         DirectoryInfo dinfo     = new DirectoryInfo(SysDir);
         String        FileFound = dinfo + TBxFilename.Text + ".rtf";
         filescan.Add(Path.GetFileName(FileFound));
         RTxWritingPad.SaveFile(FileFound, RichTextBoxStreamType.RichText);
         SubUpdateDisplay();
     }
     else if (BtnOption.Text == "Delete")
     {
         // Delete File Routine
         DirectoryInfo dinfo     = new DirectoryInfo(SysDir);
         String        FileFound = dinfo + LBxListMyFiles.SelectedItem.ToString();
         filescan.RemoveAt(LBxListMyFiles.SelectedIndex);
         File.Delete(FileFound);
         RTPreview.Clear();
         SubUpdateDisplay();
     }
 }
예제 #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     LblFilename.Visible = false;
     TBxFilename.Visible = false;
     button1.Enabled     = true;
     button2.Enabled     = true;
     button2.ForeColor   = Color.White;
     // Checks For Directory
     if (Directory.Exists(SysDir))
     {
         SubCheckForFiles();
         SubLoadFontAndColourSettings();
         this.Show();
         RTxWritingPad.Focus();
     }
     else
     {
         // Creates A Directory
         Directory.CreateDirectory(SysDir);
         this.Show();
         RTxWritingPad.Focus();
     }
 }
예제 #3
0
 private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Highlights Selected
     RTxWritingPad.SelectAll();
 }
예제 #4
0
 private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Pastes Selected Text
     RTxWritingPad.Paste();
 }
예제 #5
0
 private void cutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //  Cut Selected Text
     RTxWritingPad.Cut();
 }
예제 #6
0
 private void copyToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Copy Selected Text
     RTxWritingPad.Copy();
 }
예제 #7
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Clears WrittingPad
     RTxWritingPad.Clear();
 }
예제 #8
0
 private void selectAllToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     // Context Highlight All Text
     RTxWritingPad.SelectAll();
 }
예제 #9
0
 private void pasteToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     // Context Paste Text
     RTxWritingPad.Paste();
 }