Rename Connection.PrinterIsConnected -> Connection.IsConnected

This commit is contained in:
John Lewin 2018-02-01 14:51:44 -08:00
parent 028afd98d2
commit e998f137aa
15 changed files with 33 additions and 33 deletions

View file

@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public void Run(PrinterConnection printerConnection)
{
if (printerConnection.PrinterIsConnected)
if (printerConnection.IsConnected)
{
printerConnection.MacroStart();
printerConnection.QueueLine(GCode);

View file

@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
EventHandler unregisterEvents = null;
bool canChangeComPort = !printer.Connection.PrinterIsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
bool canChangeComPort = !printer.Connection.IsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
// The COM_PORT control is unique in its approach to the SlicerConfigName. It uses "com_port" settings name to
// bind to a context that will place it in the SliceSetting view but it binds its values to a machine
@ -83,7 +83,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
// Prevent droplist interaction when connected
printer.Connection.CommunicationStateChanged.RegisterEvent((s, e) =>
{
canChangeComPort = !printer.Connection.PrinterIsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
canChangeComPort = !printer.Connection.IsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
dropdownList.Enabled = canChangeComPort;
dropdownList.TextColor = canChangeComPort ? ActiveTheme.Instance.PrimaryTextColor : new Color(ActiveTheme.Instance.PrimaryTextColor, 150);
dropdownList.BorderColor = canChangeComPort ? ActiveTheme.Instance.SecondaryTextColor : new Color(ActiveTheme.Instance.SecondaryTextColor, 150);

View file

@ -33,7 +33,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
var theme = ApplicationController.Instance.Theme;
base.Initialize(tabIndex);
bool canChangeComPort = !printer.Connection.PrinterIsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
bool canChangeComPort = !printer.Connection.IsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
//This setting defaults to Manual
var selectedMachine = printer.Settings.GetValue(SettingsKey.selector_ip_address);
dropdownList = new DropDownList(selectedMachine, theme.Colors.PrimaryTextColor, maxHeight: 200, pointSize: theme.DefaultFontSize)
@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
// Prevent droplist interaction when connected
printer.Connection.CommunicationStateChanged.RegisterEvent((s, e) =>
{
canChangeComPort = !printer.Connection.PrinterIsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
canChangeComPort = !printer.Connection.IsConnected && printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect;
dropdownList.Enabled = canChangeComPort;
dropdownList.TextColor = canChangeComPort ? theme.Colors.PrimaryTextColor : new Color(theme.Colors.PrimaryTextColor, 150);
dropdownList.BorderColor = canChangeComPort ? theme.Colors.SecondaryTextColor : new Color(theme.Colors.SecondaryTextColor, 150);