From 944dafca1e3ce0d82b2c07ced1be6e0a1e6b1703 Mon Sep 17 00:00:00 2001 From: Mark Kromis <143529142+mkromis@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:58:58 -0500 Subject: [PATCH 1/2] catch exception on settings page Nuget updates --- .../MinoriDemo.Core/MinoriDemo.Core.csproj | 6 +- .../Extensions/QuadTreeExtension.cs | 5 +- .../Modules/VirtualCanvas/Models/HlsColor.cs | 4 +- .../Modules/VirtualCanvas/Models/LogWriter.cs | 2 +- .../ViewModels/VirtualCanvasViewModel.cs | 6 +- .../MinoriDemo.RibbonWPF.csproj | 4 +- .../Modules/Themes/ThemeHelper.cs | 4 +- .../Modules/VirtualCanvas/Models/TestShape.cs | 22 ++-- .../Views/ThemeEditorView.xaml.cs | 4 +- .../MinoriDemo.WPF/MinoriDemo.WPF.csproj | 4 +- .../SimpleDemo.Core/SimpleDemo.Core.csproj | 4 +- .../SimpleDemo.RibbonWPF.csproj | 4 +- .../SimpleDemo.WPF/SimpleDemo.WPF.csproj | 6 +- .../Controls/MesClippingHwndHost.cs | 12 +- .../Controls/MesHwndMouse.cs | 2 +- .../Controls/MesHwndWrapper.cs | 2 +- .../Controls/MesLayoutInitializer.cs | 2 +- .../Core/MesWpfSetup.cs | 16 +-- .../MesPersistedDocument.cs | 2 +- .../MinoriEditorShell.Platforms.Wpf.csproj | 81 ++++++------ .../Services/MesResourceManager.cs | 6 +- .../Services/MesThemeManager.cs | 23 ++-- .../ShaderEffects/MesShaderEffectBase.cs | 2 +- .../ShaderEffects/MesShaderEffectUtility.cs | 2 +- .../Themes/MesThemeBase.cs | 6 +- .../Views/MesLayoutUtility.cs | 4 +- .../Views/MesWindow.cs | 2 +- .../MinoriEditorShell.Ribbon.csproj | 45 +++---- .../Controls/MesVirtualCanvas.cs | 69 ++++------ .../Gestures/MesAutoScroll.cs | 24 ++-- .../Gestures/MesExponentialAnimation.cs | 25 ++-- .../Gestures/MesMapZoom.cs | 22 ++-- .../Gestures/MesRectangleSelectionGesture.cs | 2 +- .../Gestures/MesSelectionRectVisual.cs | 8 +- ...orShell.VirtualCanvas.Platforms.Wpf.csproj | 49 +++---- .../Models/MesPerfTimer.cs | 8 +- .../MinoriEditorShell.VirtualCanvas.csproj | 42 +++--- .../Models/MesQuadNode.cs | 2 +- .../Models/MesQuadTree.cs | 22 +--- .../Models/MesQuadrant.cs | 46 +++---- .../DataClasses/MesSettingsTreeItem.cs | 4 +- .../Extensions/IocProviderExtensions.cs | 2 +- .../MinoriEditorShell.csproj | 122 +++++++++--------- Modules/MinoriEditorShell/Results/MesShow.cs | 4 +- .../Services/MesLayoutItemStatePersister.cs | 8 +- .../ViewModels/MesDocumentManagerViewModel.cs | 9 +- .../ViewModels/MesGeneralSettingsViewModel.cs | 4 +- .../ViewModels/MesSettingsManagerViewModel.cs | 2 +- ...inoriEditorShell.Platforms.WpfTests.csproj | 12 +- .../MinoriEditorShell.RibbonTests.csproj | 12 +- .../CultureInfoNameConverterTests.cs | 3 +- .../MinoriEditorShellTests.csproj | 8 +- 52 files changed, 369 insertions(+), 422 deletions(-) diff --git a/Demos/MinoriDemo/MinoriDemo.Core/MinoriDemo.Core.csproj b/Demos/MinoriDemo/MinoriDemo.Core/MinoriDemo.Core.csproj index 397d648d..e19f5d20 100644 --- a/Demos/MinoriDemo/MinoriDemo.Core/MinoriDemo.Core.csproj +++ b/Demos/MinoriDemo/MinoriDemo.Core/MinoriDemo.Core.csproj @@ -12,9 +12,9 @@ - - - + + + diff --git a/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Extensions/QuadTreeExtension.cs b/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Extensions/QuadTreeExtension.cs index 0e191de0..8ab5bf0a 100644 --- a/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Extensions/QuadTreeExtension.cs +++ b/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Extensions/QuadTreeExtension.cs @@ -7,10 +7,7 @@ public static class QuadTreeExtension { public static void Dump(this IMesQuadTree source, LogWriter w) where T : class { - if (source.Root != null) - { - source.Root.Dump(w); - } + source.Root?.Dump(w); } } } \ No newline at end of file diff --git a/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/HlsColor.cs b/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/HlsColor.cs index aa0e6b3e..31158517 100644 --- a/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/HlsColor.cs +++ b/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/HlsColor.cs @@ -35,7 +35,7 @@ public HlsColor(Color color) min = Math.Min(Math.Min(r, g), b); sum = max + min; - Luminosity = (((sum * HLSMax) + RGBMax) / (2 * RGBMax)); + Luminosity = ((sum * HLSMax) + RGBMax) / (2 * RGBMax); dif = max - min; if (dif == 0) @@ -62,7 +62,7 @@ public HlsColor(Color color) { Hue = g == max ? (HLSMax / 3) + Rdelta - Bdelta - : ((2 * HLSMax) / 3) + Gdelta - Rdelta; + : (2 * HLSMax / 3) + Gdelta - Rdelta; } if (Hue < 0) diff --git a/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/LogWriter.cs b/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/LogWriter.cs index ae16ae45..cc5be101 100644 --- a/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/LogWriter.cs +++ b/Demos/MinoriDemo/MinoriDemo.Core/Modules/VirtualCanvas/Models/LogWriter.cs @@ -11,7 +11,7 @@ public class LogWriter : IDisposable public LogWriter(TextWriter w) { - XmlWriterSettings s = new XmlWriterSettings + XmlWriterSettings s = new() { Indent = true }; diff --git a/Demos/MinoriDemo/MinoriDemo.Core/ViewModels/VirtualCanvasViewModel.cs b/Demos/MinoriDemo/MinoriDemo.Core/ViewModels/VirtualCanvasViewModel.cs index 5208014e..31cde44c 100644 --- a/Demos/MinoriDemo/MinoriDemo.Core/ViewModels/VirtualCanvasViewModel.cs +++ b/Demos/MinoriDemo/MinoriDemo.Core/ViewModels/VirtualCanvasViewModel.cs @@ -140,7 +140,7 @@ private void AllocateNodes() // Fill a sparse grid of rectangular color palette nodes with each tile being 50x30. // with hue across x-axis and saturation on y-axis, brightness is fixed at 100; - Random r = new Random(Environment.TickCount); + Random r = new(Environment.TickCount); Graph.VirtualChildren.Clear(); Double w = _tileWidth + _tileMargin; Double h = _tileHeight + _tileMargin; @@ -152,8 +152,8 @@ private void AllocateNodes() Double x = r.NextDouble() * width; Double y = r.NextDouble() * height; - PointF pos = new PointF((Single)(_tileMargin + x), (Single)(_tileMargin + y)); - SizeF size = new SizeF(r.Next((Int32)_tileWidth, (Int32)_tileWidth * 5), + PointF pos = new((Single)(_tileMargin + x), (Single)(_tileMargin + y)); + SizeF size = new(r.Next((Int32)_tileWidth, (Int32)_tileWidth * 5), r.Next((Int32)_tileHeight, (Int32)_tileHeight * 5)); TestShapeType type = (TestShapeType)r.Next(0, (Int32)TestShapeType.Last); diff --git a/Demos/MinoriDemo/MinoriDemo.RibbonWPF/MinoriDemo.RibbonWPF.csproj b/Demos/MinoriDemo/MinoriDemo.RibbonWPF/MinoriDemo.RibbonWPF.csproj index c18de2de..4ebb3200 100644 --- a/Demos/MinoriDemo/MinoriDemo.RibbonWPF/MinoriDemo.RibbonWPF.csproj +++ b/Demos/MinoriDemo/MinoriDemo.RibbonWPF/MinoriDemo.RibbonWPF.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/Demos/MinoriDemo/MinoriDemo.RibbonWpf/Modules/Themes/ThemeHelper.cs b/Demos/MinoriDemo/MinoriDemo.RibbonWpf/Modules/Themes/ThemeHelper.cs index 9a178e58..6a34afea 100644 --- a/Demos/MinoriDemo/MinoriDemo.RibbonWpf/Modules/Themes/ThemeHelper.cs +++ b/Demos/MinoriDemo/MinoriDemo.RibbonWpf/Modules/Themes/ThemeHelper.cs @@ -18,7 +18,7 @@ public class ThemeHelper /// public IDictionary GetBrushes() { - SortedDictionary results = new SortedDictionary(); + SortedDictionary results = []; // Get theme dict ResourceDictionary theme = CurrentThemeDictionary; @@ -71,7 +71,7 @@ public String ExportString() throw new InvalidOperationException("CurrentThemeDictionary"); } - StringBuilder export = new StringBuilder(); + StringBuilder export = new(); export.AppendLine("> select = brushes .Where(x => x.Key.ToLower().Contains(search.Text.ToLower())); - SortedDictionary result = new SortedDictionary(); + SortedDictionary result = []; foreach (KeyValuePair item in select) { result[item.Key] = item.Value; } UpdateList(result); diff --git a/Demos/MinoriDemo/MinoriDemo.WPF/MinoriDemo.WPF.csproj b/Demos/MinoriDemo/MinoriDemo.WPF/MinoriDemo.WPF.csproj index e4a79e68..27f35f61 100644 --- a/Demos/MinoriDemo/MinoriDemo.WPF/MinoriDemo.WPF.csproj +++ b/Demos/MinoriDemo/MinoriDemo.WPF/MinoriDemo.WPF.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/Demos/SimpleDemo/SimpleDemo.Core/SimpleDemo.Core.csproj b/Demos/SimpleDemo/SimpleDemo.Core/SimpleDemo.Core.csproj index 66145586..b50a7da1 100644 --- a/Demos/SimpleDemo/SimpleDemo.Core/SimpleDemo.Core.csproj +++ b/Demos/SimpleDemo/SimpleDemo.Core/SimpleDemo.Core.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/Demos/SimpleDemo/SimpleDemo.RibbonWPF/SimpleDemo.RibbonWPF.csproj b/Demos/SimpleDemo/SimpleDemo.RibbonWPF/SimpleDemo.RibbonWPF.csproj index 2b31c91c..158ceb57 100644 --- a/Demos/SimpleDemo/SimpleDemo.RibbonWPF/SimpleDemo.RibbonWPF.csproj +++ b/Demos/SimpleDemo/SimpleDemo.RibbonWPF/SimpleDemo.RibbonWPF.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/Demos/SimpleDemo/SimpleDemo.WPF/SimpleDemo.WPF.csproj b/Demos/SimpleDemo/SimpleDemo.WPF/SimpleDemo.WPF.csproj index 8e98cfe2..f739e595 100644 --- a/Demos/SimpleDemo/SimpleDemo.WPF/SimpleDemo.WPF.csproj +++ b/Demos/SimpleDemo/SimpleDemo.WPF/SimpleDemo.WPF.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesClippingHwndHost.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesClippingHwndHost.cs index fa65d6dc..b81a5723 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesClippingHwndHost.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesClippingHwndHost.cs @@ -22,10 +22,7 @@ private static void OnContentChanged(DependencyObject d, DependencyPropertyChang if (e.OldValue != null) { - if (hwndHost._source != null) - { - hwndHost._source.RootVisual = null; - } + hwndHost._source?.RootVisual = null; hwndHost.RemoveLogicalChild(e.OldValue); } @@ -33,10 +30,7 @@ private static void OnContentChanged(DependencyObject d, DependencyPropertyChang if (e.NewValue != null) { hwndHost.AddLogicalChild(e.NewValue); - if (hwndHost._source != null) - { - hwndHost._source.RootVisual = (Visual)e.NewValue; - } + hwndHost._source?.RootVisual = (Visual)e.NewValue; } } @@ -59,7 +53,7 @@ protected override IEnumerator LogicalChildren protected override HandleRef BuildWindowCore(HandleRef hwndParent) { - HwndSourceParameters param = new HwndSourceParameters("MinoriEditorStudioClippingHwndHost", (Int32)Width, (Int32)Height) + HwndSourceParameters param = new("MinoriEditorStudioClippingHwndHost", (Int32)Width, (Int32)Height) { ParentWindow = hwndParent.Handle, WindowStyle = NativeMethods.WS_VISIBLE | NativeMethods.WS_CHILD, diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndMouse.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndMouse.cs index bb66d1b3..9253a9c5 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndMouse.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndMouse.cs @@ -8,7 +8,7 @@ public static class MesHwndMouse { public static Point GetCursorPosition() { - NativeMethods.NativePoint point = new NativeMethods.NativePoint(); + NativeMethods.NativePoint point = new(); NativeMethods.GetCursorPos(ref point); return new Point(point.X, point.Y); } diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndWrapper.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndWrapper.cs index ab202cb0..ffc55705 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndWrapper.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesHwndWrapper.cs @@ -46,7 +46,7 @@ public abstract class MesHwndWrapper : HwndHost private Point _previousPosition; // Track the mouse state - private readonly MesHwndMouseState _mouseState = new MesHwndMouseState(); + private readonly MesHwndMouseState _mouseState = new(); // Tracking whether we've "capture" the mouse private bool _isMouseCaptured; diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesLayoutInitializer.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesLayoutInitializer.cs index e755b9f9..62b2921c 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesLayoutInitializer.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Controls/MesLayoutInitializer.cs @@ -65,7 +65,7 @@ private static LayoutAnchorablePane CreateAnchorablePane(LayoutRoot layout, Orie String paneName, InsertPosition position) { LayoutPanel parent = layout.Descendents().OfType().First(d => d.Orientation == orientation); - LayoutAnchorablePane toolsPane = new LayoutAnchorablePane { Name = paneName }; + LayoutAnchorablePane toolsPane = new() { Name = paneName }; if (position == InsertPosition.Start) { parent.InsertChildAt(0, toolsPane); diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Core/MesWpfSetup.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Core/MesWpfSetup.cs index c49f31b0..96d052f4 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Core/MesWpfSetup.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Core/MesWpfSetup.cs @@ -35,11 +35,9 @@ public abstract class MesWpfSetup : MvxWpfSetup /// /// Control of the main windows for wpf /// - protected override IMvxWpfViewPresenter CreateViewPresenter(ContentControl root) - { + protected override IMvxWpfViewPresenter CreateViewPresenter(ContentControl root) => // This handles main window. - return new MesWpfPresenter(root); - } + new MesWpfPresenter(root); /// /// Load any additional plugins, calling parent @@ -117,7 +115,7 @@ public override void InitializeSecondary() { _messenger = Mvx.IoCProvider.Resolve(); Properties.Settings.Default.PropertyChanged += (s, e) => { - MesSettingsChangedMessage message = new MesSettingsChangedMessage( + MesSettingsChangedMessage message = new( s, e.PropertyName, Properties.Settings.Default.PropertyValues[e.PropertyName]); _messenger.Publish(message); @@ -127,12 +125,12 @@ public override void InitializeSecondary() { public abstract class MesWpfSetup : MesWpfSetup where TApplication : class, IMvxApplication, new() { protected override IMvxApplication CreateApp(IMvxIoCProvider iocProvider) => iocProvider.IoCConstruct(); - public override IEnumerable GetViewModelAssemblies() => new[] { typeof(TApplication).GetTypeInfo().Assembly }; + public override IEnumerable GetViewModelAssemblies() => [typeof(TApplication).GetTypeInfo().Assembly]; } - ///// - ///// By default, we are configured to use MEF - ///// + /// + /// By default, we are configured to use MEF + /// //protected override void Configure() //{ // // Add all assemblies to AssemblySource (using a temporary DirectoryCatalog). diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/MesPersistedDocument.cs b/Modules/MinoriEditorShell.Platforms.Wpf/MesPersistedDocument.cs index cce6ae99..1c8bb2f1 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/MesPersistedDocument.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/MesPersistedDocument.cs @@ -38,7 +38,7 @@ public override void CanClose(System.Action callback) } #endif - private void UpdateDisplayName() => DisplayName = (IsDirty) ? FileName + "*" : FileName; + private void UpdateDisplayName() => DisplayName = IsDirty ? FileName + "*" : FileName; public async Task New(String fileName) { diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/MinoriEditorShell.Platforms.Wpf.csproj b/Modules/MinoriEditorShell.Platforms.Wpf/MinoriEditorShell.Platforms.Wpf.csproj index 028d52c7..80215c9c 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/MinoriEditorShell.Platforms.Wpf.csproj +++ b/Modules/MinoriEditorShell.Platforms.Wpf/MinoriEditorShell.Platforms.Wpf.csproj @@ -1,47 +1,48 @@  - - net8.0-windows - - MinoriEditorStudio is an application shell similar in concept to the Visual Studio Shell. - This uses AvalonDock and has an MVVM architecture based on MvvmCross. - - latest - Copyright© 2019-2025 - https://github.com/TorisanKitsune/MinoriEditorShell - https://github.com/TorisanKitsune/MinoriEditorShell - - git - .net40 netcoreapp WPF MvvmCross AvalonDock Visual Studio IDE Shell - true - Mark Kromis - Mark Kromis - Library - bin\MinoriEditorShell.xml - true - + + net8.0-windows + + MinoriEditorStudio is an application shell similar in concept to the Visual Studio Shell. + This uses AvalonDock and has an MVVM architecture based on MvvmCross. + + latest + Copyright© 2019-2026 + https://github.com/TorisanKitsune/MinoriEditorShell + https://github.com/TorisanKitsune/MinoriEditorShell + + git + .net40 netcoreapp WPF MvvmCross AvalonDock Visual Studio IDE Shell + true + Mark Kromis + Mark Kromis + Library + bin\MinoriEditorShell.xml + true + CS1591 + - - - - - - + + + + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesResourceManager.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesResourceManager.cs index 18dc8608..cdb60d0c 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesResourceManager.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesResourceManager.cs @@ -18,9 +18,7 @@ public Stream GetStream(String relativeUri, String assemblyName) StreamResourceInfo resource = Application.GetResourceStream(new Uri(assemblyName + ";component/" + relativeUri, UriKind.Relative)) ?? Application.GetResourceStream(new Uri(relativeUri, UriKind.Relative)); - return (resource != null) - ? resource.Stream - : null; + return resource?.Stream; } catch { @@ -35,7 +33,7 @@ public BitmapImage GetBitmap(string relativeUri, string assemblyName) using (s) { - BitmapImage bmp = new BitmapImage(); + BitmapImage bmp = new(); bmp.BeginInit(); bmp.StreamSource = s; bmp.EndInit(); diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesThemeManager.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesThemeManager.cs index 12fc3dc0..16921d69 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesThemeManager.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Services/MesThemeManager.cs @@ -67,22 +67,27 @@ public Boolean SetCurrentTheme(String name, Boolean applySetting) if (appTheme == null) { - appTheme = new ResourceDictionary(); + appTheme = []; Application.Current.Resources.MergedDictionaries.Add(appTheme); } - appTheme.BeginInit(); - - appTheme.MergedDictionaries.Clear(); - foreach (Uri uri in theme.ApplicationResources) + try { + appTheme.BeginInit(); + + appTheme.MergedDictionaries.Clear(); + foreach (Uri uri in theme.ApplicationResources) + { + ResourceDictionary newDict = new() { Source = uri }; + appTheme.MergedDictionaries.Add(newDict); + } + appTheme.EndInit(); + } catch (Exception ex) { - ResourceDictionary newDict = new ResourceDictionary { Source = uri }; - appTheme.MergedDictionaries.Add(newDict); + _log?.LogError(ex, "Error applying theme: {Name} resources", name); } - appTheme.EndInit(); }); - _log?.LogInformation($"Theme set to {name}"); + _log?.LogInformation("Theme set to {name}", name); // publish event _messenger.Publish(new MesThemeChangeMessage(this, CurrentTheme.Name)); diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectBase.cs b/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectBase.cs index 6cc89a6b..7cd9e839 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectBase.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectBase.cs @@ -9,7 +9,7 @@ public class MesShaderEffectBase : ShaderEffect, IDisposable [ThreadStatic] private static PixelShader _shader; - private static PixelShader Shader => _shader ?? (_shader = MesShaderEffectUtility.GetPixelShader(typeof(T).Name)); + private static PixelShader Shader => _shader ??= MesShaderEffectUtility.GetPixelShader(typeof(T).Name); protected MesShaderEffectBase() => PixelShader = Shader; diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectUtility.cs b/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectUtility.cs index d0645520..ab0baa12 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectUtility.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/ShaderEffects/MesShaderEffectUtility.cs @@ -5,7 +5,7 @@ namespace MinoriEditorShell.Platforms.Wpf.ShaderEffects { internal static class MesShaderEffectUtility { - public static PixelShader GetPixelShader(string name) => new PixelShader + public static PixelShader GetPixelShader(string name) => new() { UriSource = new Uri($@"pack://application:,,,/MinoriEditorStudio;component/Framework/ShaderEffects/{name}.ps") }; diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Themes/MesThemeBase.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Themes/MesThemeBase.cs index 5011a9f6..7e46545f 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Themes/MesThemeBase.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Themes/MesThemeBase.cs @@ -36,10 +36,6 @@ public abstract class MesThemeBase : IMesTheme /// /// Setup base load definition /// - protected MesThemeBase() - { - // Initialize the base Mahapps.Metro resources. - _resources = new List(); - } + protected MesThemeBase() => _resources = []; } } \ No newline at end of file diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesLayoutUtility.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesLayoutUtility.cs index 4ffe6197..3ce9c040 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesLayoutUtility.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesLayoutUtility.cs @@ -12,7 +12,7 @@ internal static class MesLayoutUtility { public static void SaveLayout(DockingManager manager, Stream stream) { - XmlLayoutSerializer layoutSerializer = new XmlLayoutSerializer(manager); + XmlLayoutSerializer layoutSerializer = new(manager); layoutSerializer.Serialize(stream); } @@ -20,7 +20,7 @@ public static void LoadLayout( DockingManager manager, Stream stream, Action addDocumentCallback, Action addToolCallback, Dictionary items) { - XmlLayoutSerializer layoutSerializer = new XmlLayoutSerializer(manager); + XmlLayoutSerializer layoutSerializer = new(manager); layoutSerializer.LayoutSerializationCallback += (s, e) => { diff --git a/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesWindow.cs b/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesWindow.cs index 1c2de5ab..c2435e7f 100644 --- a/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesWindow.cs +++ b/Modules/MinoriEditorShell.Platforms.Wpf/Views/MesWindow.cs @@ -104,7 +104,7 @@ private void MesWindow_Loaded(Object sender, RoutedEventArgs e) IMesTheme theme = manager.Themes.FirstOrDefault(x => x.GetType().Name == themeName); // Set to defualt if missing or error - if (theme == null) theme = manager.Themes.First(x => x.GetType().Name == themeName); + theme ??= manager.Themes.First(x => x.GetType().Name == themeName); manager.SetCurrentTheme(theme.Name); diff --git a/Modules/MinoriEditorShell.Ribbon/MinoriEditorShell.Ribbon.csproj b/Modules/MinoriEditorShell.Ribbon/MinoriEditorShell.Ribbon.csproj index fbe9c68d..1076846f 100644 --- a/Modules/MinoriEditorShell.Ribbon/MinoriEditorShell.Ribbon.csproj +++ b/Modules/MinoriEditorShell.Ribbon/MinoriEditorShell.Ribbon.csproj @@ -1,27 +1,28 @@  - - net8.0-windows - true - Mark Kromis - Mark Kromis - latest - Copyright© 2019-2025 - Use a Mahapp.Metro window with Fluent.Ribbon easy - https://github.com/TorisanKitsune/MinoriEditorShell - https://github.com/TorisanKitsune/MinoriEditorShell - Git - Ribbon Mahapp IDE - true - + + net8.0-windows + true + Mark Kromis + Mark Kromis + latest + Copyright© 2019-2025 + Use a Mahapp.Metro window with Fluent.Ribbon easy + https://github.com/TorisanKitsune/MinoriEditorShell + https://github.com/TorisanKitsune/MinoriEditorShell + Git + Ribbon Mahapp IDE + true + CS1591 + - - - + + + - - - - - + + + + + \ No newline at end of file diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Controls/MesVirtualCanvas.cs b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Controls/MesVirtualCanvas.cs index f67182dc..0fd4121f 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Controls/MesVirtualCanvas.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Controls/MesVirtualCanvas.cs @@ -33,12 +33,13 @@ public class MesVirtualCanvas : VirtualizingPanel, IScrollInfo, IMesVirtualCanva private System.Windows.Size _viewPortSize; public IMesQuadTree Index { get; private set; } private ObservableCollection _children; - private readonly IList _dirtyRegions = new List(); - private readonly IList _visibleRegions = new List(); + private readonly IList _dirtyRegions = []; + private readonly IList _visibleRegions = []; private IDictionary _visualPositions; private Int32 _nodeCollectCycle; - public static DependencyProperty VirtualChildProperty = DependencyProperty.Register("VirtualChild", typeof(IMesVirtualChild), typeof(MesVirtualCanvas)); + public static DependencyProperty VirtualChildProperty = + DependencyProperty.Register("VirtualChild", typeof(IMesVirtualChild), typeof(MesVirtualCanvas)); public event EventHandler VisualsChanged; @@ -50,18 +51,20 @@ public class MesVirtualCanvas : VirtualizingPanel, IScrollInfo, IMesVirtualCanva public MesVirtualCanvas() { Index = new MesQuadTree(); - _children = new ObservableCollection(); + _children = []; _children.CollectionChanged += new NotifyCollectionChangedEventHandler(OnChildrenCollectionChanged); // Set default back color - _contentCanvas = new MesContentCanvas(); - _contentCanvas.Background = System.Windows.Media.Brushes.White; + _contentCanvas = new MesContentCanvas + { + Background = System.Windows.Media.Brushes.White + }; // Setup boarder Backdrop = new Border(); _contentCanvas.Children.Add(Backdrop); - TransformGroup g = new TransformGroup(); + TransformGroup g = new(); Scale = new ScaleTransform(); Translate = new TranslateTransform(); g.Children.Add(Scale); @@ -148,7 +151,7 @@ public ObservableCollection VirtualChildren { _children.CollectionChanged -= new NotifyCollectionChangedEventHandler(OnChildrenCollectionChanged); } - _children = value ?? throw new ArgumentNullException("value"); + _children = value ?? throw new ArgumentNullException(nameof(value)); _children.CollectionChanged += new NotifyCollectionChangedEventHandler(OnChildrenCollectionChanged); RebuildVisuals(); } @@ -167,7 +170,7 @@ public SizeF SmallScrollIncrement /// Add a new IVirtualChild. The VirtualCanvas will call CreateVisual on them /// when the Bounds of your child intersects the current visible view port. /// - /// + /// public void AddVirtualChild(IMesVirtualChild child) => _children.Add(child); /// @@ -175,14 +178,14 @@ public SizeF SmallScrollIncrement /// /// The bounds to test /// The list of virtual children found or null if there are none - public IEnumerable GetChildrenIntersecting(RectangleF bounds) => Index != null ? Index.GetNodesInside(bounds) : null; + public IEnumerable GetChildrenIntersecting(RectangleF bounds) => Index?.GetNodesInside(bounds); /// /// Return true if there are any virtual children inside the given bounds. /// /// The bounds to test /// True if a node is found whose bounds intersect the given bounds - public Boolean HasChildrenIntersecting(RectangleF bounds) => Index != null ? Index.HasNodesInside(bounds) : false; + public Boolean HasChildrenIntersecting(RectangleF bounds) => Index != null && Index.HasNodesInside(bounds); /// /// The number of visual children that are visible right now. @@ -219,7 +222,7 @@ public SizeF SmallScrollIncrement /// private void CalculateExtent() { - if (_children.Count() == 0) + if (_children.Count == 0) { _contentCanvas.Width = 0; _contentCanvas.Height = 0; @@ -253,10 +256,7 @@ private void CalculateExtent() } // This is an expensive solution, need to re-visit this later. - c.BoundsChanged += (s, e) => - { - RebuildVisuals(); - }; + c.BoundsChanged += (s, e) => RebuildVisuals(); } // Get extents @@ -295,10 +295,7 @@ private void CalculateExtent() Backdrop.Height = h; } - if (ScrollOwner != null) - { - ScrollOwner.InvalidateScrollInfo(); - } + ScrollOwner?.InvalidateScrollInfo(); if (rebuild) { @@ -331,14 +328,9 @@ protected override System.Windows.Size MeasureOverride(System.Windows.Size avail child.Measure(new System.Windows.Size(boundSize.Width, boundSize.Height)); } } - if (Double.IsInfinity(availableSize.Width)) - { - return new System.Windows.Size(Extent.Width, Extent.Height); - } - else - { - return availableSize; - } + return Double.IsInfinity(availableSize.Width) + ? new System.Windows.Size(Extent.Width, Extent.Height) + : availableSize; } /// @@ -374,11 +366,8 @@ protected override System.Windows.Size ArrangeOverride(System.Windows.Size final /// private void StartLazyUpdate() { - if (_timer == null) - { - _timer = new DispatcherTimer(TimeSpan.FromMilliseconds(10), DispatcherPriority.Normal, + _timer ??= new DispatcherTimer(TimeSpan.FromMilliseconds(10), DispatcherPriority.Normal, new EventHandler(OnStartLazyUpdate), Dispatcher); - } _timer.Start(); } @@ -458,7 +447,7 @@ private void LazyUpdateVisuals() /// Returns the new quantum to use next time that will more likely hit the ideal time private static Int32 SelfThrottlingWorker(Int32 quantum, Int32 idealDuration, QuantizedWorkHandler handler) { - MesPerfTimer timer = new MesPerfTimer(); + MesPerfTimer timer = new(); timer.Start(); Int32 count = handler(quantum); @@ -467,8 +456,8 @@ private static Int32 SelfThrottlingWorker(Int32 quantum, Int32 idealDuration, Qu if (duration > 0 && count > 0) { - Int64 estimatedFullDuration = duration * (quantum / count); - Int64 newQuanta = (quantum * idealDuration) / estimatedFullDuration; + Int64 estimatedFullDuration = quantum / count * duration; + Int64 newQuanta = quantum * idealDuration / estimatedFullDuration; quantum = Math.Max(100, (Int32)Math.Min(newQuanta, Int32.MaxValue)); } @@ -601,7 +590,7 @@ public void EnsureVisual(IMesVirtualChild child) if (max == c.Count - 1) { UIElement v = c[max]; - if (!(v.GetValue(VirtualChildProperty) is IMesVirtualChild maxchild) || position > _visualPositions[maxchild]) + if (v.GetValue(VirtualChildProperty) is not IMesVirtualChild maxchild || position > _visualPositions[maxchild]) { // Then we have a new last child! max++; @@ -952,13 +941,7 @@ private void OnScrollChanged() /// /// Tell the ScrollViewer to update the scrollbars because, extent, zoom or translate has changed. /// - public void InvalidateScrollInfo() - { - if (ScrollOwner != null) - { - ScrollOwner.InvalidateScrollInfo(); - } - } + public void InvalidateScrollInfo() => ScrollOwner?.InvalidateScrollInfo(); /// /// Add the current visible rect to the list of regions to process diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesAutoScroll.cs b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesAutoScroll.cs index c4c4ce5b..4c90e4d5 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesAutoScroll.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesAutoScroll.cs @@ -58,8 +58,8 @@ private void OnMouseMove(Object sender, MouseEventArgs e) if (_autoScrolling) { Point pt = e.GetPosition(_container); - Vector v = new Vector(pt.X - _startPos.X, pt.Y - _startPos.Y); - Vector v2 = new Vector(pt.X - _startPos.X, _startPos.Y); + Vector v = new(pt.X - _startPos.X, pt.Y - _startPos.Y); + Vector v2 = new(pt.X - _startPos.X, _startPos.Y); Double angle = Vector.AngleBetween(v, v2); // Calculate which quadrant the mouse is in relative to start position. @@ -130,7 +130,7 @@ private void OnMouseDown(Object sender, MouseButtonEventArgs e) if (_marker == null) { _marker = new Canvas(); - Ellipse sign = new Ellipse(); + Ellipse sign = new(); Brush brush = new SolidColorBrush(Color.FromArgb(0x90, 0x90, 0x90, 0x90)); sign.Stroke = brush; sign.StrokeThickness = 2; @@ -138,35 +138,35 @@ private void OnMouseDown(Object sender, MouseButtonEventArgs e) sign.Height = 40; _marker.Children.Add(sign); - Polygon down = new Polygon + Polygon down = new() { - Points = new PointCollection(new Point[] { new Point(20 - 6, 28), new Point(20 + 6, 28), new Point(20, 34) }), + Points = new PointCollection(new Point[] { new(20 - 6, 28), new(20 + 6, 28), new(20, 34) }), Fill = brush }; _marker.Children.Add(down); - Polygon up = new Polygon + Polygon up = new() { - Points = new PointCollection(new Point[] { new Point(20 - 6, 12), new Point(20 + 6, 12), new Point(20, 6) }), + Points = new PointCollection(new Point[] { new(20 - 6, 12), new(20 + 6, 12), new(20, 6) }), Fill = brush }; _marker.Children.Add(up); - Polygon left = new Polygon + Polygon left = new() { - Points = new PointCollection(new Point[] { new Point(28, 20 - 6), new Point(28, 20 + 6), new Point(34, 20) }), + Points = new PointCollection(new Point[] { new(28, 20 - 6), new(28, 20 + 6), new(34, 20) }), Fill = brush }; _marker.Children.Add(left); - Polygon right = new Polygon + Polygon right = new() { - Points = new PointCollection(new Point[] { new Point(12, 20 - 6), new Point(12, 20 + 6), new Point(6, 20) }), + Points = new PointCollection(new Point[] { new(12, 20 - 6), new(12, 20 + 6), new(6, 20) }), Fill = brush }; _marker.Children.Add(right); - Ellipse dot = new Ellipse + Ellipse dot = new() { Fill = brush, Width = 3, diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesExponentialAnimation.cs b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesExponentialAnimation.cs index 103efd00..7d4f6cdc 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesExponentialAnimation.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesExponentialAnimation.cs @@ -93,11 +93,10 @@ public Double Power /// /// /// - /// + /// /// protected override Double GetCurrentValueCore(Double defaultOriginValue, Double defaultDestinationValue, AnimationClock animationClock) { - Double returnValue; Double start = (Double)From; Double delta = (Double)To - start; Double timeFraction = animationClock.CurrentProgress.Value; @@ -105,21 +104,13 @@ protected override Double GetCurrentValueCore(Double defaultOriginValue, Double { return (Double)To; } - switch (EdgeBehavior) - { - case EdgeBehavior.EaseIn: - returnValue = EaseIn(timeFraction, start, delta, Power); - break; - - case EdgeBehavior.EaseOut: - returnValue = EaseOut(timeFraction, start, delta, Power); - break; - case EdgeBehavior.EaseInOut: - default: - returnValue = EaseInOut(timeFraction, start, delta, Power); - break; - } + Double returnValue = EdgeBehavior switch + { + EdgeBehavior.EaseIn => EaseIn(timeFraction, start, delta, Power), + EdgeBehavior.EaseOut => EaseOut(timeFraction, start, delta, Power), + _ => EaseInOut(timeFraction, start, delta, Power), + }; return returnValue; } @@ -184,7 +175,7 @@ private static Double EaseInOut(Double timeFraction, Double start, Double delta, else { returnValue = EaseIn((timeFraction - 0.5) * 2, start, delta / 2, power); - returnValue += (delta / 2); + returnValue += delta / 2; } return returnValue; } diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesMapZoom.cs b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesMapZoom.cs index 83a8dccf..62f087aa 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesMapZoom.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesMapZoom.cs @@ -270,7 +270,7 @@ private void KeepPositionStable() return; } - Point delta = new Point(moved.X - _onTarget.X, moved.Y - _onTarget.Y); + Point delta = new(moved.X - _onTarget.X, moved.Y - _onTarget.Y); Double x = _translate.X + (delta.X * _value); Double y = _translate.Y + (delta.Y * _value); @@ -382,7 +382,7 @@ private void StopAnimations() BeginAnimation(ZoomToRectProperty, null); // make sure offset and translate are in sync. - Point t = new Point(_translate.X, _translate.Y); + Point t = new(_translate.X, _translate.Y); BeginAnimation(OffsetProperty, null); Translate(t.X, t.Y); } @@ -393,7 +393,7 @@ private void StopAnimations() /// public void ZoomToRect(System.Drawing.RectangleF rectangle) { - Rect r = new Rect(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); + Rect r = new(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); ZoomToRect(r); } @@ -510,7 +510,7 @@ private void HandleZoom(Double clicks) /// The amound of time we can take to do the animation private void AnimateZoom(DependencyProperty property, Double oldZoom, Double newZoom, Duration d) { - MesExponentialDoubleAnimation a = new MesExponentialDoubleAnimation(oldZoom, newZoom, 2, EdgeBehavior.EaseOut, d); + MesExponentialDoubleAnimation a = new(oldZoom, newZoom, 2, EdgeBehavior.EaseOut, d); BeginAnimation(property, a); } @@ -521,7 +521,7 @@ private void AnimateZoom(DependencyProperty property, Double oldZoom, Double new public Rect ScrollIntoView(FrameworkElement e) { StopAnimations(); - Rect rect = new Rect(0, 0, e.ActualWidth, e.ActualHeight); + Rect rect = new(0, 0, e.ActualWidth, e.ActualHeight); // Get zoomed & translated coordinates of this object by transforming to the container coordinates. rect = e.TransformToAncestor(_container).TransformBounds(rect); rect.Inflate(margin, margin); @@ -539,7 +539,7 @@ public void ScrollIntoView(FrameworkElement[] elements) Rect result = Rect.Empty; foreach (FrameworkElement e in elements) { - Rect rect = new Rect(0, 0, e.ActualWidth, e.ActualHeight); + Rect rect = new(0, 0, e.ActualWidth, e.ActualHeight); // Get zoomed & translated coordinates of this object by transforming to the container coordinates. rect = e.TransformToAncestor(_container).TransformBounds(rect); if (result == Rect.Empty) @@ -579,7 +579,7 @@ private void ScrollIntoView(Rect rect, Duration duration, Boolean zoom) Double height = containerSize.Height; // Get the bounds of the container so we can see if the selected node is inside these bounds right now. - Rect window = new Rect(0, 0, width, height); + Rect window = new(0, 0, width, height); if (rect.Width > width || rect.Height > height) { @@ -592,7 +592,7 @@ private void ScrollIntoView(Rect rect, Duration duration, Boolean zoom) } // Calculate the delta needed to get the node to be visible in the container. - Point delta = new Point(); + Point delta = new(); if (rect.Left < window.Left) { delta.X = window.Left - rect.Left + margin; @@ -615,14 +615,14 @@ private void ScrollIntoView(Rect rect, Duration duration, Boolean zoom) // the selected node is visble. We need to change the current translation by the 'delta' // amount. - Point startPos = new Point(_translate.X, _translate.Y); + Point startPos = new(_translate.X, _translate.Y); Double x = startPos.X + delta.X; if (x > 0) { x = 0; } Double y = startPos.Y + delta.Y; if (y > 0) { y = 0; } - Point newPos = new Point(x, y); - PointAnimation pa = new PointAnimation(startPos, newPos, duration); + Point newPos = new(x, y); + PointAnimation pa = new(startPos, newPos, duration); BeginAnimation(OffsetProperty, pa); } } diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesRectangleSelectionGesture.cs b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesRectangleSelectionGesture.cs index 09788b5e..bb517c3d 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesRectangleSelectionGesture.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesRectangleSelectionGesture.cs @@ -161,7 +161,7 @@ private void OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e) /// private Rect GetSelectionRect(Point p) { - Rect r = new Rect(_start, p); + Rect r = new(_start, p); return _container.TransformToDescendant(_target).TransformBounds(r); } } diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesSelectionRectVisual.cs b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesSelectionRectVisual.cs index ebb083d2..3b94f77e 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesSelectionRectVisual.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Gestures/MesSelectionRectVisual.cs @@ -27,7 +27,7 @@ internal class MesSelectionRectVisual : FrameworkElement /// public MesSelectionRectVisual(Point firstPointP, Point secondPointP, Double zoomP) { - DrawingGroup drawing = new DrawingGroup(); + DrawingGroup drawing = new(); DrawingContext context = drawing.Open(); context.DrawRectangle(Brushes.White, null, new Rect(-1, -1, 3, 3)); context.DrawRectangle(Brushes.Black, null, new Rect(0.25, -1, 0.5, 3)); @@ -37,7 +37,7 @@ public MesSelectionRectVisual(Point firstPointP, Point secondPointP, Double zoom // Create a drawing brush that tiles the unit square from the drawing created above. // The size of the viewport and the rotation angle will be updated as we use the // dashed pen. - DrawingBrush drawingBrush = new DrawingBrush(drawing) + DrawingBrush drawingBrush = new(drawing) { ViewportUnits = BrushMappingMode.Absolute, Viewport = new Rect(0, 0, _dashRepeatLength, _dashRepeatLength), @@ -100,7 +100,7 @@ private void DrawOnTheContext() { // Calculate line thickness. Double thickness = 1; - Vector cornerSize = new Vector(thickness, thickness); + Vector cornerSize = new(thickness, thickness); Vector lineOffset = cornerSize / 2; // Draw the two horizontal lines. @@ -142,6 +142,6 @@ protected override Visual GetVisualChild(Int32 index) /// /// Get the actual Rectangle of the rubber band. /// - internal Rect SelectedRect => new Rect(FirstPoint, SecondPoint); + internal Rect SelectedRect => new(FirstPoint, SecondPoint); } } \ No newline at end of file diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/MinoriEditorShell.VirtualCanvas.Platforms.Wpf.csproj b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/MinoriEditorShell.VirtualCanvas.Platforms.Wpf.csproj index 7206608e..aa0508bd 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/MinoriEditorShell.VirtualCanvas.Platforms.Wpf.csproj +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/MinoriEditorShell.VirtualCanvas.Platforms.Wpf.csproj @@ -1,29 +1,30 @@  - - net8.0-windows - true - Mark Kromis - Mark Kromis - Copyright© 2019-2025 - Easy Virtual Canvas with zoom - https://github.com/TorisanKitsune/MinoriEditorShell - https://github.com/TorisanKitsune/MinoriEditorShell - Git - IDE VirtualCanvas Module - true - bin\MinoriEditorStudio.VirtualCanvas.xml - latest - true - + + net8.0-windows + true + Mark Kromis + Mark Kromis + Copyright© 2019-2025 + Easy Virtual Canvas with zoom + https://github.com/TorisanKitsune/MinoriEditorShell + https://github.com/TorisanKitsune/MinoriEditorShell + Git + IDE VirtualCanvas Module + true + bin\MinoriEditorStudio.VirtualCanvas.xml + latest + true + CS1591 + - - - + + + - - - - - + + + + + \ No newline at end of file diff --git a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Models/MesPerfTimer.cs b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Models/MesPerfTimer.cs index e78ead0b..80b31f81 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Models/MesPerfTimer.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas.Platforms.Wpf/Models/MesPerfTimer.cs @@ -67,14 +67,14 @@ public void Start() /// /// Number of ticks returned from GetTicks() /// Milliseconds - public Int64 GetMilliseconds(Int64 ticks) => (ticks * (Int64)1000) / _freq; + public Int64 GetMilliseconds(Int64 ticks) => ticks * (Int64)1000 / _freq; /// /// Get the time between Start() and Stop() in the highest fidelity possible /// as defined by Windows QueryPerformanceFrequency. Usually this is nanoseconds. /// /// High fidelity tick count - public Int64 GetDurationInTicks() => (_end - _start); + public Int64 GetDurationInTicks() => _end - _start; /// /// Get current time in ighest fidelity possible as defined by Windows QueryPerformanceCounter. @@ -121,7 +121,7 @@ public void Count(Int64 time) /// Return the median of the values recorded by the Count() method since the last Clear /// /// The median value - public Double Median() => (_min + ((_max - _min) / 2.0)); + public Double Median() => _min + ((_max - _min) / 2.0); /// /// Return the variance in the numbers recorded by the Count() method since the last Clear @@ -130,7 +130,7 @@ public void Count(Int64 time) public Double PercentError() { Double spread = (_max - _min) / 2.0; - Double percent = ((Double)(spread * 100.0) / _min); + Double percent = (Double)(spread * 100.0) / _min; return percent; } diff --git a/Modules/MinoriEditorShell.VirtualCanvas/MinoriEditorShell.VirtualCanvas.csproj b/Modules/MinoriEditorShell.VirtualCanvas/MinoriEditorShell.VirtualCanvas.csproj index d28970a5..aab427a2 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas/MinoriEditorShell.VirtualCanvas.csproj +++ b/Modules/MinoriEditorShell.VirtualCanvas/MinoriEditorShell.VirtualCanvas.csproj @@ -1,22 +1,28 @@  - - net8.0 - true - Mark Kromis - Mark Kromis - latest - Copyright© 2019-2025 - Easy Virtual Canvas with zoom - https://github.com/TorisanKitsune/MinoriEditorShell - https://github.com/TorisanKitsune/MinoriEditorShell - Git - IDE VirtualCanvas Module - true - bin\MinoriEditorStudio.VirtualCanvas.xml - + + net8.0 + true + Mark Kromis + Mark Kromis + latest + Copyright© 2019-2025 + Easy Virtual Canvas with zoom + https://github.com/TorisanKitsune/MinoriEditorShell + https://github.com/TorisanKitsune/MinoriEditorShell + Git + IDE VirtualCanvas Module + true + bin\MinoriEditorStudio.VirtualCanvas.xml + CS1591 + - - - + + + + + + + + \ No newline at end of file diff --git a/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadNode.cs b/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadNode.cs index f7f002cf..314e7759 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadNode.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadNode.cs @@ -9,7 +9,7 @@ namespace MinoriEditorShell.VirtualCanvas.Models { /// - /// Each node stored in the tree has a position, width & height. + /// Each node stored in the tree has a position, width and height. /// internal class MesQuadNode : IMesQuadNode { diff --git a/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadTree.cs b/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadTree.cs index fd5d0ce8..da8449e6 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadTree.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadTree.cs @@ -50,17 +50,11 @@ public void Insert(T node, RectangleF bounds) // todo: localize. throw new InvalidOperationException("Inserted node must have a non-zero width and height"); } - if (Root == null) - { - Root = new MesQuadrant(null, _bounds); - } + Root ??= new MesQuadrant(null, _bounds); IMesQuadrant parent = Root.Insert(node, bounds); - if (_table == null) - { - _table = new Dictionary>(); - } + _table ??= new Dictionary>(); _table[node] = parent; } @@ -84,10 +78,7 @@ public IEnumerable GetNodesInside(RectangleF bounds) /// List of zero or mode nodes found inside the given bounds public Boolean HasNodesInside(RectangleF bounds) { - if (Root != null) - { - Root.HasIntersectingNodes(bounds); - } + Root?.HasIntersectingNodes(bounds); return false; } @@ -98,11 +89,8 @@ public Boolean HasNodesInside(RectangleF bounds) /// The list of nodes intersecting the given bounds public IEnumerable> GetNodes(RectangleF bounds) { - List> result = new List>(); - if (Root != null) - { - Root.GetIntersectingNodes(result, bounds); - } + List> result = []; + Root?.GetIntersectingNodes(result, bounds); return result; } diff --git a/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadrant.cs b/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadrant.cs index fd935e07..c3c60a6d 100644 --- a/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadrant.cs +++ b/Modules/MinoriEditorShell.VirtualCanvas/Models/MesQuadrant.cs @@ -114,44 +114,32 @@ public IMesQuadrant Insert(T node, RectangleF bounds) // assumption that the Rect struct is almost as fast as doing the operations // manually since Rect is a value type. - RectangleF topLeft = new RectangleF(Bounds.Left, Bounds.Top, w, h); - RectangleF topRight = new RectangleF(Bounds.Left + w, Bounds.Top, w, h); - RectangleF bottomLeft = new RectangleF(Bounds.Left, Bounds.Top + h, w, h); - RectangleF bottomRight = new RectangleF(Bounds.Left + w, Bounds.Top + h, w, h); + RectangleF topLeft = new(Bounds.Left, Bounds.Top, w, h); + RectangleF topRight = new(Bounds.Left + w, Bounds.Top, w, h); + RectangleF bottomLeft = new(Bounds.Left, Bounds.Top + h, w, h); + RectangleF bottomRight = new(Bounds.Left + w, Bounds.Top + h, w, h); IMesQuadrant child = null; // See if any child quadrants completely contain this node. if (topLeft.Contains(bounds)) { - if (TopLeft == null) - { - TopLeft = new MesQuadrant(this, topLeft); - } + TopLeft ??= new MesQuadrant(this, topLeft); child = TopLeft; } else if (topRight.Contains(bounds)) { - if (TopRight == null) - { - TopRight = new MesQuadrant(this, topRight); - } + TopRight ??= new MesQuadrant(this, topRight); child = TopRight; } else if (bottomLeft.Contains(bounds)) { - if (BottomLeft == null) - { - BottomLeft = new MesQuadrant(this, bottomLeft); - } + BottomLeft ??= new MesQuadrant(this, bottomLeft); child = BottomLeft; } else if (bottomRight.Contains(bounds)) { - if (BottomRight == null) - { - BottomRight = new MesQuadrant(this, bottomRight); - } + BottomRight ??= new MesQuadrant(this, bottomRight); child = BottomRight; } @@ -161,7 +149,7 @@ public IMesQuadrant Insert(T node, RectangleF bounds) } else { - MesQuadNode n = new MesQuadNode(node, bounds); + MesQuadNode n = new(node, bounds); if (Nodes == null) { n.Next = n; @@ -193,10 +181,10 @@ public void GetIntersectingNodes(IList> nodes, RectangleF bounds // assumption that the Rect struct is almost as fast as doing the operations // manually since Rect is a value type. - RectangleF topLeft = new RectangleF(Bounds.Left, Bounds.Top, w, h); - RectangleF topRight = new RectangleF(Bounds.Left + w, Bounds.Top, w, h); - RectangleF bottomLeft = new RectangleF(Bounds.Left, Bounds.Top + h, w, h); - RectangleF bottomRight = new RectangleF(Bounds.Left + w, Bounds.Top + h, w, h); + RectangleF topLeft = new(Bounds.Left, Bounds.Top, w, h); + RectangleF topRight = new(Bounds.Left + w, Bounds.Top, w, h); + RectangleF bottomLeft = new(Bounds.Left, Bounds.Top + h, w, h); + RectangleF bottomRight = new(Bounds.Left + w, Bounds.Top + h, w, h); // See if any child quadrants completely contain this node. if (topLeft.IntersectsWith(bounds) && TopLeft != null) @@ -259,10 +247,10 @@ public Boolean HasIntersectingNodes(RectangleF bounds) // assumption that the Rect struct is almost as fast as doing the operations // manually since Rect is a value type. - RectangleF topLeft = new RectangleF(Bounds.Left, Bounds.Top, w, h); - RectangleF topRight = new RectangleF(Bounds.Left + w, Bounds.Top, w, h); - RectangleF bottomLeft = new RectangleF(Bounds.Left, Bounds.Top + h, w, h); - RectangleF bottomRight = new RectangleF(Bounds.Left + w, Bounds.Top + h, w, h); + RectangleF topLeft = new(Bounds.Left, Bounds.Top, w, h); + RectangleF topRight = new(Bounds.Left + w, Bounds.Top, w, h); + RectangleF bottomLeft = new(Bounds.Left, Bounds.Top + h, w, h); + RectangleF bottomRight = new(Bounds.Left + w, Bounds.Top + h, w, h); Boolean found = false; diff --git a/Modules/MinoriEditorShell/DataClasses/MesSettingsTreeItem.cs b/Modules/MinoriEditorShell/DataClasses/MesSettingsTreeItem.cs index 0e9b3a15..f3e12453 100644 --- a/Modules/MinoriEditorShell/DataClasses/MesSettingsTreeItem.cs +++ b/Modules/MinoriEditorShell/DataClasses/MesSettingsTreeItem.cs @@ -15,8 +15,8 @@ public class MesSettingsTreeItem /// public MesSettingsTreeItem() { - Children = new List(); - Editors = new List(); + Children = []; + Editors = []; } /// diff --git a/Modules/MinoriEditorShell/Extensions/IocProviderExtensions.cs b/Modules/MinoriEditorShell/Extensions/IocProviderExtensions.cs index 4cdcd84e..9774a6f2 100644 --- a/Modules/MinoriEditorShell/Extensions/IocProviderExtensions.cs +++ b/Modules/MinoriEditorShell/Extensions/IocProviderExtensions.cs @@ -20,7 +20,7 @@ public static class IocProviderExtensions public static IEnumerable GetAll(this IMvxIoCProvider _) where T : class { // Setup results - List results = new List(); + List results = []; var assemblies = AppDomain.CurrentDomain.GetAssemblies().OrderBy(x => x.FullName); foreach (Assembly assembly in assemblies) diff --git a/Modules/MinoriEditorShell/MinoriEditorShell.csproj b/Modules/MinoriEditorShell/MinoriEditorShell.csproj index 3cc88fc7..d476ae13 100644 --- a/Modules/MinoriEditorShell/MinoriEditorShell.csproj +++ b/Modules/MinoriEditorShell/MinoriEditorShell.csproj @@ -1,67 +1,69 @@  - - net8.0 - - MinoriEditorStudio is an application shell similar in concept to the Visual Studio Shell. - This uses AvalonDock and has an MVVM architecture based on MvvmCross. - - latest - Copyright© 2019-2025 - https://github.com/TorisanKitsune/MinoriEditorShell - https://github.com/TorisanKitsune/MinoriEditorShell - - git - .net40 WPF MvvmCross AvalonDock Visual Studio IDE Shell - true - Mark Kromis - Mark Kromis - bin\MinoriEditorShell.xml - + + net8.0 + + MinoriEditorStudio is an application shell similar in concept to the Visual Studio Shell. + This uses AvalonDock and has an MVVM architecture based on MvvmCross. + + latest + Copyright© 2019-2025 + https://github.com/TorisanKitsune/MinoriEditorShell + https://github.com/TorisanKitsune/MinoriEditorShell + + git + .net40 WPF MvvmCross AvalonDock Visual Studio IDE Shell + true + Mark Kromis + Mark Kromis + bin\MinoriEditorShell.xml + CS1591 + - + - - - - - - - + + + + + + + + - - - PublicSettingsSingleFileGenerator - Settings.Designer.cs - - - True - True - Settings.settings - - + + + PublicSettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Settings.settings + + - - - True - True - Resources.resx - - - ResXFileCodeGenerator - - - ResXFileCodeGenerator - - - PublicResXFileCodeGenerator - Resources.Designer.cs - - - ResXFileCodeGenerator - - - ResXFileCodeGenerator - - + + + True + True + Resources.resx + + + ResXFileCodeGenerator + + + ResXFileCodeGenerator + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + ResXFileCodeGenerator + + + ResXFileCodeGenerator + + \ No newline at end of file diff --git a/Modules/MinoriEditorShell/Results/MesShow.cs b/Modules/MinoriEditorShell/Results/MesShow.cs index 13e30ab6..9a13f27b 100644 --- a/Modules/MinoriEditorShell/Results/MesShow.cs +++ b/Modules/MinoriEditorShell/Results/MesShow.cs @@ -9,10 +9,10 @@ public static class MesShow //public static MesShowCommonDialogResult CommonDialog(CommonDialog commonDialog) => new MesShowCommonDialogResult(commonDialog); public static MesShowToolResult Tool() - where TTool : IMesTool => new MesShowToolResult(); + where TTool : IMesTool => new(); public static MesShowToolResult Tool(TTool tool) - where TTool : IMesTool => new MesShowToolResult(tool); + where TTool : IMesTool => new(tool); #warning IWindow #if false diff --git a/Modules/MinoriEditorShell/Services/MesLayoutItemStatePersister.cs b/Modules/MinoriEditorShell/Services/MesLayoutItemStatePersister.cs index 041cab5b..0e18c9de 100644 --- a/Modules/MinoriEditorShell/Services/MesLayoutItemStatePersister.cs +++ b/Modules/MinoriEditorShell/Services/MesLayoutItemStatePersister.cs @@ -16,7 +16,7 @@ public Boolean SaveState(IMesDocumentManager shell, IMesDocumentManagerView shel { try { - using (BinaryWriter writer = new BinaryWriter(new FileStream(fileName, FileMode.Create, FileAccess.Write))) + using (BinaryWriter writer = new(new FileStream(fileName, FileMode.Create, FileAccess.Write))) { IEnumerable itemStates = shell.Documents.Concat(shell.Tools.Cast()); @@ -37,7 +37,7 @@ public Boolean SaveState(IMesDocumentManager shell, IMesDocumentManagerView shel .Cast().ToList(); // get exports with explicit types or names that inherit from ILayoutItem - List exportTypes = new List(); + List exportTypes = []; Boolean foundExportContract = false; foreach (ExportAttribute att in exportAttributes) { @@ -153,7 +153,7 @@ private static Type GetTypeFromContractNameAsILayoutItem(ExportAttribute attribu public Boolean LoadState(IMesDocumentManager shell, IMesDocumentManagerView shellView, String fileName) { - Dictionary layoutItems = new Dictionary(); + Dictionary layoutItems = []; if (!File.Exists(fileName)) { @@ -162,7 +162,7 @@ public Boolean LoadState(IMesDocumentManager shell, IMesDocumentManagerView shel try { - using (BinaryReader reader = new BinaryReader(new FileStream(fileName, FileMode.Open, FileAccess.Read))) + using (BinaryReader reader = new(new FileStream(fileName, FileMode.Open, FileAccess.Read))) { Int32 count = reader.ReadInt32(); diff --git a/Modules/MinoriEditorShell/ViewModels/MesDocumentManagerViewModel.cs b/Modules/MinoriEditorShell/ViewModels/MesDocumentManagerViewModel.cs index cd535d10..e1eaf637 100644 --- a/Modules/MinoriEditorShell/ViewModels/MesDocumentManagerViewModel.cs +++ b/Modules/MinoriEditorShell/ViewModels/MesDocumentManagerViewModel.cs @@ -42,10 +42,7 @@ public Boolean ShowFloatingWindowsInTaskbar { _showFloatingWindowsInTaskbar = value; RaisePropertyChanged(() => ShowFloatingWindowsInTaskbar); - if (ManagerView != null) - { - ManagerView.UpdateFloatingWindows(); - } + ManagerView?.UpdateFloatingWindows(); } } @@ -63,8 +60,8 @@ public MesDocumentManagerViewModel() //((IActivate)this).Activate(); - Tools = new MvxObservableCollection(); - Documents = new MvxObservableCollection(); + Tools = []; + Documents = []; } #warning OnViewLoaded(object view) diff --git a/Modules/MinoriEditorShell/ViewModels/MesGeneralSettingsViewModel.cs b/Modules/MinoriEditorShell/ViewModels/MesGeneralSettingsViewModel.cs index 8d9e1bb8..6ee5079a 100644 --- a/Modules/MinoriEditorShell/ViewModels/MesGeneralSettingsViewModel.cs +++ b/Modules/MinoriEditorShell/ViewModels/MesGeneralSettingsViewModel.cs @@ -11,14 +11,14 @@ public class MesGeneralSettingsViewModel : MvxViewModel, IMesSettings { private readonly IMesThemeManager _themeManager; - private readonly static List _availableLanguages = new List { + private readonly static List _availableLanguages = [ String.Empty, "en", "de", "ru", "zh-Hans", "ko", - }; + ]; private IMesTheme _selectedTheme; private String _selectedLanguage; diff --git a/Modules/MinoriEditorShell/ViewModels/MesSettingsManagerViewModel.cs b/Modules/MinoriEditorShell/ViewModels/MesSettingsManagerViewModel.cs index 0990f2eb..5bf7ac93 100644 --- a/Modules/MinoriEditorShell/ViewModels/MesSettingsManagerViewModel.cs +++ b/Modules/MinoriEditorShell/ViewModels/MesSettingsManagerViewModel.cs @@ -57,7 +57,7 @@ public override async Task Initialize() IMvxViewsContainer viewFinder = Mvx.IoCProvider.Resolve(); await base.Initialize(); - List pages = new List(); + List pages = []; _settingsEditors = Mvx.IoCProvider.GetAll(); foreach (IMesSettings settingsEditor in _settingsEditors) diff --git a/Tests/MinoriEditorShell.Platforms.WpfTests/MinoriEditorShell.Platforms.WpfTests.csproj b/Tests/MinoriEditorShell.Platforms.WpfTests/MinoriEditorShell.Platforms.WpfTests.csproj index b7de8080..4928cc23 100644 --- a/Tests/MinoriEditorShell.Platforms.WpfTests/MinoriEditorShell.Platforms.WpfTests.csproj +++ b/Tests/MinoriEditorShell.Platforms.WpfTests/MinoriEditorShell.Platforms.WpfTests.csproj @@ -7,17 +7,17 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/Tests/MinoriEditorShell.RibbonTests/MinoriEditorShell.RibbonTests.csproj b/Tests/MinoriEditorShell.RibbonTests/MinoriEditorShell.RibbonTests.csproj index 9e2f07f0..05f38c07 100644 --- a/Tests/MinoriEditorShell.RibbonTests/MinoriEditorShell.RibbonTests.csproj +++ b/Tests/MinoriEditorShell.RibbonTests/MinoriEditorShell.RibbonTests.csproj @@ -13,17 +13,17 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/Tests/MinoriEditorShellTests/Converters/CultureInfoNameConverterTests.cs b/Tests/MinoriEditorShellTests/Converters/CultureInfoNameConverterTests.cs index d2e30315..a3eaf97b 100644 --- a/Tests/MinoriEditorShellTests/Converters/CultureInfoNameConverterTests.cs +++ b/Tests/MinoriEditorShellTests/Converters/CultureInfoNameConverterTests.cs @@ -17,7 +17,8 @@ public void ConvertBackFailTest() Setup(); CultureInfoNameConverter converter = new(); - Assert.ThrowsException(() => converter.ConvertBack(new Object(), typeof(Object), new Object(), CultureInfo.CurrentCulture)); + Assert.ThrowsExactly(() => + converter.ConvertBack(new Object(), typeof(Object), new Object(), CultureInfo.CurrentCulture)); } [TestMethod, Ignore("Need Finished")] diff --git a/Tests/MinoriEditorShellTests/MinoriEditorShellTests.csproj b/Tests/MinoriEditorShellTests/MinoriEditorShellTests.csproj index 788a3fe2..7516a4ad 100644 --- a/Tests/MinoriEditorShellTests/MinoriEditorShellTests.csproj +++ b/Tests/MinoriEditorShellTests/MinoriEditorShellTests.csproj @@ -8,14 +8,14 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + From 40d39c9acf3ec43e1174baa1b727db836575c192 Mon Sep 17 00:00:00 2001 From: Mark Kromis <143529142+mkromis@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:59:07 -0500 Subject: [PATCH 2/2] nuget updates --- .../MinoriDemo.RibbonWpf/MinoriDemo.RibbonWpf.csproj | 4 ++-- Demos/MinoriDemo/MinoriDemo.Wpf/MinoriDemo.Wpf.csproj | 4 ++-- .../SimpleDemo.RibbonWpf/SimpleDemo.RibbonWpf.csproj | 4 ++-- Demos/SimpleDemo/SimpleDemo.Wpf/SimpleDemo.Wpf.csproj | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Demos/MinoriDemo/MinoriDemo.RibbonWpf/MinoriDemo.RibbonWpf.csproj b/Demos/MinoriDemo/MinoriDemo.RibbonWpf/MinoriDemo.RibbonWpf.csproj index c18de2de..4ebb3200 100644 --- a/Demos/MinoriDemo/MinoriDemo.RibbonWpf/MinoriDemo.RibbonWpf.csproj +++ b/Demos/MinoriDemo/MinoriDemo.RibbonWpf/MinoriDemo.RibbonWpf.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/Demos/MinoriDemo/MinoriDemo.Wpf/MinoriDemo.Wpf.csproj b/Demos/MinoriDemo/MinoriDemo.Wpf/MinoriDemo.Wpf.csproj index e4a79e68..27f35f61 100644 --- a/Demos/MinoriDemo/MinoriDemo.Wpf/MinoriDemo.Wpf.csproj +++ b/Demos/MinoriDemo/MinoriDemo.Wpf/MinoriDemo.Wpf.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/Demos/SimpleDemo/SimpleDemo.RibbonWpf/SimpleDemo.RibbonWpf.csproj b/Demos/SimpleDemo/SimpleDemo.RibbonWpf/SimpleDemo.RibbonWpf.csproj index 2b31c91c..158ceb57 100644 --- a/Demos/SimpleDemo/SimpleDemo.RibbonWpf/SimpleDemo.RibbonWpf.csproj +++ b/Demos/SimpleDemo/SimpleDemo.RibbonWpf/SimpleDemo.RibbonWpf.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/Demos/SimpleDemo/SimpleDemo.Wpf/SimpleDemo.Wpf.csproj b/Demos/SimpleDemo/SimpleDemo.Wpf/SimpleDemo.Wpf.csproj index 8e98cfe2..f739e595 100644 --- a/Demos/SimpleDemo/SimpleDemo.Wpf/SimpleDemo.Wpf.csproj +++ b/Demos/SimpleDemo/SimpleDemo.Wpf/SimpleDemo.Wpf.csproj @@ -7,9 +7,9 @@ - - - + + +