예제 #1
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult result = openFileDialog_GCode.ShowDialog();//show open dialog
         if (result == DialogResult.OK)
         {
             string FilePath = openFileDialog_GCode.FileName;
             //sr = new StreamReader(FilePath);
             //MessageBox.Show(sr.ReadLine());
             gc = new GCode(FilePath);
             //List<string> Codes = gc.GetCodesInUse();
             //comboBox1.DataSource = Codes;
             richTextBox_Commands.Text = gc.ToString();
         }
         else
         {
             throw new Exception("Error Loading File");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error");
     }
 }
예제 #2
0
 private void removeCommentsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     gc.RemoveComments();
     richTextBox_Commands.Text = gc.ToString();
 }