Move add printer logic to Part -> Print button

- Later make reusable from Add Hardware and Print button
- Issue MatterHackers/MCCentral#4294
This commit is contained in:
John Lewin 2018-10-16 11:41:30 -07:00
parent 57646852ee
commit 4174b0f77d
4 changed files with 22 additions and 18 deletions

View file

@ -119,14 +119,14 @@ namespace MatterHackers.MatterControl.PrintLibrary
StyledMessageBox.ShowMessageBox(
(deletePrinter) =>
{
if (deletePrinter)
{
if (treeView.SelectedNode.Tag is PrinterInfo printerInfo)
{
ProfileManager.Instance.DeletePrinter(printerInfo.ID, true);
}
}
},
if (deletePrinter)
{
if (treeView.SelectedNode.Tag is PrinterInfo printerInfo)
{
ProfileManager.Instance.DeletePrinter(printerInfo.ID, true);
}
}
},
"Are you sure you want to delete your currently selected printer?".Localize(),
"Delete Printer?".Localize(),
StyledMessageBox.MessageType.YES_NO,