2014-04-15 18:13:27 -07:00
|
|
|
|
/*
|
2017-02-14 17:07:04 -08:00
|
|
|
|
Copyright (c) 2017, Kevin Pope, John Lewin
|
2014-04-15 18:13:27 -07:00
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
2015-04-08 15:20:10 -07:00
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
2014-04-15 18:13:27 -07:00
|
|
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this
|
2015-04-08 15:20:10 -07:00
|
|
|
|
list of conditions and the following disclaimer.
|
2014-04-15 18:13:27 -07:00
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
|
|
this list of conditions and the following disclaimer in the documentation
|
2015-04-08 15:20:10 -07:00
|
|
|
|
and/or other materials provided with the distribution.
|
2014-04-15 18:13:27 -07:00
|
|
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
|
|
|
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
|
|
|
|
The views and conclusions contained in the software and documentation are those
|
2015-04-08 15:20:10 -07:00
|
|
|
|
of the authors and should not be interpreted as representing official policies,
|
2014-04-15 18:13:27 -07:00
|
|
|
|
either expressed or implied, of the FreeBSD Project.
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2017-02-14 17:07:04 -08:00
|
|
|
|
using System;
|
2014-01-29 19:09:30 -08:00
|
|
|
|
using MatterHackers.Agg;
|
2016-05-06 17:56:27 -07:00
|
|
|
|
using MatterHackers.Agg.Image;
|
2016-05-09 18:07:35 -07:00
|
|
|
|
using MatterHackers.Agg.ImageProcessing;
|
2016-05-06 17:56:27 -07:00
|
|
|
|
using MatterHackers.Agg.PlatformAbstract;
|
2014-01-29 19:09:30 -08:00
|
|
|
|
using MatterHackers.Agg.UI;
|
2014-04-15 18:13:27 -07:00
|
|
|
|
using MatterHackers.Localizations;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
using MatterHackers.MatterControl.PrinterCommunication;
|
|
|
|
|
|
using MatterHackers.MatterControl.PrintQueue;
|
2014-06-19 11:25:28 -07:00
|
|
|
|
using MatterHackers.MatterControl.SlicerConfiguration;
|
2014-04-15 18:13:27 -07:00
|
|
|
|
using MatterHackers.VectorMath;
|
2014-01-29 19:09:30 -08:00
|
|
|
|
|
|
|
|
|
|
namespace MatterHackers.MatterControl.ActionBar
|
|
|
|
|
|
{
|
2015-04-08 15:20:10 -07:00
|
|
|
|
public class PrintStatusRow : FlowLayoutWidget
|
2016-06-01 18:17:11 -07:00
|
|
|
|
{
|
|
|
|
|
|
private TextWidget activePrintName;
|
2015-04-14 15:50:34 -07:00
|
|
|
|
private TextWidget activePrintStatus;
|
|
|
|
|
|
private TemperatureWidgetBase bedTemperatureWidget;
|
|
|
|
|
|
private TemperatureWidgetBase extruderTemperatureWidget;
|
2017-02-14 17:07:04 -08:00
|
|
|
|
private EventHandler unregisterEvents;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
Move to new library model and view
- Add new listview control for library content
- Migrate library providers to containers
- Cloud, Sqlite, Directories, Queue, History
- Migrate SideBar components to containers
- Primatives, Text, Braille, ImageConverter
- Create new library container types
- Zip files, Calibration parts, Printer SDCards
- Reduce leftnav to Library, Settings, Controls, Options
- Add DragDrop support for image content
2017-05-19 22:33:55 -07:00
|
|
|
|
public PrintStatusRow()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-02-14 17:07:04 -08:00
|
|
|
|
UiThread.RunOnIdle(OnIdle);
|
2014-02-21 18:32:41 -08:00
|
|
|
|
|
2017-05-23 19:03:30 -07:00
|
|
|
|
this.Margin = 0;
|
|
|
|
|
|
this.Padding = 0;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
this.HAnchor = HAnchor.ParentLeftRight;
|
2014-02-24 10:52:24 -08:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
AddChildElements();
|
2014-02-21 18:32:41 -08:00
|
|
|
|
|
2017-06-16 18:04:47 -07:00
|
|
|
|
ApplicationController.Instance.ActivePrintItemChanged.RegisterEvent((s, e) =>
|
2017-02-14 17:07:04 -08:00
|
|
|
|
{
|
|
|
|
|
|
UpdatePrintItemName();
|
|
|
|
|
|
UpdatePrintStatus();
|
|
|
|
|
|
}, ref unregisterEvents);
|
2015-04-14 15:50:34 -07:00
|
|
|
|
|
2017-06-13 17:22:49 -07:00
|
|
|
|
PrinterConnection.Instance.CommunicationStateChanged.RegisterEvent((s, e) =>
|
2017-02-14 17:07:04 -08:00
|
|
|
|
{
|
|
|
|
|
|
UpdatePrintStatus();
|
|
|
|
|
|
}, ref unregisterEvents);
|
2016-06-01 18:17:11 -07:00
|
|
|
|
|
2017-06-13 17:22:49 -07:00
|
|
|
|
PrinterConnection.Instance.WroteLine.RegisterEvent((s, e) =>
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-02-14 17:07:04 -08:00
|
|
|
|
UpdatePrintStatus();
|
|
|
|
|
|
}, ref unregisterEvents);
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2017-02-03 13:06:08 -08:00
|
|
|
|
public override void OnClosed(ClosedEventArgs e)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2016-12-05 15:05:09 -08:00
|
|
|
|
unregisterEvents?.Invoke(this, null);
|
2015-04-14 15:50:34 -07:00
|
|
|
|
base.OnClosed(e);
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
|
|
|
|
|
private void AddChildElements()
|
|
|
|
|
|
{
|
2017-05-23 21:27:28 -07:00
|
|
|
|
var temperatureWidgets = new FlowLayoutWidget();
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-06-27 18:41:34 -07:00
|
|
|
|
extruderTemperatureWidget = new TemperatureWidgetExtruder(ApplicationController.Instance.Theme.MenuButtonFactory);
|
2015-04-08 15:20:10 -07:00
|
|
|
|
temperatureWidgets.AddChild(extruderTemperatureWidget);
|
2014-01-29 19:09:30 -08:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
bedTemperatureWidget = new TemperatureWidgetBed();
|
2016-06-21 09:38:37 -07:00
|
|
|
|
if (ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.has_heated_bed))
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
temperatureWidgets.AddChild(bedTemperatureWidget);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
temperatureWidgets.VAnchor |= VAnchor.ParentTop;
|
|
|
|
|
|
temperatureWidgets.Margin = new BorderDouble(left: 6);
|
|
|
|
|
|
|
|
|
|
|
|
FlowLayoutWidget printStatusContainer = CreateActivePrinterInfoWidget();
|
|
|
|
|
|
printStatusContainer.VAnchor |= VAnchor.ParentTop;
|
|
|
|
|
|
|
2017-01-17 17:16:07 -08:00
|
|
|
|
var iconContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
2015-04-08 15:20:10 -07:00
|
|
|
|
iconContainer.Name = "PrintStatusRow.IconContainer";
|
|
|
|
|
|
iconContainer.VAnchor |= VAnchor.ParentTop;
|
|
|
|
|
|
iconContainer.Margin = new BorderDouble(top: 3);
|
|
|
|
|
|
iconContainer.AddChild(GetAutoLevelIndicator());
|
|
|
|
|
|
|
|
|
|
|
|
this.AddChild(printStatusContainer);
|
|
|
|
|
|
this.AddChild(iconContainer);
|
|
|
|
|
|
this.AddChild(temperatureWidgets);
|
|
|
|
|
|
|
|
|
|
|
|
UpdatePrintStatus();
|
|
|
|
|
|
UpdatePrintItemName();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private FlowLayoutWidget CreateActivePrinterInfoWidget()
|
|
|
|
|
|
{
|
2017-05-23 19:03:30 -07:00
|
|
|
|
var container = new FlowLayoutWidget(FlowDirection.TopToBottom)
|
|
|
|
|
|
{
|
|
|
|
|
|
Margin = new BorderDouble(6, 0, 6, 0),
|
|
|
|
|
|
HAnchor = HAnchor.ParentLeftRight,
|
|
|
|
|
|
VAnchor = VAnchor.ParentBottom | VAnchor.FitToChildren,
|
|
|
|
|
|
};
|
2014-01-29 19:09:30 -08:00
|
|
|
|
|
2014-02-20 09:47:08 -08:00
|
|
|
|
activePrintName = getPrintStatusLabel("this is the biggest name we will allow", pointSize: 14);
|
2015-04-08 15:20:10 -07:00
|
|
|
|
activePrintName.AutoExpandBoundsToText = false;
|
2017-05-23 19:03:30 -07:00
|
|
|
|
container.AddChild(activePrintName);
|
2017-02-14 17:07:04 -08:00
|
|
|
|
|
2014-02-20 09:47:08 -08:00
|
|
|
|
activePrintStatus = getPrintStatusLabel("this is the biggest label we will allow - bigger", pointSize: 11);
|
2015-04-08 15:20:10 -07:00
|
|
|
|
activePrintStatus.AutoExpandBoundsToText = false;
|
|
|
|
|
|
activePrintStatus.Text = "";
|
|
|
|
|
|
activePrintStatus.Margin = new BorderDouble(top: 3);
|
|
|
|
|
|
container.AddChild(activePrintStatus);
|
|
|
|
|
|
|
|
|
|
|
|
return container;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-14 15:50:34 -07:00
|
|
|
|
private Button GetAutoLevelIndicator()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-04-14 15:50:34 -07:00
|
|
|
|
ImageButtonFactory imageButtonFactory = new ImageButtonFactory();
|
2016-01-08 16:44:57 -08:00
|
|
|
|
imageButtonFactory.InvertImageColor = false;
|
2016-05-10 11:12:32 -07:00
|
|
|
|
ImageBuffer levelingImage = StaticData.Instance.LoadIcon("leveling_32x32.png", 16, 16).InvertLightness();
|
2017-05-23 19:03:30 -07:00
|
|
|
|
|
2016-05-06 17:56:27 -07:00
|
|
|
|
Button autoLevelButton = imageButtonFactory.Generate(levelingImage, levelingImage);
|
2015-04-14 15:50:34 -07:00
|
|
|
|
autoLevelButton.Margin = new Agg.BorderDouble(top: 3);
|
2015-08-21 13:29:24 -07:00
|
|
|
|
autoLevelButton.ToolTipText = "Print leveling is enabled.".Localize();
|
2016-05-17 10:33:18 -07:00
|
|
|
|
autoLevelButton.Cursor = Cursors.Hand;
|
2016-09-27 12:47:15 -07:00
|
|
|
|
autoLevelButton.Visible = ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.print_leveling_enabled);
|
2015-04-14 15:50:34 -07:00
|
|
|
|
|
2016-07-18 16:18:12 -07:00
|
|
|
|
PrinterSettings.PrintLevelingEnabledChanged.RegisterEvent((sender, e) =>
|
2015-04-14 15:50:34 -07:00
|
|
|
|
{
|
2016-09-27 12:47:15 -07:00
|
|
|
|
autoLevelButton.Visible = ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.print_leveling_enabled);
|
2015-04-14 15:50:34 -07:00
|
|
|
|
}, ref unregisterEvents);
|
|
|
|
|
|
|
|
|
|
|
|
return autoLevelButton;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-14 15:50:34 -07:00
|
|
|
|
private TextWidget getPrintStatusLabel(string text, int pointSize)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-04-14 15:50:34 -07:00
|
|
|
|
TextWidget widget = new TextWidget(text, pointSize: pointSize);
|
|
|
|
|
|
widget.TextColor = RGBA_Bytes.White;
|
|
|
|
|
|
widget.AutoExpandBoundsToText = true;
|
|
|
|
|
|
widget.MinimumSize = new Vector2(widget.Width, widget.Height);
|
|
|
|
|
|
return widget;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-11 12:06:40 -07:00
|
|
|
|
private void OnIdle()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-06-13 17:22:49 -07:00
|
|
|
|
if (PrinterConnection.Instance.PrinterIsPrinting)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
UpdatePrintStatus();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-04-25 12:51:29 -07:00
|
|
|
|
if (!HasBeenClosed)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
UiThread.RunOnIdle(OnIdle, 1);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-02-14 17:07:04 -08:00
|
|
|
|
private void PrintItem_SlicingOutputMessage(object sender, StringEventArgs message)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-02-14 17:07:04 -08:00
|
|
|
|
activePrintStatus.Text = message.Data;
|
2015-04-14 15:50:34 -07:00
|
|
|
|
}
|
2016-06-01 18:17:11 -07:00
|
|
|
|
|
2015-04-14 15:50:34 -07:00
|
|
|
|
private void SetVisibleStatus()
|
|
|
|
|
|
{
|
2017-02-09 14:33:27 -08:00
|
|
|
|
if (ActiveSliceSettings.Instance.PrinterSelected)
|
2015-04-14 15:50:34 -07:00
|
|
|
|
{
|
2016-06-16 07:23:42 -07:00
|
|
|
|
if (ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.has_heated_bed))
|
2015-04-14 15:50:34 -07:00
|
|
|
|
{
|
|
|
|
|
|
bedTemperatureWidget.Visible = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
bedTemperatureWidget.Visible = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2016-06-01 18:17:11 -07:00
|
|
|
|
|
2015-04-14 15:50:34 -07:00
|
|
|
|
private void UpdatePrintItemName()
|
|
|
|
|
|
{
|
2017-06-16 18:04:47 -07:00
|
|
|
|
if (ApplicationController.Instance.ActivePrintItem != null)
|
2015-04-14 15:50:34 -07:00
|
|
|
|
{
|
2017-06-16 18:04:47 -07:00
|
|
|
|
this.activePrintName.Text = ApplicationController.Instance.ActivePrintItem.GetFriendlyName();
|
2015-04-14 15:50:34 -07:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2017-01-04 07:23:30 -08:00
|
|
|
|
this.activePrintName.Text = "No items in the print queue".Localize();
|
2015-04-14 15:50:34 -07:00
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void UpdatePrintStatus()
|
|
|
|
|
|
{
|
2017-03-09 12:45:31 -08:00
|
|
|
|
string printLabel = "Next Print".Localize() + ":";
|
|
|
|
|
|
string printerStatus = activePrintStatus.Text;
|
|
|
|
|
|
|
2017-06-16 18:04:47 -07:00
|
|
|
|
if (ApplicationController.Instance.ActivePrintItem != null)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-06-13 17:22:49 -07:00
|
|
|
|
int totalSecondsInPrint = PrinterConnection.Instance.TotalSecondsInPrint;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
|
|
|
|
|
int totalHoursInPrint = (int)(totalSecondsInPrint / (60 * 60));
|
|
|
|
|
|
int totalMinutesInPrint = (int)(totalSecondsInPrint / 60 - totalHoursInPrint * 60);
|
|
|
|
|
|
totalSecondsInPrint = totalSecondsInPrint % 60;
|
|
|
|
|
|
|
2017-01-04 07:23:30 -08:00
|
|
|
|
string estimatedTimeLabel = "Estimated Print Time".Localize();
|
|
|
|
|
|
string calculatingLabel = "Calculating...".Localize();
|
2015-04-08 15:20:10 -07:00
|
|
|
|
string totalPrintTimeText;
|
2016-06-01 18:17:11 -07:00
|
|
|
|
|
|
|
|
|
|
if (totalSecondsInPrint > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (totalHoursInPrint > 0)
|
|
|
|
|
|
{
|
2016-10-03 13:48:39 -07:00
|
|
|
|
totalPrintTimeText = $"{estimatedTimeLabel}: {totalHoursInPrint}h {totalMinutesInPrint:00}m {totalSecondsInPrint:00}s";
|
2016-06-01 18:17:11 -07:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2016-10-03 13:48:39 -07:00
|
|
|
|
totalPrintTimeText = $"{estimatedTimeLabel}: {totalMinutesInPrint}m {totalSecondsInPrint:00}s";
|
2016-06-01 18:17:11 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (totalSecondsInPrint < 0)
|
|
|
|
|
|
{
|
2017-02-14 17:07:04 -08:00
|
|
|
|
totalPrintTimeText = "Streaming GCode...".Localize();
|
2016-06-01 18:17:11 -07:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2016-10-03 13:48:39 -07:00
|
|
|
|
totalPrintTimeText = $"{estimatedTimeLabel}: {calculatingLabel}";
|
2016-06-01 18:17:11 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-06-13 17:22:49 -07:00
|
|
|
|
switch (PrinterConnection.Instance.CommunicationState)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2017-06-13 17:32:38 -07:00
|
|
|
|
case CommunicationStates.PreparingToPrint:
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printLabel = "Preparing To Print".Localize() + ":";
|
2015-04-08 15:20:10 -07:00
|
|
|
|
break;
|
|
|
|
|
|
|
2017-06-13 17:32:38 -07:00
|
|
|
|
case CommunicationStates.Printing:
|
2017-06-13 17:22:49 -07:00
|
|
|
|
printLabel = PrinterConnection.Instance.PrintingStateString;
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printerStatus = totalPrintTimeText;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
break;
|
|
|
|
|
|
|
2017-06-13 17:32:38 -07:00
|
|
|
|
case CommunicationStates.Paused:
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printLabel = "Printing Paused".Localize() + ":";
|
|
|
|
|
|
printerStatus = totalPrintTimeText;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
break;
|
|
|
|
|
|
|
2017-06-13 17:32:38 -07:00
|
|
|
|
case CommunicationStates.FinishedPrint:
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printLabel = "Done Printing".Localize() + ":";
|
|
|
|
|
|
printerStatus = totalPrintTimeText;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
break;
|
|
|
|
|
|
|
2017-06-13 17:32:38 -07:00
|
|
|
|
case CommunicationStates.Disconnected:
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printerStatus = "Not connected. Press 'Connect' to enable printing.".Localize();
|
2017-03-01 17:32:58 -08:00
|
|
|
|
break;
|
|
|
|
|
|
|
2017-06-13 17:32:38 -07:00
|
|
|
|
case CommunicationStates.AttemptingToConnect:
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printerStatus = "Attempting to Connect".Localize() + "...";
|
2017-03-01 17:32:58 -08:00
|
|
|
|
break;
|
|
|
|
|
|
|
2017-06-13 17:32:38 -07:00
|
|
|
|
case CommunicationStates.ConnectionLost:
|
|
|
|
|
|
case CommunicationStates.FailedToConnect:
|
2017-06-13 17:22:49 -07:00
|
|
|
|
printerStatus = "Connection Failed".Localize() + ": " + PrinterConnection.Instance.ConnectionFailureMessage;
|
2017-03-01 17:32:58 -08:00
|
|
|
|
break;
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
default:
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printerStatus = ActiveSliceSettings.Instance.PrinterSelected ? "" : "Select a Printer.".Localize();
|
2015-04-08 15:20:10 -07:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2017-03-09 12:45:31 -08:00
|
|
|
|
printLabel = "Next Print".Localize() + ":";
|
|
|
|
|
|
printerStatus = "Press 'Add' to choose an item to print".Localize();
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
2017-03-09 12:45:31 -08:00
|
|
|
|
|
|
|
|
|
|
activePrintStatus.Text = printerStatus;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|