Configure -> Printer prototype
- Issue MatterHackers/MCCentral#2408 Migrate SliceSettings -> Printer to Printer -> Setup
This commit is contained in:
parent
eb96abf727
commit
f1ea9113e8
8 changed files with 151 additions and 36 deletions
|
|
@ -34,6 +34,7 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.Platform;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.AboutPage;
|
||||
using MatterHackers.MatterControl.ActionBar;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
using MatterHackers.MatterControl.EeProm;
|
||||
|
|
@ -130,7 +131,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
|
||||
this.OverflowMenu.Name = "Printer Overflow Menu";
|
||||
this.OverflowMenu.DynamicPopupContent = GeneratePrinterOverflowMenu;
|
||||
this.OverflowMenu.DynamicPopupContent = () => GeneratePrinterOverflowMenu(theme);
|
||||
|
||||
ApplicationController.Instance.ActivePrinter.Connection.ConnectionSucceeded.RegisterEvent((s, e) =>
|
||||
{
|
||||
|
|
@ -150,7 +151,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
base.OnClosed(e);
|
||||
}
|
||||
|
||||
private GuiWidget GeneratePrinterOverflowMenu()
|
||||
private GuiWidget GeneratePrinterOverflowMenu(ThemeConfig theme)
|
||||
{
|
||||
var menuActions = new NamedAction[]
|
||||
{
|
||||
|
|
@ -181,6 +182,26 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}));
|
||||
}
|
||||
},
|
||||
new NamedAction()
|
||||
{
|
||||
Title = "Configure Printer".Localize(),
|
||||
Action = () =>
|
||||
{
|
||||
var partTabPage = this.Parents<PartTabPage>().FirstOrDefault();
|
||||
var dockingTabControl = partTabPage.FindNamedChildRecursive("DockingTabControl") as DockingTabControl;
|
||||
printer.ViewState.SliceSettingsTabIndex = 3;
|
||||
|
||||
dockingTabControl.AddPage(
|
||||
"Printer",
|
||||
new ConfigurePrinterWidget(partTabPage, theme)
|
||||
{
|
||||
BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor,
|
||||
Padding = new BorderDouble(top: 10),
|
||||
HAnchor = HAnchor.Stretch,
|
||||
VAnchor = VAnchor.Stretch,
|
||||
});
|
||||
}
|
||||
},
|
||||
new NamedAction() { Title = "----" },
|
||||
new NamedAction()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue