diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index a13daa3..33e923c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "csharpier": { - "version": "0.28.0", + "version": "0.29.1", "commands": [ "dotnet-csharpier" ] diff --git a/YMouseButtonControl.Core.Tests/KeyboardAndMouse/KeyboardSimulatorWorkerTests.cs b/YMouseButtonControl.Core.Tests/KeyboardAndMouse/KeyboardSimulatorWorkerTests.cs index 4924aa0..f212fa9 100644 --- a/YMouseButtonControl.Core.Tests/KeyboardAndMouse/KeyboardSimulatorWorkerTests.cs +++ b/YMouseButtonControl.Core.Tests/KeyboardAndMouse/KeyboardSimulatorWorkerTests.cs @@ -26,7 +26,7 @@ public void DefaultProfileSendsKeys() { SimulatedKeystrokesType = new MouseButtonPressedActionType(), BlockOriginalMouseInput = true, - Keys = "wee" + Keys = "wee", }; var testProvider = new TestProvider(); using var hook = new SimpleReactiveGlobalHook(globalHookProvider: testProvider); @@ -51,7 +51,7 @@ public void DefaultProfileSendsKeys() var evtDn = new UioHookEvent { Type = EventType.MousePressed, - Mouse = new MouseEventData { Button = MouseButton.Button3, } + Mouse = new MouseEventData { Button = MouseButton.Button3 }, }; // var evtUp = new UioHookEvent // { @@ -78,7 +78,7 @@ public void NonDefaultProfileSendsKeys() { SimulatedKeystrokesType = new MouseButtonPressedActionType(), BlockOriginalMouseInput = true, - Keys = "wee" + Keys = "wee", }; var testProvider = new TestProvider(); using var hook = new SimpleReactiveGlobalHook(globalHookProvider: testProvider); @@ -103,7 +103,7 @@ public void NonDefaultProfileSendsKeys() var evtDn = new UioHookEvent { Type = EventType.MousePressed, - Mouse = new MouseEventData { Button = MouseButton.Button3, } + Mouse = new MouseEventData { Button = MouseButton.Button3 }, }; // var evtUp = new UioHookEvent // { @@ -130,7 +130,7 @@ public void NonDefaultProfileNotSendKeys() { SimulatedKeystrokesType = new MouseButtonPressedActionType(), BlockOriginalMouseInput = true, - Keys = "wee" + Keys = "wee", }; var testProvider = new TestProvider(); using var hook = new SimpleReactiveGlobalHook(globalHookProvider: testProvider); @@ -156,7 +156,7 @@ public void NonDefaultProfileNotSendKeys() var evtDn = new UioHookEvent { Type = EventType.MousePressed, - Mouse = new MouseEventData { Button = MouseButton.Button3, } + Mouse = new MouseEventData { Button = MouseButton.Button3 }, }; // var evtUp = new UioHookEvent // { @@ -181,7 +181,7 @@ public void DefaultProfileSendsKeysReleased() { SimulatedKeystrokesType = new MouseButtonReleasedActionType(), BlockOriginalMouseInput = true, - Keys = "wee" + Keys = "wee", }; var testProvider = new TestProvider(); using var hook = new SimpleReactiveGlobalHook(globalHookProvider: testProvider); @@ -206,7 +206,7 @@ public void DefaultProfileSendsKeysReleased() var evtUp = new UioHookEvent { Type = EventType.MouseReleased, - Mouse = new MouseEventData { Button = MouseButton.Button3, } + Mouse = new MouseEventData { Button = MouseButton.Button3 }, }; RunHookAndWaitForStart(hook, testProvider); diff --git a/YMouseButtonControl.Core/DataAccess/Models/Enums/ButtonMappings.cs b/YMouseButtonControl.Core/DataAccess/Models/Enums/ButtonMappings.cs index 119a32e..f89d157 100644 --- a/YMouseButtonControl.Core/DataAccess/Models/Enums/ButtonMappings.cs +++ b/YMouseButtonControl.Core/DataAccess/Models/Enums/ButtonMappings.cs @@ -5,5 +5,5 @@ public enum ButtonMappings Nothing, Disabled, SimulatedKeystrokes, - RightClick + RightClick, } diff --git a/YMouseButtonControl.Core/DataAccess/Models/Enums/YMouseButton.cs b/YMouseButtonControl.Core/DataAccess/Models/Enums/YMouseButton.cs index e72d16d..ab4b19f 100644 --- a/YMouseButtonControl.Core/DataAccess/Models/Enums/YMouseButton.cs +++ b/YMouseButtonControl.Core/DataAccess/Models/Enums/YMouseButton.cs @@ -10,5 +10,5 @@ public enum YMouseButton : ushort MouseWheelUp, MouseWheelDown, MouseWheelLeft, - MouseWheelRight + MouseWheelRight, } diff --git a/YMouseButtonControl.Core/KeyboardAndMouse/Enums/MouseButtonState.cs b/YMouseButtonControl.Core/KeyboardAndMouse/Enums/MouseButtonState.cs index e13a989..12474e5 100644 --- a/YMouseButtonControl.Core/KeyboardAndMouse/Enums/MouseButtonState.cs +++ b/YMouseButtonControl.Core/KeyboardAndMouse/Enums/MouseButtonState.cs @@ -3,5 +3,5 @@ public enum MouseButtonState { Pressed, - Released + Released, } diff --git a/YMouseButtonControl.Core/Profiles/Implementations/ProfilesService.cs b/YMouseButtonControl.Core/Profiles/Implementations/ProfilesService.cs index f10ddd3..4523e43 100644 --- a/YMouseButtonControl.Core/Profiles/Implementations/ProfilesService.cs +++ b/YMouseButtonControl.Core/Profiles/Implementations/ProfilesService.cs @@ -43,13 +43,12 @@ public ProfilesService(IUnitOfWorkFactory unitOfWorkFactory) CurrentProfile = change.Reason switch { ChangeReason.Add => change.Current, - ChangeReason.Remove - => _profiles - .Items.Where(x => x.DisplayPriority < change.Current.DisplayPriority) - .MaxBy(x => x.DisplayPriority) - ?? throw new Exception("Unable to get next lower priority on remove"), + ChangeReason.Remove => _profiles + .Items.Where(x => x.DisplayPriority < change.Current.DisplayPriority) + .MaxBy(x => x.DisplayPriority) + ?? throw new Exception("Unable to get next lower priority on remove"), ChangeReason.Update => change.Current, - _ => throw new Exception("Unhandled change reason") + _ => throw new Exception("Unhandled change reason"), }; }); @@ -111,7 +110,7 @@ private void CheckDefaultProfile() MouseWheelUp = new NothingMapping(), MouseWheelDown = new NothingMapping(), MouseWheelLeft = new NothingMapping(), - MouseWheelRight = new NothingMapping() + MouseWheelRight = new NothingMapping(), }; repository.Add(defaultProfile); } diff --git a/YMouseButtonControl.Core/Services/Abstractions/Enums/WheelScrollDirection.cs b/YMouseButtonControl.Core/Services/Abstractions/Enums/WheelScrollDirection.cs index 95f2fa3..e9d8f4d 100644 --- a/YMouseButtonControl.Core/Services/Abstractions/Enums/WheelScrollDirection.cs +++ b/YMouseButtonControl.Core/Services/Abstractions/Enums/WheelScrollDirection.cs @@ -5,5 +5,5 @@ public enum WheelScrollDirection VerticalUp = 1, VerticalDown = 2, HorizontalRight = 3, - HorizontalLeft = 4 + HorizontalLeft = 4, } diff --git a/YMouseButtonControl.Core/ViewModels/Implementations/AppViewModel.cs b/YMouseButtonControl.Core/ViewModels/Implementations/AppViewModel.cs index 24869f4..bd7ffc5 100644 --- a/YMouseButtonControl.Core/ViewModels/Implementations/AppViewModel.cs +++ b/YMouseButtonControl.Core/ViewModels/Implementations/AppViewModel.cs @@ -44,23 +44,29 @@ is IClassicDesktopStyleApplicationLifetime lifetime } }); var runAtStartupCanExecute = this.WhenAnyValue(x => x.RunAtStartupIsEnabled); - RunAtStartupCommand = ReactiveCommand.Create(() => - { - if (startupInstallerService.InstallStatus()) - { - // uninstall - startupInstallerService.Uninstall(); - RunAtStartupIsChecked = false; - RunAtStartupHeader = string.Format(RunAtStartupHeaderFmt, RunAtStartupNotChecked); - } - else + RunAtStartupCommand = ReactiveCommand.Create( + () => { - // install - startupInstallerService.Install(); - RunAtStartupIsChecked = true; - RunAtStartupHeader = string.Format(RunAtStartupHeaderFmt, RunAtStartupChecked); - } - }, runAtStartupCanExecute); + if (startupInstallerService.InstallStatus()) + { + // uninstall + startupInstallerService.Uninstall(); + RunAtStartupIsChecked = false; + RunAtStartupHeader = string.Format( + RunAtStartupHeaderFmt, + RunAtStartupNotChecked + ); + } + else + { + // install + startupInstallerService.Install(); + RunAtStartupIsChecked = true; + RunAtStartupHeader = string.Format(RunAtStartupHeaderFmt, RunAtStartupChecked); + } + }, + runAtStartupCanExecute + ); } public string ToolTipText => $"YMouseButtonControl v{GetType().Assembly.GetName().Version}"; @@ -70,7 +76,7 @@ public bool RunAtStartupIsEnabled get => _runAtStartupIsEnabled; set => this.RaiseAndSetIfChanged(ref _runAtStartupIsEnabled, value); } - + public bool RunAtStartupIsChecked { get => _runAtStartupIsChecked; diff --git a/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/ProcessSelectorDialogViewModel.cs b/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/ProcessSelectorDialogViewModel.cs index 39257b7..0338139 100644 --- a/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/ProcessSelectorDialogViewModel.cs +++ b/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/ProcessSelectorDialogViewModel.cs @@ -44,7 +44,7 @@ public ProcessSelectorDialogViewModel(IProcessMonitorService processMonitorServi { Name = SelectedProcessModel!.Process.MainModule!.ModuleName, Description = SelectedProcessModel.Process.MainWindowTitle, - Process = SelectedProcessModel.Process.MainModule.ModuleName + Process = SelectedProcessModel.Process.MainModule.ModuleName, }, canExecuteOkCommand ); diff --git a/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/SimulatedKeystrokesDialogViewModel.cs b/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/SimulatedKeystrokesDialogViewModel.cs index 0072ea2..09721ae 100644 --- a/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/SimulatedKeystrokesDialogViewModel.cs +++ b/YMouseButtonControl.Core/ViewModels/Implementations/Dialogs/SimulatedKeystrokesDialogViewModel.cs @@ -68,7 +68,7 @@ public SimulatedKeystrokesDialogViewModel( CustomKeys = CustomKeys, SimulatedKeystrokesType = SimulatedKeystrokesType, Description = Description, - BlockOriginalMouseInput = BlockOriginalMouseInput + BlockOriginalMouseInput = BlockOriginalMouseInput, }, canExecuteOkCmd ); @@ -215,7 +215,7 @@ public bool BlockOriginalMouseInput { "F21", "{F21}" }, { "F22", "{F22}" }, { "F23", "{F23}" }, - { "F24", "{F24}" } + { "F24", "{F24}" }, }; public static Dictionary NumericKeypadKeys => @@ -263,7 +263,7 @@ public bool BlockOriginalMouseInput { "Next Track", "{MEDIANEXT}" }, { "Previous Track", "{MEDIAPREV}" }, { "Select Track", "{MEDIASELECT}" }, - { "Eject Media", "{MEDIAEJECT}" } + { "Eject Media", "{MEDIAEJECT}" }, }; public static Dictionary BrowserKeys => @@ -314,7 +314,7 @@ public int CaretIndex () => new RepeatedlyWhileButtonDownActionType(), () => new StickyRepeatActionType(), () => new StickyHoldActionType(), - () => new AsMousePressedAndReleasedActionType() + () => new AsMousePressedAndReleasedActionType(), ]; private string? _computedXy; diff --git a/YMouseButtonControl.Core/ViewModels/Services/ShowSimulatedKeystrokesDialogService.cs b/YMouseButtonControl.Core/ViewModels/Services/ShowSimulatedKeystrokesDialogService.cs index fb7870a..9c25c27 100644 --- a/YMouseButtonControl.Core/ViewModels/Services/ShowSimulatedKeystrokesDialogService.cs +++ b/YMouseButtonControl.Core/ViewModels/Services/ShowSimulatedKeystrokesDialogService.cs @@ -41,7 +41,7 @@ public Interaction< Keys = result.CustomKeys, PriorityDescription = result.Description, SimulatedKeystrokesType = result.SimulatedKeystrokesType, - BlockOriginalMouseInput = result.BlockOriginalMouseInput + BlockOriginalMouseInput = result.BlockOriginalMouseInput, }; } } diff --git a/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/EventSimulatorService.cs b/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/EventSimulatorService.cs index e59a1b1..fa4290c 100644 --- a/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/EventSimulatorService.cs +++ b/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/EventSimulatorService.cs @@ -32,7 +32,7 @@ public SimulateKeyboardResult SimulateKeyPress(string? key) { Result = eventSimulator .SimulateKeyPress(KeyCodes[key ?? throw new NullReferenceException(key)]) - .ToString() + .ToString(), }; } @@ -43,7 +43,7 @@ public SimulateKeyboardResult SimulateKeyRelease(string? key) { Result = eventSimulator .SimulateKeyRelease(KeyCodes[key ?? throw new NullReferenceException(key)]) - .ToString() + .ToString(), }; } @@ -300,7 +300,7 @@ private static List ParseKeys(string? keys) { Key = substr, IsModifier = false, - Value = (ushort)KeyCodes[substr] + Value = (ushort)KeyCodes[substr], } ); i++; @@ -504,6 +504,6 @@ private static List ParseKeys(string? keys) { "rmb", MouseButton.Button2 }, { "mmb", MouseButton.Button3 }, { "mb4", MouseButton.Button4 }, - { "mb5", MouseButton.Button5 } + { "mb5", MouseButton.Button5 }, }; } diff --git a/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/MouseListenerService.cs b/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/MouseListenerService.cs index f4dd3f6..9589d7d 100644 --- a/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/MouseListenerService.cs +++ b/YMouseButtonControl.KeyboardAndMouse.SharpHook/Implementations/MouseListenerService.cs @@ -87,52 +87,43 @@ private void OnMouseWheel(NewMouseWheelEventArgs args) private bool ShouldSuppressEvent(NewMouseHookEventArgs args) => args.Button switch { - YMouseButton.MouseButton1 - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseButton1.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseButton2 - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseButton2.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseButton3 - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseButton3.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseButton4 - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseButton4.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseButton5 - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseButton5.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseWheelUp - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseWheelUp.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseWheelDown - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseWheelDown.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseWheelLeft - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseWheelLeft.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - YMouseButton.MouseWheelRight - => _profilesService.Profiles.Any(p => - p is { Checked: true, MouseWheelRight.BlockOriginalMouseInput: true } - && (args.ActiveWindow?.Contains(p.Process) ?? false) - ), - _ => throw new ArgumentOutOfRangeException() + YMouseButton.MouseButton1 => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseButton1.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseButton2 => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseButton2.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseButton3 => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseButton3.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseButton4 => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseButton4.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseButton5 => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseButton5.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseWheelUp => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseWheelUp.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseWheelDown => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseWheelDown.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseWheelLeft => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseWheelLeft.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + YMouseButton.MouseWheelRight => _profilesService.Profiles.Any(p => + p is { Checked: true, MouseWheelRight.BlockOriginalMouseInput: true } + && (args.ActiveWindow?.Contains(p.Process) ?? false) + ), + _ => throw new ArgumentOutOfRangeException(), }; private void SubscribeToEvents() diff --git a/YMouseButtonControl.Linux.Tests/GlobalUsings.cs b/YMouseButtonControl.Linux.Tests/GlobalUsings.cs index cefced4..3244567 100644 --- a/YMouseButtonControl.Linux.Tests/GlobalUsings.cs +++ b/YMouseButtonControl.Linux.Tests/GlobalUsings.cs @@ -1 +1 @@ -global using NUnit.Framework; \ No newline at end of file +global using NUnit.Framework; diff --git a/YMouseButtonControl.Linux.Tests/StartupInstallerTests.cs b/YMouseButtonControl.Linux.Tests/StartupInstallerTests.cs index 40b7bf8..40a7b44 100644 --- a/YMouseButtonControl.Linux.Tests/StartupInstallerTests.cs +++ b/YMouseButtonControl.Linux.Tests/StartupInstallerTests.cs @@ -40,4 +40,4 @@ public void I_can_uninstall() Assert.That(sut.InstallStatus(), Is.False); }); } -} \ No newline at end of file +} diff --git a/YMouseButtonControl.Services.Linux/Services/StartupInstallerService.cs b/YMouseButtonControl.Services.Linux/Services/StartupInstallerService.cs index c33a28c..eb1cd6a 100644 --- a/YMouseButtonControl.Services.Linux/Services/StartupInstallerService.cs +++ b/YMouseButtonControl.Services.Linux/Services/StartupInstallerService.cs @@ -6,16 +6,18 @@ namespace YMouseButtonControl.Services.Linux.Services; public class StartupInstallerService : IStartupInstallerService { private const string DesktopFile = """ - [Desktop Entry] - Type=Application - Exec={0} - Hidden=false - NoDisplay=false - X-GNOME-Autostart-enabled=true - Name=YMouseButtonControl - Comment=YMouseButtonControl - """; - private readonly string _configDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + [Desktop Entry] + Type=Application + Exec={0} + Hidden=false + NoDisplay=false + X-GNOME-Autostart-enabled=true + Name=YMouseButtonControl + Comment=YMouseButtonControl + """; + private readonly string _configDir = Environment.GetFolderPath( + Environment.SpecialFolder.ApplicationData + ); private readonly string _autostartDir; private readonly string _desktopFilePath; @@ -52,7 +54,11 @@ public void Uninstall() { File.Delete(_desktopFilePath); } - - private static string GetCurExePath() => Path.Join(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) - ?? throw new Exception("Error retrieving path of executing assembly"), "YMouseButtonControl"); -} \ No newline at end of file + + private static string GetCurExePath() => + Path.Join( + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + ?? throw new Exception("Error retrieving path of executing assembly"), + "YMouseButtonControl" + ); +} diff --git a/YMouseButtonControl.Services.MacOS/CurrentWindowService.cs b/YMouseButtonControl.Services.MacOS/CurrentWindowService.cs index 6bb525f..67be727 100644 --- a/YMouseButtonControl.Services.MacOS/CurrentWindowService.cs +++ b/YMouseButtonControl.Services.MacOS/CurrentWindowService.cs @@ -110,7 +110,7 @@ public enum CFStringEncoding : uint UTF16 = 0x0100, UTF16BE = 0x10000100, UTF16LE = 0x14000100, - ASCII = 0x0600 + ASCII = 0x0600, } [StructLayout(LayoutKind.Sequential)] diff --git a/YMouseButtonControl.Services.Windows/ProcessMonitorService.cs b/YMouseButtonControl.Services.Windows/ProcessMonitorService.cs index e42350e..3bb465a 100644 --- a/YMouseButtonControl.Services.Windows/ProcessMonitorService.cs +++ b/YMouseButtonControl.Services.Windows/ProcessMonitorService.cs @@ -37,7 +37,7 @@ public IEnumerable GetProcesses() return cb.DistinctBy(x => x.MainModule!.FileName) .Select(x => new ProcessModel(x) { - Bitmap = GetBitmapStreamFromPath(x.MainModule!.FileName) + Bitmap = GetBitmapStreamFromPath(x.MainModule!.FileName), }) .ToList(); } diff --git a/YMouseButtonControl/App.axaml.cs b/YMouseButtonControl/App.axaml.cs index ee84db3..c7c368b 100644 --- a/YMouseButtonControl/App.axaml.cs +++ b/YMouseButtonControl/App.axaml.cs @@ -83,7 +83,7 @@ public override void OnFrameworkInitializationCompleted() { desktop.MainWindow = new MainWindow { - DataContext = Container?.GetRequiredService() + DataContext = Container?.GetRequiredService(), }; // Prevent the application from exiting and hide the window when the user presses the X button desktop.MainWindow.Closing += (s, e) => diff --git a/YMouseButtonControl/DependencyInjection/ConfigurationBootstrapper.cs b/YMouseButtonControl/DependencyInjection/ConfigurationBootstrapper.cs index 5f9ff62..46931c6 100644 --- a/YMouseButtonControl/DependencyInjection/ConfigurationBootstrapper.cs +++ b/YMouseButtonControl/DependencyInjection/ConfigurationBootstrapper.cs @@ -32,7 +32,7 @@ DataAccessConfiguration dataAccessConfig services.AddTransient(_ => new DatabaseConfiguration { ConnectionString = GetDatabaseConnectionString(configuration), - UseInMemoryDatabase = dataAccessConfig.UseInMemoryDatabase + UseInMemoryDatabase = dataAccessConfig.UseInMemoryDatabase, }); } diff --git a/YMouseButtonControl/Views/ProfilesListView.axaml.cs b/YMouseButtonControl/Views/ProfilesListView.axaml.cs index 7973faa..f5df0dc 100644 --- a/YMouseButtonControl/Views/ProfilesListView.axaml.cs +++ b/YMouseButtonControl/Views/ProfilesListView.axaml.cs @@ -44,8 +44,8 @@ IInteractionContext interactionContext AllowMultiple = false, FileTypeFilter = new[] { - new FilePickerFileType(".json") { Patterns = new[] { "*.json" } } - } + new FilePickerFileType(".json") { Patterns = new[] { "*.json" } }, + }, } ); if (result.Any()) @@ -72,8 +72,8 @@ IInteractionContext interactionContext SuggestedFileName = $"{interactionContext.Input}.json", FileTypeChoices = new[] { - new FilePickerFileType("json") { Patterns = new[] { "*.json" } } - } + new FilePickerFileType("json") { Patterns = new[] { "*.json" } }, + }, } ); if (file is not null)