示例#1
0
 private void mb_fileClose_Click(object sender, EventArgs e)
 {
     filePath        = "";
     fileEditor      = null;
     rtb_Editor.Text = "";
     LockControlls();
 }
示例#2
0
 private void mb_OpenFile_Click(object sender, EventArgs e)
 {
     if (openTxtDialog.ShowDialog() == DialogResult.OK)
     {
         filePath   = openTxtDialog.FileName;
         fileEditor = new FileEditor(filePath);
         List <string> lines   = fileEditor.readFile();
         string        resText = "";
         lines.ForEach(delegate(string line)
         {
             resText += line + "\n";
         });
         rtb_Editor.Text = resText.Remove(resText.Length - 1);
         UnlockControlls();
     }
 }