Moving the ActivePrinterChanged call back and Active Printer calls all into ActivePrinterProfile

This commit is contained in:
larsbrubaker 2014-02-14 12:06:44 -08:00
parent 5036b364c0
commit 0040895615
21 changed files with 102 additions and 98 deletions

View file

@ -159,7 +159,7 @@ namespace MatterHackers.MatterControl.ActionBar
//this.AnchorAll();
this.AddChild(textContainer);
PrinterCommunication.Instance.ActivePrinterChanged.RegisterEvent(onActivePrinterChanged, ref unregisterEvents);
ActivePrinterProfile.Instance.ActivePrinterChanged.RegisterEvent(onActivePrinterChanged, ref unregisterEvents);
PrinterCommunication.Instance.ConnectionStateChanged.RegisterEvent(onActivePrinterChanged, ref unregisterEvents);
}
@ -194,9 +194,9 @@ namespace MatterHackers.MatterControl.ActionBar
string statusString = new LocalizedString("Status: {0}").Translated;
printerStatusText.Text = string.Format(statusString, PrinterCommunication.Instance.PrinterConnectionStatusVerbose);
}
if (PrinterCommunication.Instance.ActivePrinter != null)
if (ActivePrinterProfile.Instance.ActivePrinter != null)
{
printerNameText.Text = PrinterCommunication.Instance.ActivePrinter.Name;
printerNameText.Text = ActivePrinterProfile.Instance.ActivePrinter.Name;
}
else