Пример #1
0
        /// <summary>
        /// Stops the current job by injecting M29
        /// </summary>
        public void KillJob()
        {
            //mode = 3;
            mode = jobMode.abortedJob;
            lock (jobList)
            {
                if (dataComplete == false && jobList.Count == 0)
                {
                    return;
                }
                dataComplete = false;
                jobFinished  = DateTime.Now;
                jobList.Clear();
                totalLines = linesSend;
            }
            exclusive = false;
            connection.injectManualCommandFirst("M29");
            foreach (GCodeShort code in Main.main.editor.getContentArray(3))
            {
                connection.injectManualCommand(code.text);
            }
            //Main.main.Invoke(Main.main.UpdateJobButtons);
            //Main.main.Invoke(Main.main.mainHelp.UpdateJobButtons);
            UpdateAll updateAll = Main.main.mainUpdaterHelper.UpdateEverythingInMain;

            Main.main.Invoke(updateAll);

            connection.firePrinterAction(Trans.T("L_JOB_KILLED")); //"Job killed");
            DoEndKillActions();
            Main.main.manulControl.Invoke(Main.main.manulControl.SetStatusJobKilled);
        }
Пример #2
0
 public void KillJob()
 {
     mode = 3;
     lock (jobList)
     {
         if (dataComplete == false && jobList.Count == 0)
         {
             return;
         }
         dataComplete = false;
         jobFinished  = DateTime.Now;
         jobList.Clear();
         totalLines = linesSend;
     }
     exclusive = false;
     con.injectManualCommandFirst("M29");
     foreach (GCodeShort code in Main.main.editor.getContentArray(3))
     {
         con.injectManualCommand(code.text);
     }
     Main.main.Invoke(Main.main.UpdateJobButtons);
     con.firePrinterAction(Trans.T("L_JOB_KILLED")); //"Job killed");
     DoEndKillActions();
     Main.main.printPanel.Invoke(Main.main.printPanel.SetStatusJobKilled);
 }
Пример #3
0
 public void KillJob()
 {
     if (dataComplete == false && jobList.Count == 0)
     {
         return;
     }
     dataComplete = false;
     jobFinished  = DateTime.Now;
     jobList.Clear();
     mode      = 3;
     exclusive = false;
     con.injectManualCommandFirst("M29");
     Main.main.Invoke(Main.main.UpdateJobButtons);
     con.firePrinterAction("Job killed");
     DoEndKillActions();
 }