diff --git a/MatterControlApplication.cs b/MatterControlApplication.cs index 3355bc5cb..0073a5dd5 100644 --- a/MatterControlApplication.cs +++ b/MatterControlApplication.cs @@ -100,6 +100,11 @@ namespace MatterHackers.MatterControl public static bool IsLoading { get; private set; } = true; + public static void RequestPowerShutDown() + { + // does nothing on windows + } + static MatterControlApplication() { if (OsInformation.OperatingSystem == OSType.Mac && StaticData.Instance == null) diff --git a/SetupWizard/AndroidSetupOptionsPage.cs b/SetupWizard/AndroidSetupOptionsPage.cs index e07c0b907..9b7e76e8b 100644 --- a/SetupWizard/AndroidSetupOptionsPage.cs +++ b/SetupWizard/AndroidSetupOptionsPage.cs @@ -34,6 +34,8 @@ using MatterHackers.Agg.UI; using MatterHackers.Localizations; using MatterHackers.MatterControl.PrinterCommunication; using MatterHackers.MatterControl.CustomWidgets; +using MatterHackers.Agg.PlatformAbstract; +using MatterHackers.Agg.ImageProcessing; namespace MatterHackers.MatterControl { @@ -56,6 +58,15 @@ namespace MatterHackers.MatterControl footerRow.AddChild(cancelButton); cancelButton.Text = "Back".Localize(); + +#if ANDROID_T7X + headerRow.AddChild(new HorizontalSpacer()); + var powerImage = StaticData.Instance.LoadIcon("power.png", 24, 24); + var powerButton = new TextImageButtonFactory() { FixedHeight = 32, Margin = new BorderDouble(0), borderWidth = 0 }.GenerateTooltipButton("", powerImage); + powerButton.Click += (s, e) => MatterControlApplication.RequestPowerShutDown(); + powerButton.VAnchor |= VAnchor.ParentCenter; + headerRow.AddChild(powerButton); +#endif } } diff --git a/StaticData/Icons/power.png b/StaticData/Icons/power.png new file mode 100644 index 000000000..0e246241c Binary files /dev/null and b/StaticData/Icons/power.png differ