Restore AutoConnect functionality
- Add AutoConnect settings UI - For consistency, use string int values for settings bools
This commit is contained in:
parent
778cfb8718
commit
ad48c820e2
12 changed files with 94 additions and 54 deletions
|
|
@ -260,7 +260,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
var settings = ActiveSliceSettings.Instance;
|
||||
activePrinter = new PrinterInfo
|
||||
{
|
||||
AutoConnectFlag = settings.DoAutoConnect(),
|
||||
AutoConnect = settings.DoAutoConnect(),
|
||||
BaudRate = settings.BaudRate(),
|
||||
ComPort = settings.ComPort(),
|
||||
DriverType = settings.DriverType(),
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace MatterHackers.MatterControl
|
|||
public void Save()
|
||||
{
|
||||
//Ordering matters - need to get Id for printer prior to loading slice presets
|
||||
this.ActivePrinter.AutoConnectFlag = true;
|
||||
this.ActivePrinter.AutoConnect = true;
|
||||
|
||||
// TODO: Review printerID int requirement
|
||||
int printerID;
|
||||
|
|
|
|||
|
|
@ -68,10 +68,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
ActiveSliceSettings.Instance.RunInTransaction(settings =>
|
||||
{
|
||||
settings.SetAutoConnect(ActivePrinter.AutoConnectFlag);
|
||||
settings.SetAutoConnect(ActivePrinter.AutoConnect);
|
||||
settings.SetBaudRate(ActivePrinter.BaudRate);
|
||||
settings.SetComPort(ActivePrinter.ComPort);
|
||||
settings.SetSlicingEngine(ActivePrinter.CurrentSlicingEngine);
|
||||
settings.SetDriverType(ActivePrinter.DriverType);
|
||||
settings.SetId(ActivePrinter.Id);
|
||||
settings.SetName(ActivePrinter.Name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue