Пример #1
0
 public void EndJob()
 {
     if (jobList.Count == 0)
     {
         mode = 0;
         con.firePrinterAction(Trans.T("L_IDLE"));
         Main.main.Invoke(Main.main.UpdateJobButtons);
         Main.main.printPanel.Invoke(Main.main.printPanel.SetStatusJobFinished);
         return;
     }
     dataComplete = true;
     jobStarted   = DateTime.Now;
     con.firePrinterAction(Trans.T("L_PRINTING..."));
 }
Пример #2
0
 public void reload()
 {
     if (File.Exists(filename))
     {
         InfoProgressPanel ipp = InfoProgressPanel.Create(Trans.T1("IMPORTING_1", name), true);
         ipp.Action = Trans.T("L_LOADING...");
         ipp.Dock   = DockStyle.Top;
         Main.main.objectPlacement.panelControls.Controls.Add(ipp);
         Main.main.objectPlacement.panelControls.Update();
         Load(filename, ipp);
         Land();
         ForceViewRegeneration();
         ipp.Finished();
     }
 }
Пример #3
0
 public void BeginJob()
 {
     con.firePrinterAction(Trans.T("L_BUILDING_PRINT_JOB...")); //"Building print job...");
     dataComplete = false;
     jobList.Clear();
     //times.Clear();
     totalLines           = 0;
     linesSend            = 0;
     computedPrintingTime = 0;
     con.lastlogprogress  = -1000;
     maxLayer             = -1;
     mode = 1;
     ana  = new GCodeAnalyzer(true);
     con.analyzer.StartJob();
     Main.main.Invoke(Main.main.UpdateJobButtons);
 }
Пример #4
0
        public bool close(bool force)
        {
            bool ret = connector.Disconnect(force);

            if (ret)
            {
                try
                {
                    FireConnectionChange(Trans.T("L_DISCONNECTED"));
                }
                catch { } // Closing the app can cause an exception, if event comes after Main handle is destroyed
                firePrinterAction(Trans.T("L_IDLE"));
                Main.main.Invoke(Main.main.UpdateJobButtons);
            }
            return(ret);
        }
        public TemperatureHistory()
        {
            Main.connection.eventTempHistory += addNotify;
            history         = new TemperatureList();
            history.maxTime = DateTime.UtcNow.Ticks;
            history.minTime = history.maxTime - 36000000000;
            hourHistory     = null;
            lists           = new LinkedList <TemperatureList>();
            currentHour     = -1;
            currentHistory  = history;
            setupColor();

            /* NSUserDefaults *d = NSUserDefaults.standardUserDefaults;
             * NSArray *arr = [NSArray arrayWithObjects:@"tempBackgroundColor",
             *               @"tempGridColor",@"tempAxisColor",@"tempFontColor",
             *               @"tempExtruderColor",@"tempAvgExtruderColor",
             *               @"tempBedColor",@"tempAvgBedColor",@"tempTargetExtruderColor",@"tempTargetBedColor",
             *               @"tempOutputColor",@"tempAvgOutputColor",
             *               @"tempShowExtruder",@"tempShowAverage",@"tempShowBed",@"tempAutoscroll",
             *               @"tempShowOutput",@"tempShowTarget",@"tempZoomLevel",
             *               @"tempAverageSeconds",@"tempExtruderWidth",@"tempAvgExtruderWidth",
             *               @"tempTargetExtruderWidth",@"tempBedWidth",@"tempAvgBedWidth",
             *               @"tempTargetBedWidth",@"tempAvgOutputWidth",
             *               nil];
             * bindingsArray = arr.retain;
             * zoomLevel = [[NSArray arrayWithObjects:[NSNumber numberWithDouble:3600],
             *             [NSNumber numberWithDouble:1800],
             *             [NSNumber numberWithDouble:900],[NSNumber numberWithDouble:300],
             *             [NSNumber numberWithDouble:100],[NSNumber numberWithDouble:60],
             *             nil] retain];
             */
            xpos = 100;
            // for(NSString *key in arr)
            //     [d addObserver:self forKeyPath:key options:NSKeyValueObservingOptionNew context:NULL];
            ToolStripMenuItem item = new ToolStripMenuItem(Trans.T("L_PAST_60_MINUTES"), null, Main.main.selectTimePeriod);

            item.Tag = 0;
            lists.AddLast(history);
            Main.main.timeperiodMenuItem.DropDownItems.Add(item);
            CurrentPos = 0;
        }
Пример #6
0
        /// <summary>
        /// Ends the current printing job. If another one is in que then it resets some the the varriables.
        /// </summary>
        public void EndJob()
        {
            // If no more jobs to do.
            if (jobList.Count == 0)
            {
                mode = 0;
                connection.firePrinterAction(Trans.T("L_IDLE"));
                //Main.main.Invoke(Main.main.UpdateJobButtons);
                //Main.main.Invoke(Main.main.mainHelp.UpdateJobButtons);
                UpdateAll updateAll = Main.main.mainUpdaterHelper.UpdateEverythingInMain;
                Main.main.Invoke(updateAll);

                Main.main.manulControl.Invoke(Main.main.manulControl.SetStatusJobFinished);
                return;
            }
            else // if more jobs to do.
            {
                dataComplete = true;
                jobStarted   = DateTime.Now;
                connection.firePrinterAction(Trans.T("L_PRINTING..."));
            }
        }
Пример #7
0
 public void KillJob()
 {
     mode = 3;
     lock (jobList)
     {
         if (dataComplete == false && jobList.Count == 0)
         {
             return;
         }
         dataComplete = false;
         jobFinished  = DateTime.Now;
         jobList.Clear();
     }
     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);
 }