From 2e74fe770c542dae72024a8d145e61d81432ee91 Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Mon, 21 Aug 2023 11:40:42 -0500 Subject: [PATCH] Update UIX --- ZuneHost.Wpf/MainWindow.xaml.cs | 4 +-- ZuneShell/Microsoft/Zune/Shell/StandAlone.cs | 37 +++++++++----------- libs/MicrosoftIris | 2 +- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/ZuneHost.Wpf/MainWindow.xaml.cs b/ZuneHost.Wpf/MainWindow.xaml.cs index 04bbb78..7416a3c 100644 --- a/ZuneHost.Wpf/MainWindow.xaml.cs +++ b/ZuneHost.Wpf/MainWindow.xaml.cs @@ -28,7 +28,7 @@ namespace ZuneHost.Wpf // Construct a single string of args. Be sure to skip executing path. var args = Environment.GetCommandLineArgs().Skip(1); #if DEBUG - args = args.Concat(new[] { "-debug:true" }); + args = args.Concat(new[] { $"-uixdebuguri", }); #endif string strArgs = string.Join(" ", args.ToArray()); @@ -76,7 +76,7 @@ namespace ZuneHost.Wpf } // Set decompiler breakponts - IrisApp.DebugSettings.DebugConnectionUri = "tcp://127.0.0.1:5556"; + IrisApp.DebugSettings.Breakpoints.Add(new("clr-res://ZuneShell!QuickplayStrip.uix", 172, 25, false)); IrisApp.DebugSettings.Breakpoints.Add(new("clr-res://ZuneMarketplaceResources!SelectionActions.uix", 121, 14, false)); IrisApp.DebugSettings.Breakpoints.Add(new("clr-res://ZuneShell!Quickplay.uix", 917, 62, false)); diff --git a/ZuneShell/Microsoft/Zune/Shell/StandAlone.cs b/ZuneShell/Microsoft/Zune/Shell/StandAlone.cs index 5d2711b..544d840 100644 --- a/ZuneShell/Microsoft/Zune/Shell/StandAlone.cs +++ b/ZuneShell/Microsoft/Zune/Shell/StandAlone.cs @@ -19,8 +19,8 @@ namespace Microsoft.Zune.Shell { WindowSize windowSize = new WindowSize(1012, 693); string str = null; - bool flag1 = false; - bool flag2 = false; + bool useNativeFrame = false; + bool minimized = false; Hashtable hashtable = new Hashtable(); bool flag3 = false; if (args != null) @@ -55,10 +55,10 @@ namespace Microsoft.Zune.Shell break; } case "minimized": - flag2 = true; + minimized = true; break; case "nativeframe": - flag1 = true; + useNativeFrame = true; break; case "animations": try @@ -70,11 +70,8 @@ namespace Microsoft.Zune.Shell { break; } - case "uixdebugpipe": - //Application.DebugSettings.OpenDebugPipe = true; - break; - case "uixdecomp": - //Application.DebugSettings.UseDecompiler = true; + case "uixdebuguri": + Application.DebugSettings.DebugConnectionUri = commandLineArgument.Value ?? Iris.Debug.DebugRemoting.DEFAULT_TCP_URI.OriginalString; break; case "uixtrace": try @@ -92,7 +89,7 @@ namespace Microsoft.Zune.Shell level = 1; cat = (Iris.Debug.TraceCategory)Enum.Parse(typeof(Iris.Debug.TraceCategory), commandLineArgument.Value); } - //Application.DebugSettings.TraceSettings.SetCategoryLevel(cat, level); + Application.DebugSettings.TraceSettings.SetCategoryLevel(cat, level); break; } catch (FormatException ex) @@ -130,29 +127,29 @@ namespace Microsoft.Zune.Shell object obj = Registry.GetValue(ZuneUI.Shell.SettingsRegistryPath, "WindowPosition", null); if (obj != null) { - if (obj is string) + if (obj is string initialPos) { try { - if (!flag2) - Application.Window.SetSavedInitialPosition((string)obj); + if (!minimized) + Application.Window.SetSavedInitialPosition(initialPos); else - Application.Window.SetSavedInitialPosition((string)obj, WindowState.Minimized); + Application.Window.SetSavedInitialPosition(initialPos, WindowState.Minimized); } - catch (ArgumentException ex) + catch (ArgumentException) { } } } Application.Window.RespectsStartupSettings = true; Application.Window.InitialPositionPolicy = WindowPositionPolicy.CenterOnWorkArea | WindowPositionPolicy.ConstrainToWorkArea; - Application.Window.ShowWindowFrame = flag1; + Application.Window.ShowWindowFrame = useNativeFrame; Application.Window.SetBackgroundColor(ZuneUI.Shell.WindowColorFromRGB(ClientConfiguration.Shell.BackgroundColor)); - if (!flag2) + if (!minimized) Application.DeferredInvoke(delegate - { - Windowing.ForceSetForegroundWindow(Application.Window.Handle); - }, DeferredInvokePriority.Low); + { + Windowing.ForceSetForegroundWindow(Application.Window.Handle); + }, DeferredInvokePriority.Low); return hashtable; } diff --git a/libs/MicrosoftIris b/libs/MicrosoftIris index 8835d0f..d0b65a5 160000 --- a/libs/MicrosoftIris +++ b/libs/MicrosoftIris @@ -1 +1 @@ -Subproject commit 8835d0f06802f77aa383609ec0afc2971c7957f0 +Subproject commit d0b65a58d765a76d6607adb30dae346cda89c357