Merge pull request #1440 from larsbrubaker/master
Don't load deleted printers
This commit is contained in:
commit
1303e8abff
14 changed files with 136 additions and 152 deletions
|
|
@ -57,7 +57,7 @@ namespace MatterHackers.MatterControl
|
|||
// Add Child Elements
|
||||
if (UserSettings.Instance.DisplayMode == ApplicationDisplayType.Responsive)
|
||||
{
|
||||
this.AddChild(new ActionBar.PrinterActionRow());
|
||||
this.AddChild(new PrinterConnectAndSelectControl());
|
||||
}
|
||||
this.AddChild(PrintStatusRow.Create(queueDataView));
|
||||
this.Padding = new BorderDouble(bottom: 6);
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2016, Lars Brubaker
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
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
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
using System;
|
||||
|
||||
namespace MatterHackers.MatterControl.ActionBar
|
||||
{
|
||||
//Base widget for ActionBarRows
|
||||
public abstract class ActionRowBase : FlowLayoutWidget
|
||||
{
|
||||
public ActionRowBase()
|
||||
: base(FlowDirection.LeftToRight)
|
||||
{
|
||||
Initialize();
|
||||
SetDisplayAttributes();
|
||||
AddChildElements();
|
||||
AddHandlers();
|
||||
}
|
||||
|
||||
protected virtual void Initialize()
|
||||
{
|
||||
//Placeholder for row-specific initialization
|
||||
}
|
||||
|
||||
protected void SetDisplayAttributes()
|
||||
{
|
||||
this.HAnchor = HAnchor.ParentLeftRight;
|
||||
}
|
||||
|
||||
protected abstract void AddChildElements();
|
||||
|
||||
protected virtual void AddHandlers()
|
||||
{
|
||||
//Placeholder for row-specific handlers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,10 +46,11 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace MatterHackers.MatterControl.ActionBar
|
||||
{
|
||||
internal class PrintActionRow : ActionRowBase
|
||||
internal class PrintActionRow : FlowLayoutWidget
|
||||
{
|
||||
private List<Button> activePrintButtons = new List<Button>();
|
||||
private Button addButton;
|
||||
|
|
@ -59,6 +60,8 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
private string cancelCurrentPrintMessage = "Cancel the current print?".Localize();
|
||||
private string cancelCurrentPrintTitle = "Cancel Print?".Localize();
|
||||
private Button connectButton;
|
||||
private Button addPrinterButton;
|
||||
private Button selectPrinterButton;
|
||||
private Button resetConnectionButton;
|
||||
private Button doneWithCurrentPartButton;
|
||||
private Button pauseButton;
|
||||
|
|
@ -74,7 +77,24 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
|
||||
public PrintActionRow(QueueDataView queueDataView)
|
||||
{
|
||||
this.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
textImageButtonFactory.normalTextColor = RGBA_Bytes.White;
|
||||
textImageButtonFactory.disabledTextColor = RGBA_Bytes.LightGray;
|
||||
textImageButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
||||
textImageButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
||||
textImageButtonFactory.AllowThemeToAdjustImage = false;
|
||||
|
||||
textImageButtonFactory.borderWidth = 1;
|
||||
textImageButtonFactory.FixedHeight = 52 * GuiWidget.DeviceScale;
|
||||
textImageButtonFactory.fontSize = 14;
|
||||
textImageButtonFactory.normalBorderColor = new RGBA_Bytes(255, 255, 255, 100);
|
||||
textImageButtonFactory.hoverBorderColor = new RGBA_Bytes(255, 255, 255, 100);
|
||||
|
||||
this.queueDataView = queueDataView;
|
||||
|
||||
AddChildElements();
|
||||
AddHandlers();
|
||||
}
|
||||
|
||||
private event EventHandler unregisterEvents;
|
||||
|
|
@ -93,7 +113,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
this.Invalidate();
|
||||
}
|
||||
|
||||
protected override void AddChildElements()
|
||||
protected void AddChildElements()
|
||||
{
|
||||
addButton = textImageButtonFactory.GenerateTooltipButton("Add".Localize(), StaticData.Instance.LoadIcon("icon_circle_plus.png",32,32).InvertLightness());
|
||||
addButton.ToolTipText = "Add a file to be printed".Localize();
|
||||
|
|
@ -111,12 +131,43 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
configureButton.Margin = new BorderDouble(6, 6, 6, 3);
|
||||
configureButton.Click += onStartButton_Click;
|
||||
|
||||
string connectButtonText = "Connect".Localize();
|
||||
string connectButtonMessage = "Connect to the printer".Localize();
|
||||
connectButton = textImageButtonFactory.GenerateTooltipButton(connectButtonText, StaticData.Instance.LoadIcon("icon_power_32x32.png",32,32).InvertLightness());
|
||||
connectButton.ToolTipText = connectButtonMessage;
|
||||
connectButton = textImageButtonFactory.GenerateTooltipButton("Connect".Localize(), StaticData.Instance.LoadIcon("icon_power_32x32.png",32,32).InvertLightness());
|
||||
connectButton.ToolTipText = "Connect to the printer".Localize();
|
||||
connectButton.Margin = new BorderDouble(6, 6, 6, 3);
|
||||
connectButton.Click += onConnectButton_Click;
|
||||
connectButton.Click += (s, e) =>
|
||||
{
|
||||
if (ActiveSliceSettings.Instance.PrinterSelected)
|
||||
{
|
||||
#if __ANDROID__
|
||||
if (!FrostedSerialPort.HasPermissionToDevice())
|
||||
{
|
||||
// Opens the USB device permissions dialog which will call back into our UsbDevice broadcast receiver to connect
|
||||
FrostedSerialPort.RequestPermissionToDevice(RunTroubleShooting);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.HaltConnectionThread();
|
||||
PrinterConnectionAndCommunication.Instance.ConnectToActivePrinter(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
addPrinterButton = textImageButtonFactory.GenerateTooltipButton("Add Printer".Localize());
|
||||
addPrinterButton.ToolTipText = "Select and add a new printer.".Localize();
|
||||
addPrinterButton.Margin = new BorderDouble(6, 6, 6, 3);
|
||||
addPrinterButton.Click += (s, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() => WizardWindow.ShowPrinterSetup(true));
|
||||
};
|
||||
|
||||
selectPrinterButton = textImageButtonFactory.GenerateTooltipButton("Select Printer".Localize());
|
||||
selectPrinterButton.ToolTipText = "Select an existing printer.".Localize();
|
||||
selectPrinterButton.Margin = new BorderDouble(6, 6, 6, 3);
|
||||
selectPrinterButton.Click += (s, e) =>
|
||||
{
|
||||
WizardWindow.Show<SetupOptionsPage>("/SetupOptions", "Setup Wizard");
|
||||
};
|
||||
|
||||
string resetConnectionButtontText = "Reset".Localize();
|
||||
string resetConnectionButtonMessage = "Reboots the firmware on the controller".Localize();
|
||||
|
|
@ -186,6 +237,12 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
this.AddChild(connectButton);
|
||||
allPrintButtons.Add(connectButton);
|
||||
|
||||
this.AddChild(addPrinterButton);
|
||||
allPrintButtons.Add(addPrinterButton);
|
||||
|
||||
this.AddChild(selectPrinterButton);
|
||||
allPrintButtons.Add(selectPrinterButton);
|
||||
|
||||
this.AddChild(addButton);
|
||||
allPrintButtons.Add(addButton);
|
||||
|
||||
|
|
@ -219,7 +276,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
SetButtonStates();
|
||||
}
|
||||
|
||||
protected override void AddHandlers()
|
||||
protected void AddHandlers()
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.ActivePrintItemChanged.RegisterEvent(onStateChanged, ref unregisterEvents);
|
||||
PrinterConnectionAndCommunication.Instance.CommunicationStateChanged.RegisterEvent(onStateChanged, ref unregisterEvents);
|
||||
|
|
@ -250,21 +307,6 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
}
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
textImageButtonFactory.normalTextColor = RGBA_Bytes.White;
|
||||
textImageButtonFactory.disabledTextColor = RGBA_Bytes.LightGray;
|
||||
textImageButtonFactory.hoverTextColor = RGBA_Bytes.White;
|
||||
textImageButtonFactory.pressedTextColor = RGBA_Bytes.White;
|
||||
textImageButtonFactory.AllowThemeToAdjustImage = false;
|
||||
|
||||
textImageButtonFactory.borderWidth = 1;
|
||||
textImageButtonFactory.FixedHeight = 52 * GuiWidget.DeviceScale;
|
||||
textImageButtonFactory.fontSize = 14;
|
||||
textImageButtonFactory.normalBorderColor = new RGBA_Bytes(255, 255, 255, 100);
|
||||
textImageButtonFactory.hoverBorderColor = new RGBA_Bytes(255, 255, 255, 100);
|
||||
}
|
||||
|
||||
protected Button makeButton(string buttonText, string buttonToolTip = "")
|
||||
{
|
||||
Button button = textImageButtonFactory.GenerateTooltipButton(buttonText);
|
||||
|
|
@ -280,10 +322,23 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
if (!PrinterConnectionAndCommunication.Instance.PrinterIsConnected
|
||||
&& PrinterConnectionAndCommunication.Instance.CommunicationState != PrinterConnectionAndCommunication.CommunicationStates.AttemptingToConnect)
|
||||
{
|
||||
if (UserSettings.Instance.IsTouchScreen)
|
||||
if (!ProfileManager.Instance.ActiveProfiles.Any())
|
||||
{
|
||||
this.activePrintButtons.Add(connectButton);
|
||||
this.activePrintButtons.Add(addPrinterButton);
|
||||
}
|
||||
else if (UserSettings.Instance.IsTouchScreen)
|
||||
{
|
||||
// only on touch screen because desktop has a printer list and a connect button
|
||||
if (ActiveSliceSettings.Instance.PrinterSelected)
|
||||
{
|
||||
this.activePrintButtons.Add(connectButton);
|
||||
}
|
||||
else // no printer selected
|
||||
{
|
||||
this.activePrintButtons.Add(selectPrinterButton);
|
||||
}
|
||||
}
|
||||
|
||||
ShowActiveButtons();
|
||||
EnableActiveButtons();
|
||||
}
|
||||
|
|
@ -438,25 +493,6 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
UiThread.RunOnIdle(AddButtonOnIdle);
|
||||
}
|
||||
|
||||
private void onConnectButton_Click(object sender, EventArgs mouseEvent)
|
||||
{
|
||||
if (ActiveSliceSettings.Instance.PrinterSelected)
|
||||
{
|
||||
#if __ANDROID__
|
||||
if (!FrostedSerialPort.HasPermissionToDevice())
|
||||
{
|
||||
// Opens the USB device permissions dialog which will call back into our UsbDevice broadcast receiver to connect
|
||||
FrostedSerialPort.RequestPermissionToDevice(RunTroubleShooting);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.HaltConnectionThread();
|
||||
PrinterConnectionAndCommunication.Instance.ConnectToActivePrinter(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RunTroubleShooting()
|
||||
{
|
||||
WizardWindow.Show<SetupWizardTroubleshooting>("TroubleShooting", "Trouble Shooting");
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace MatterHackers.MatterControl.ActionBar
|
||||
{
|
||||
public class PrinterActionRow : ActionRowBase
|
||||
public class PrinterConnectAndSelectControl : FlowLayoutWidget
|
||||
{
|
||||
private TextImageButtonFactory actionBarButtonFactory = new TextImageButtonFactory();
|
||||
private Button connectPrinterButton;
|
||||
|
|
@ -55,13 +55,34 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
private event EventHandler unregisterEvents;
|
||||
static EventHandler staticUnregisterEvents;
|
||||
|
||||
public PrinterConnectAndSelectControl()
|
||||
{
|
||||
this.HAnchor = HAnchor.ParentLeftRight;
|
||||
|
||||
actionBarButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
actionBarButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
actionBarButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
||||
actionBarButtonFactory.disabledTextColor = ActiveTheme.Instance.TabLabelUnselected;
|
||||
actionBarButtonFactory.disabledFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
actionBarButtonFactory.disabledBorderColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
||||
actionBarButtonFactory.hoverFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
||||
actionBarButtonFactory.invertImageLocation = true;
|
||||
actionBarButtonFactory.borderWidth = 0;
|
||||
this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
||||
AddChildElements();
|
||||
}
|
||||
|
||||
public override void OnClosed(EventArgs e)
|
||||
{
|
||||
unregisterEvents?.Invoke(this, null);
|
||||
base.OnClosed(e);
|
||||
}
|
||||
|
||||
protected override void AddChildElements()
|
||||
protected void AddChildElements()
|
||||
{
|
||||
actionBarButtonFactory.invertImageLocation = false;
|
||||
actionBarButtonFactory.borderWidth = 1;
|
||||
|
|
@ -205,23 +226,6 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
PrinterConnectionAndCommunication.Instance.CommunicationStateChanged.RegisterEvent(onPrinterStatusChanged, ref unregisterEvents);
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
actionBarButtonFactory.normalTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
actionBarButtonFactory.hoverTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
actionBarButtonFactory.pressedTextColor = ActiveTheme.Instance.PrimaryTextColor;
|
||||
|
||||
actionBarButtonFactory.disabledTextColor = ActiveTheme.Instance.TabLabelUnselected;
|
||||
actionBarButtonFactory.disabledFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
actionBarButtonFactory.disabledBorderColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
||||
actionBarButtonFactory.hoverFillColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
|
||||
actionBarButtonFactory.invertImageLocation = true;
|
||||
actionBarButtonFactory.borderWidth = 0;
|
||||
this.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
}
|
||||
|
||||
static public void UserRequestedConnectToActivePrinter()
|
||||
{
|
||||
if (staticUnregisterEvents != null)
|
||||
|
|
@ -235,6 +235,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage
|
|||
break;
|
||||
|
||||
default:
|
||||
PrinterConnectionAndCommunication.Instance.SendLineToPrinterNow("M115");
|
||||
StyledMessageBox.ShowMessageBox(null, noEepromMappingMessage, noEepromMappingTitle, StyledMessageBox.MessageType.OK);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,11 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
bool foundFirstM92E = false;
|
||||
foreach (string token in test)
|
||||
{
|
||||
if ((token != " ") && ((token == "M92") || (mode == "M92")))
|
||||
if(string.IsNullOrWhiteSpace(token))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (((token == "M92") || (mode == "M92")))
|
||||
{
|
||||
foundSetting = true;
|
||||
if (mode != "M92")
|
||||
|
|
@ -106,7 +110,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
se = token.Substring(1);
|
||||
}
|
||||
}
|
||||
if ((token != " ") && ((token == "M203") || (mode == "M203")))
|
||||
if (((token == "M203") || (mode == "M203")))
|
||||
{
|
||||
foundSetting = true;
|
||||
mode = "M203";
|
||||
|
|
@ -127,7 +131,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
fe = token.Substring(1);
|
||||
}
|
||||
}
|
||||
if ((token != " ") && ((token == "M201") || (mode == "M201")))
|
||||
if (((token == "M201") || (mode == "M201")))
|
||||
{
|
||||
foundSetting = true;
|
||||
mode = "M201";
|
||||
|
|
@ -148,7 +152,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
ae = token.Substring(1);
|
||||
}
|
||||
}
|
||||
if ((token != " ") && ((token == "M204") || (mode == "M204")))
|
||||
if (((token == "M204") || (mode == "M204")))
|
||||
{
|
||||
foundSetting = true;
|
||||
mode = "M204";
|
||||
|
|
@ -161,7 +165,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
racc = token.Substring(1);
|
||||
}
|
||||
}
|
||||
if ((token != " ") && ((token == "M205") || (mode == "M205")))
|
||||
if (((token == "M205") || (mode == "M205")))
|
||||
{
|
||||
foundSetting = true;
|
||||
mode = "M205";
|
||||
|
|
@ -186,7 +190,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
avz = token.Substring(1);
|
||||
}
|
||||
}
|
||||
if ((token != " ") && ((token == "M301") || (mode == "M301")))
|
||||
if (((token == "M301") || (mode == "M301")))
|
||||
{
|
||||
foundSetting = true;
|
||||
mode = "M301";
|
||||
|
|
@ -204,7 +208,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
dpid = token.Substring(1);
|
||||
}
|
||||
}
|
||||
if ((token != " ") && ((token == "M206") || (mode == "M206")))
|
||||
if (((token == "M206") || (mode == "M206")))
|
||||
{
|
||||
foundSetting = true;
|
||||
mode = "M206";
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
private int currentTabIndex = 0;
|
||||
|
||||
public EePromMarlinWindow()
|
||||
: base(700, 480)
|
||||
: base(650 * GuiWidget.DeviceScale, 480 * GuiWidget.DeviceScale)
|
||||
{
|
||||
AlwaysOnTopOfMain = true;
|
||||
Title = "Marlin Firmware EEPROM Settings".Localize();
|
||||
|
|
@ -91,7 +91,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
currentEePromSettings.eventAdded += SetUiToPrinterSettings;
|
||||
|
||||
FlowLayoutWidget mainContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||
mainContainer.VAnchor = Agg.UI.VAnchor.Max_FitToChildren_ParentHeight;
|
||||
mainContainer.VAnchor = Agg.UI.VAnchor.ParentBottomTop;
|
||||
mainContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||
mainContainer.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
mainContainer.Padding = new BorderDouble(3, 0);
|
||||
|
|
@ -255,7 +255,6 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
|
||||
#if __ANDROID__
|
||||
this.AddChild(new SoftKeyboardContentOffset(mainContainer));
|
||||
mainContainer.Closed += (sender, e) => { Close(); };
|
||||
#else
|
||||
AddChild(mainContainer);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
private event EventHandler unregisterEvents;
|
||||
|
||||
public EePromRepetierWindow()
|
||||
: base(540, 480)
|
||||
: base(650 * GuiWidget.DeviceScale, 480 * GuiWidget.DeviceScale)
|
||||
{
|
||||
AlwaysOnTopOfMain = true;
|
||||
BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
|
||||
|
|
@ -55,7 +55,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
currentEePromSettings = new EePromRepetierStorage();
|
||||
|
||||
FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||
topToBottom.VAnchor = Agg.UI.VAnchor.Max_FitToChildren_ParentHeight;
|
||||
topToBottom.VAnchor = Agg.UI.VAnchor.ParentBottomTop;
|
||||
topToBottom.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
|
||||
topToBottom.BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor;
|
||||
topToBottom.Padding = new BorderDouble(3, 0);
|
||||
|
|
@ -186,7 +186,6 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
|
||||
#if __ANDROID__
|
||||
this.AddChild(new SoftKeyboardContentOffset(topToBottom));
|
||||
topToBottom.Closed += (sender, e) => { Close(); };
|
||||
#else
|
||||
this.AddChild(topToBottom);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -126,12 +126,11 @@
|
|||
<Compile Include="AboutPage\UpdateControlData.cs" />
|
||||
<Compile Include="AboutPage\UpdateControlView.cs" />
|
||||
<Compile Include="AboutPage\HTMLParser\HtmlParser.cs" />
|
||||
<Compile Include="ActionBar\ActionRowBase.cs" />
|
||||
<Compile Include="ActionBar\ActionBarPlus.cs" />
|
||||
<Compile Include="ActionBar\PrinterSelector.cs" />
|
||||
<Compile Include="ActionBar\TemperatureWidgetBed.cs" />
|
||||
<Compile Include="ActionBar\PrintActionRow.cs" />
|
||||
<Compile Include="ActionBar\PrinterActionRow.cs" />
|
||||
<Compile Include="ActionBar\PrinterConnectAndSelectControl.cs" />
|
||||
<Compile Include="ActionBar\PrintStatusRow.cs" />
|
||||
<Compile Include="ActionBar\TemperatureWidgetBase.cs" />
|
||||
<Compile Include="ActionBar\TemperatureWidgetExtruder.cs" />
|
||||
|
|
|
|||
|
|
@ -58,9 +58,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
|
||||
#if __ANDROID__
|
||||
TerminalWidget terminalWidget = new TerminalWidget(true);
|
||||
this.AddChild(new SoftKeyboardContentOffset(partPreviewWidget));
|
||||
//mainContainer.Closed += (sender, e) => { Close(); };
|
||||
#else
|
||||
this.AddChild(partPreviewWidget);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -97,9 +97,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
AlwaysOnTopOfMain = true;
|
||||
#if __ANDROID__
|
||||
TerminalWidget terminalWidget = new TerminalWidget(true);
|
||||
this.AddChild(new SoftKeyboardContentOffset(terminalWidget));
|
||||
terminalWidget.Closed += (sender, e) => { Close(); };
|
||||
this.AddChild(new SoftKeyboardContentOffset(new TerminalWidget(true)));
|
||||
#else
|
||||
this.AddChild(new TerminalWidget(true));
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -247,8 +247,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
public static PrinterSettings LoadWithoutRecovery(string profileID)
|
||||
{
|
||||
string profilePath = Instance[profileID]?.ProfilePath;
|
||||
if (profilePath != null && File.Exists(profilePath))
|
||||
var printerInfo = Instance[profileID];
|
||||
|
||||
string profilePath = printerInfo?.ProfilePath;
|
||||
if (profilePath != null
|
||||
&& File.Exists(profilePath)
|
||||
&& !printerInfo.MarkedForDelete)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5449,3 +5449,9 @@ Translated:It's time to migrate your existing printer settings to your MatterHac
|
|||
English:Migrate Printers to Account
|
||||
Translated:Migrate Printers to Account
|
||||
|
||||
English:Select and add a new printer.
|
||||
Translated:Select and add a new printer.
|
||||
|
||||
English:Select an existing printer.
|
||||
Translated:Select an existing printer.
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace MatterHackers.MatterControl.Slicing.Tests
|
||||
{
|
||||
#if !__ANDROID__
|
||||
[TestFixture, Category("MatterControl.Slicing")]
|
||||
public class SliceLayersTests
|
||||
{
|
||||
|
|
@ -73,4 +74,5 @@ namespace MatterHackers.MatterControl.Slicing.Tests
|
|||
Assert.IsTrue(layers.AllLayers.Count == 99);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue