Пример #1
0
 private void CompileLoadExec_Click(object sender, EventArgs e)
 {
     try
     {
         String Result = KM.CompileAndLoadCoff(1, CFileName.Text, false);
         if (Result != "")
         {
             MessageBox.Show(Result, "Compile Error");
         }
         else
         {
             // everything ok, execute the Thread
             KM.WriteLine("Execute1");
         }
     }
     catch (DMException ex)
     {
         MessageBox.Show(ex.InnerException.Message);
     }
 }
Пример #2
0
 private void INIT(object sender, EventArgs e)
 {
     try
     {
         SyncEnable.Checked = false;
         String Result = KM.CompileAndLoadCoff(1, MainPath + @"\C Programs\KStep\InitKStep3Axis.c", false);
         if (Result != "")
         {
             MessageBox.Show(Result, "Compile Error");
         }
         else
         {
             // everything ok, execute the Thread
             KM.WriteLine("Execute1");
         }
     }
     catch (DMException ex)
     {
         MessageBox.Show(ex.InnerException.Message);
     }
 }
Пример #3
0
        int CompileAndLoadCoff(String pathFile)
        {
            try
            {
                String Result = _KM.CompileAndLoadCoff(1, pathFile, false);
                if (Result != "")
                {
                    MessageBox.Show(Result, "Compile Error");
                }
                else
                {
                    // everything ok, execute the Thread
                    _KM.WriteLine("Execute1");
                }
            }
            catch (DMException ex)
            {
                MessageBox.Show(ex.InnerException.Message);
            }

            return(0);
        }