Extract embedded type to new file

This commit is contained in:
John Lewin 2018-11-13 08:10:04 -08:00
parent d3da0d64dc
commit 3ff4cf6d21
2 changed files with 78 additions and 43 deletions

View file

@ -37,49 +37,6 @@ using MatterHackers.MatterControl.SlicerConfiguration;
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
{
public class SelectActivePrinterPage : SelectablePrinterPage
{
private Action<PrinterConfig> printerSelected;
public SelectActivePrinterPage(string continueButtonText, Action<PrinterConfig> printerSelected)
: base(continueButtonText)
{
this.printerSelected = printerSelected;
InventoryTreeView.CreateOpenPrintersTree(rootPrintersNode, theme);
}
protected override void OnTreeNodeDoubleClicked(TreeNode treeNode)
{
if (treeNode.Tag is PrinterConfig printer)
{
this.OnContinue(treeNode);
}
base.OnTreeNodeDoubleClicked(treeNode);
}
protected override void OnTreeNodeSelected(TreeNode selectedNode)
{
if (selectedNode.Tag is PrinterConfig printerInfo)
{
nextButton.Enabled = true;
}
base.OnTreeNodeSelected(selectedNode);
}
protected override void OnContinue(TreeNode treeNode)
{
if (treeNode.Tag is PrinterConfig printer)
{
printerSelected.Invoke(printer);
base.OnContinue(treeNode);
}
}
}
public class OpenPrinterPage : SelectablePrinterPage
{
private Action<PrinterConfig> printerLoaded;