diff --git a/src/Directory.build.props b/src/Directory.build.props index 0029864..872068c 100644 --- a/src/Directory.build.props +++ b/src/Directory.build.props @@ -12,7 +12,7 @@ - net8.0 + net8.0;net9.0 bin true Release diff --git a/src/MyNet.UI/Busy/Models/Busy.cs b/src/MyNet.UI/Busy/Models/Busy.cs index 5974492..7312758 100644 --- a/src/MyNet.UI/Busy/Models/Busy.cs +++ b/src/MyNet.UI/Busy/Models/Busy.cs @@ -2,6 +2,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Windows.Input; using MyNet.Observable; using MyNet.UI.Commands; diff --git a/src/MyNet.UI/Commands/CommandsManager.cs b/src/MyNet.UI/Commands/CommandsManager.cs index 9e8d36a..cff0967 100644 --- a/src/MyNet.UI/Commands/CommandsManager.cs +++ b/src/MyNet.UI/Commands/CommandsManager.cs @@ -2,6 +2,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Windows.Input; namespace MyNet.UI.Commands { diff --git a/src/MyNet.UI/Commands/ICommand.cs b/src/MyNet.UI/Commands/ICommand.cs deleted file mode 100644 index 72fce0a..0000000 --- a/src/MyNet.UI/Commands/ICommand.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Stéphane ANDRE. All Right Reserved. -// See the LICENSE file in the project root for more information. - -namespace MyNet.UI.Commands -{ - public interface ICommand : System.Windows.Input.ICommand - { - } -} diff --git a/src/MyNet.UI/Commands/ICommandFactory.cs b/src/MyNet.UI/Commands/ICommandFactory.cs index e92ee9b..690a963 100644 --- a/src/MyNet.UI/Commands/ICommandFactory.cs +++ b/src/MyNet.UI/Commands/ICommandFactory.cs @@ -2,6 +2,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Windows.Input; namespace MyNet.UI.Commands { diff --git a/src/MyNet.UI/Commands/RelayCommand.cs b/src/MyNet.UI/Commands/RelayCommand.cs index d26c4b4..c16fdfd 100644 --- a/src/MyNet.UI/Commands/RelayCommand.cs +++ b/src/MyNet.UI/Commands/RelayCommand.cs @@ -2,6 +2,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Windows.Input; namespace MyNet.UI.Commands { diff --git a/src/MyNet.UI/Commands/RelayCommandFactory.cs b/src/MyNet.UI/Commands/RelayCommandFactory.cs index 3929539..4d75d6f 100644 --- a/src/MyNet.UI/Commands/RelayCommandFactory.cs +++ b/src/MyNet.UI/Commands/RelayCommandFactory.cs @@ -2,6 +2,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Windows.Input; namespace MyNet.UI.Commands { diff --git a/src/MyNet.UI/Locators/NamingConvention.cs b/src/MyNet.UI/Locators/NamingConvention.cs index fef2315..33a49a9 100644 --- a/src/MyNet.UI/Locators/NamingConvention.cs +++ b/src/MyNet.UI/Locators/NamingConvention.cs @@ -172,7 +172,7 @@ public static string ResolveNamingConvention(Dictionary constant { var fullnamespace = GetParentPath(value); var separator = GetParentSeparator(fullnamespace) ?? string.Empty; - var namespaces = fullnamespace.Split(new[] { separator }, StringSplitOptions.RemoveEmptyEntries).ToList(); + var namespaces = fullnamespace.Split([separator], StringSplitOptions.RemoveEmptyEntries).ToList(); var result = conventionToUse; diff --git a/src/MyNet.UI/MyNet.UI.csproj b/src/MyNet.UI/MyNet.UI.csproj index 60f8501..aadbf5a 100644 --- a/src/MyNet.UI/MyNet.UI.csproj +++ b/src/MyNet.UI/MyNet.UI.csproj @@ -15,18 +15,18 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + + diff --git a/src/MyNet.UI/Services/Handlers/FileNotification.cs b/src/MyNet.UI/Services/Handlers/FileNotification.cs index 0002586..4a6e4f1 100644 --- a/src/MyNet.UI/Services/Handlers/FileNotification.cs +++ b/src/MyNet.UI/Services/Handlers/FileNotification.cs @@ -2,6 +2,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Windows.Input; using MyNet.UI.Commands; using MyNet.UI.Notifications; using MyNet.UI.Resources; diff --git a/src/MyNet.UI/Services/Providers/RecentFilesControllerProvider.cs b/src/MyNet.UI/Services/Providers/RecentFilesControllerProvider.cs index dd54277..2cea754 100644 --- a/src/MyNet.UI/Services/Providers/RecentFilesControllerProvider.cs +++ b/src/MyNet.UI/Services/Providers/RecentFilesControllerProvider.cs @@ -3,8 +3,8 @@ using System; using System.ComponentModel; +using System.Windows.Input; using MyNet.Observable; -using MyNet.UI.Commands; using MyNet.UI.ViewModels.FileHistory; using MyNet.UI.ViewModels.List; using MyNet.UI.ViewModels.List.Filtering; diff --git a/src/MyNet.UI/ViewModels/Dialogs/DialogViewModel.cs b/src/MyNet.UI/ViewModels/Dialogs/DialogViewModel.cs index c9882a3..684d9b8 100644 --- a/src/MyNet.UI/ViewModels/Dialogs/DialogViewModel.cs +++ b/src/MyNet.UI/ViewModels/Dialogs/DialogViewModel.cs @@ -3,6 +3,7 @@ using System.ComponentModel; using System.Threading.Tasks; +using System.Windows.Input; using MyNet.Observable; using MyNet.Observable.Attributes; using MyNet.UI.Commands; diff --git a/src/MyNet.UI/ViewModels/Display/DisplayMode.cs b/src/MyNet.UI/ViewModels/Display/DisplayMode.cs index 772b05a..79062c7 100644 --- a/src/MyNet.UI/ViewModels/Display/DisplayMode.cs +++ b/src/MyNet.UI/ViewModels/Display/DisplayMode.cs @@ -3,8 +3,7 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Globalization; +using System.Windows.Input; using MyNet.Observable.Attributes; using MyNet.Observable.Translatables; using MyNet.UI.Commands; diff --git a/src/MyNet.UI/ViewModels/Display/DisplayViewModel.cs b/src/MyNet.UI/ViewModels/Display/DisplayViewModel.cs index 204a293..cd269e8 100644 --- a/src/MyNet.UI/ViewModels/Display/DisplayViewModel.cs +++ b/src/MyNet.UI/ViewModels/Display/DisplayViewModel.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Windows.Input; using MyNet.Observable; using MyNet.UI.Commands; @@ -29,9 +30,9 @@ public DisplayViewModel(IEnumerable allowedModes, IDisplayMode? de public void SetMode() where T : IDisplayMode => Mode = AllowedModes.OfType().FirstOrDefault(); - public void SetMode(Type type) => Mode = AllowedModes.Where(x => x.GetType() == type).FirstOrDefault(); + public void SetMode(Type type) => Mode = AllowedModes.FirstOrDefault(x => x.GetType() == type); - public void SetMode(string key) => Mode = AllowedModes.Where(x => x.Key == key).FirstOrDefault(); + public void SetMode(string key) => Mode = AllowedModes.FirstOrDefault(x => x.Key == key); public DisplayViewModel AddMode(IDisplayMode mode, bool isDefault = false) { diff --git a/src/MyNet.UI/ViewModels/Display/IDisplayMode.cs b/src/MyNet.UI/ViewModels/Display/IDisplayMode.cs index 2e370c2..93fc70b 100644 --- a/src/MyNet.UI/ViewModels/Display/IDisplayMode.cs +++ b/src/MyNet.UI/ViewModels/Display/IDisplayMode.cs @@ -3,7 +3,7 @@ using MyNet.Observable; -namespace MyNet.UI.ViewModels +namespace MyNet.UI.ViewModels.Display { public interface IDisplayMode : IProvideValue { diff --git a/src/MyNet.UI/ViewModels/Display/IDisplayViewModel.cs b/src/MyNet.UI/ViewModels/Display/IDisplayViewModel.cs index 4ff4559..fb651c9 100644 --- a/src/MyNet.UI/ViewModels/Display/IDisplayViewModel.cs +++ b/src/MyNet.UI/ViewModels/Display/IDisplayViewModel.cs @@ -5,7 +5,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; -namespace MyNet.UI.ViewModels +namespace MyNet.UI.ViewModels.Display { public interface IDisplayViewModel : INotifyPropertyChanged { diff --git a/src/MyNet.UI/ViewModels/Edition/EditionViewModel.cs b/src/MyNet.UI/ViewModels/Edition/EditionViewModel.cs index d85b36f..c6e1a24 100644 --- a/src/MyNet.UI/ViewModels/Edition/EditionViewModel.cs +++ b/src/MyNet.UI/ViewModels/Edition/EditionViewModel.cs @@ -5,6 +5,7 @@ using System.ComponentModel; using System.Linq; using System.Threading.Tasks; +using System.Windows.Input; using MyNet.Observable.Attributes; using MyNet.UI.Commands; using MyNet.UI.Dialogs; diff --git a/src/MyNet.UI/ViewModels/Edition/StringListEditionViewModel.cs b/src/MyNet.UI/ViewModels/Edition/StringListEditionViewModel.cs index 5d94341..4fabbd6 100644 --- a/src/MyNet.UI/ViewModels/Edition/StringListEditionViewModel.cs +++ b/src/MyNet.UI/ViewModels/Edition/StringListEditionViewModel.cs @@ -3,6 +3,7 @@ using System.Collections.ObjectModel; using System.Linq; +using System.Windows.Input; using DynamicData.Binding; using MyNet.DynamicData.Extensions; using MyNet.Observable; diff --git a/src/MyNet.UI/ViewModels/Export/ExportViewModelBase.cs b/src/MyNet.UI/ViewModels/Export/ExportViewModelBase.cs index e055c67..9614346 100644 --- a/src/MyNet.UI/ViewModels/Export/ExportViewModelBase.cs +++ b/src/MyNet.UI/ViewModels/Export/ExportViewModelBase.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using System.Windows.Input; using MyNet.Humanizer; using MyNet.UI.Commands; using MyNet.UI.Resources; diff --git a/src/MyNet.UI/ViewModels/Export/FileExportByColumnsViewModelBase.cs b/src/MyNet.UI/ViewModels/Export/FileExportByColumnsViewModelBase.cs index d6a50d7..992b1d7 100644 --- a/src/MyNet.UI/ViewModels/Export/FileExportByColumnsViewModelBase.cs +++ b/src/MyNet.UI/ViewModels/Export/FileExportByColumnsViewModelBase.cs @@ -7,6 +7,7 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; +using System.Windows.Input; using DynamicData; using DynamicData.Binding; using MyNet.Observable.Attributes; diff --git a/src/MyNet.UI/ViewModels/Export/FileExportViewModelBase.cs b/src/MyNet.UI/ViewModels/Export/FileExportViewModelBase.cs index 5f13777..72169a7 100644 --- a/src/MyNet.UI/ViewModels/Export/FileExportViewModelBase.cs +++ b/src/MyNet.UI/ViewModels/Export/FileExportViewModelBase.cs @@ -6,6 +6,7 @@ using System.ComponentModel.DataAnnotations; using System.IO; using System.Threading.Tasks; +using System.Windows.Input; using MyNet.Observable.Attributes; using MyNet.UI.Commands; using MyNet.UI.Dialogs; diff --git a/src/MyNet.UI/ViewModels/FileHistory/RecentFileViewModel.cs b/src/MyNet.UI/ViewModels/FileHistory/RecentFileViewModel.cs index 059519f..362e278 100644 --- a/src/MyNet.UI/ViewModels/FileHistory/RecentFileViewModel.cs +++ b/src/MyNet.UI/ViewModels/FileHistory/RecentFileViewModel.cs @@ -4,6 +4,7 @@ using System; using System.IO; using System.Threading.Tasks; +using System.Windows.Input; using MyNet.Observable; using MyNet.UI.Busy; using MyNet.UI.Commands; diff --git a/src/MyNet.UI/ViewModels/IListViewModel.cs b/src/MyNet.UI/ViewModels/IListViewModel.cs index 0efa215..a520a77 100644 --- a/src/MyNet.UI/ViewModels/IListViewModel.cs +++ b/src/MyNet.UI/ViewModels/IListViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections; using System.Collections.ObjectModel; +using MyNet.UI.ViewModels.Display; using MyNet.UI.ViewModels.List; using MyNet.UI.ViewModels.List.Filtering; using MyNet.UI.ViewModels.List.Grouping; diff --git a/src/MyNet.UI/ViewModels/Import/ImportDialogViewModel.cs b/src/MyNet.UI/ViewModels/Import/ImportDialogViewModel.cs index 93971db..39d0c68 100644 --- a/src/MyNet.UI/ViewModels/Import/ImportDialogViewModel.cs +++ b/src/MyNet.UI/ViewModels/Import/ImportDialogViewModel.cs @@ -11,7 +11,6 @@ using MyNet.UI.Selection; using MyNet.UI.Toasting; using MyNet.UI.Toasting.Settings; -using MyNet.UI.ViewModels.Dialogs; using MyNet.UI.ViewModels.List; using MyNet.Utilities.Providers; diff --git a/src/MyNet.UI/ViewModels/Import/ImportablesListViewModel.cs b/src/MyNet.UI/ViewModels/Import/ImportablesListViewModel.cs index a515db6..bd61924 100644 --- a/src/MyNet.UI/ViewModels/Import/ImportablesListViewModel.cs +++ b/src/MyNet.UI/ViewModels/Import/ImportablesListViewModel.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Reactive.Linq; +using System.Windows.Input; using DynamicData; using MyNet.Observable.Attributes; using MyNet.Observable.Collections.Providers; diff --git a/src/MyNet.UI/ViewModels/List/Filtering/AdvancedFiltersViewModel.cs b/src/MyNet.UI/ViewModels/List/Filtering/AdvancedFiltersViewModel.cs index 5257db3..f48d0cb 100644 --- a/src/MyNet.UI/ViewModels/List/Filtering/AdvancedFiltersViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/Filtering/AdvancedFiltersViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Windows.Input; using MyNet.UI.Commands; using MyNet.Utilities; diff --git a/src/MyNet.UI/ViewModels/List/Filtering/ExtendedFiltersViewModel.cs b/src/MyNet.UI/ViewModels/List/Filtering/ExtendedFiltersViewModel.cs index b603264..052d5a8 100644 --- a/src/MyNet.UI/ViewModels/List/Filtering/ExtendedFiltersViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/Filtering/ExtendedFiltersViewModel.cs @@ -15,7 +15,7 @@ namespace MyNet.UI.ViewModels.List.Filtering { public class ExtendedFiltersViewModel : FiltersViewModel { - private IReadOnlyCollection _defaultFilters; + private ReadOnlyCollection _defaultFilters; public override bool IsReadOnly => true; @@ -27,7 +27,7 @@ public class ExtendedFiltersViewModel : FiltersViewModel public ObservableCollection>> PresetFilters { get; } = []; - public DisplayWrapper>? SelectedPresetFilter { get; private set; } + public DisplayWrapper>? SelectedPresetFilter { get; set; } public ExtendedFiltersViewModel(IDictionary> allowedFilters, SpeedFiltersViewModel speedFilters, IEnumerable? defaultFilters = null) : this(allowedFilters.Select(x => new FilterProviderViewModel(x.Key, x.Value)), speedFilters, defaultFilters) { } diff --git a/src/MyNet.UI/ViewModels/List/Filtering/FiltersViewModel.cs b/src/MyNet.UI/ViewModels/List/Filtering/FiltersViewModel.cs index ef3a6a2..49a51fa 100644 --- a/src/MyNet.UI/ViewModels/List/Filtering/FiltersViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/Filtering/FiltersViewModel.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; +using System.Windows.Input; using DynamicData; using DynamicData.Binding; using MyNet.DynamicData.Extensions; diff --git a/src/MyNet.UI/ViewModels/List/Grouping/GroupingViewModel.cs b/src/MyNet.UI/ViewModels/List/Grouping/GroupingViewModel.cs index 242a923..401df9d 100644 --- a/src/MyNet.UI/ViewModels/List/Grouping/GroupingViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/Grouping/GroupingViewModel.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; +using System.Windows.Input; using DynamicData; using DynamicData.Binding; using DynamicData.Kernel; diff --git a/src/MyNet.UI/ViewModels/List/IListParametersProvider.cs b/src/MyNet.UI/ViewModels/List/IListParametersProvider.cs index 571eae7..13b787b 100644 --- a/src/MyNet.UI/ViewModels/List/IListParametersProvider.cs +++ b/src/MyNet.UI/ViewModels/List/IListParametersProvider.cs @@ -1,6 +1,7 @@ // Copyright (c) Stéphane ANDRE. All Right Reserved. // See the LICENSE file in the project root for more information. +using MyNet.UI.ViewModels.Display; using MyNet.UI.ViewModels.List.Filtering; using MyNet.UI.ViewModels.List.Grouping; using MyNet.UI.ViewModels.List.Sorting; diff --git a/src/MyNet.UI/ViewModels/List/IPagingViewModel.cs b/src/MyNet.UI/ViewModels/List/IPagingViewModel.cs index 6b54205..fe1f606 100644 --- a/src/MyNet.UI/ViewModels/List/IPagingViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/IPagingViewModel.cs @@ -3,7 +3,7 @@ using System; using System.ComponentModel; -using MyNet.UI.Commands; +using System.Windows.Input; namespace MyNet.UI.ViewModels.List { diff --git a/src/MyNet.UI/ViewModels/List/ListDialogViewModel.cs b/src/MyNet.UI/ViewModels/List/ListDialogViewModel.cs index dbacd68..ec764b1 100644 --- a/src/MyNet.UI/ViewModels/List/ListDialogViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/ListDialogViewModel.cs @@ -1,11 +1,12 @@ // Copyright (c) Stéphane ANDRE. All Right Reserved. // See the LICENSE file in the project root for more information. +using System.Windows.Input; using MyNet.Observable.Attributes; using MyNet.UI.Commands; using MyNet.UI.ViewModels.Workspace; -namespace MyNet.UI.ViewModels.Dialogs +namespace MyNet.UI.ViewModels.List { [CanBeValidatedForDeclaredClassOnly(false)] [CanSetIsModifiedAttributeForDeclaredClassOnly(false)] diff --git a/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs b/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs index e6976b0..c0318d6 100644 --- a/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs +++ b/src/MyNet.UI/ViewModels/List/ListViewModelBase.cs @@ -10,6 +10,7 @@ using System.Reactive.Linq; using System.Reactive.Subjects; using System.Threading.Tasks; +using System.Windows.Input; using DynamicData; using DynamicData.Binding; using DynamicData.Operators; @@ -23,6 +24,7 @@ using MyNet.UI.Dialogs; using MyNet.UI.Dialogs.Models; using MyNet.UI.Resources; +using MyNet.UI.ViewModels.Display; using MyNet.UI.ViewModels.List.Filtering; using MyNet.UI.ViewModels.List.Grouping; using MyNet.UI.ViewModels.List.Sorting; diff --git a/src/MyNet.UI/ViewModels/List/Paging/PagingViewModel.cs b/src/MyNet.UI/ViewModels/List/Paging/PagingViewModel.cs index 7071d1a..74c862e 100644 --- a/src/MyNet.UI/ViewModels/List/Paging/PagingViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/Paging/PagingViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections.ObjectModel; using System.Linq; +using System.Windows.Input; using MyNet.Observable; using MyNet.UI.Collections; using MyNet.UI.Commands; diff --git a/src/MyNet.UI/ViewModels/List/SelectionDialogViewModel.cs b/src/MyNet.UI/ViewModels/List/SelectionDialogViewModel.cs index 116ea79..e7c86f3 100644 --- a/src/MyNet.UI/ViewModels/List/SelectionDialogViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/SelectionDialogViewModel.cs @@ -4,13 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Windows.Input; using DynamicData; using MyNet.Observable.Attributes; using MyNet.Observable.Collections.Providers; using MyNet.UI.Commands; using MyNet.UI.Resources; using MyNet.UI.Selection; -using MyNet.UI.ViewModels.Dialogs; using MyNet.Utilities.Providers; namespace MyNet.UI.ViewModels.List diff --git a/src/MyNet.UI/ViewModels/List/SelectionListViewModel.cs b/src/MyNet.UI/ViewModels/List/SelectionListViewModel.cs index 82f48f9..37878d9 100644 --- a/src/MyNet.UI/ViewModels/List/SelectionListViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/SelectionListViewModel.cs @@ -6,6 +6,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Reactive.Linq; +using System.Windows.Input; using DynamicData; using DynamicData.Binding; using MyNet.Observable.Attributes; @@ -27,8 +28,7 @@ public abstract class SelectionListViewModel : WrapperListViewMo where T : notnull { protected SelectionListViewModel(TCollection collection, - IListParametersProvider? parametersProvider = null, - SelectionMode? selectionMode = null) : base(collection, parametersProvider) + IListParametersProvider? parametersProvider = null) : base(collection, parametersProvider) { SelectCommand = CommandsManager.CreateNotNull(Collection.Select, CanSelect); SelectItemsCommand = CommandsManager.CreateNotNull>(Collection.Select, CanSelect); diff --git a/src/MyNet.UI/ViewModels/List/Sorting/ISortingViewModel.cs b/src/MyNet.UI/ViewModels/List/Sorting/ISortingViewModel.cs index 5cd3b61..43b4431 100644 --- a/src/MyNet.UI/ViewModels/List/Sorting/ISortingViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/Sorting/ISortingViewModel.cs @@ -2,7 +2,7 @@ // See the LICENSE file in the project root for more information. using System; -using MyNet.UI.Commands; +using System.Windows.Input; namespace MyNet.UI.ViewModels.List.Sorting { diff --git a/src/MyNet.UI/ViewModels/List/Sorting/SortingViewModel.cs b/src/MyNet.UI/ViewModels/List/Sorting/SortingViewModel.cs index 3e41226..b48876f 100644 --- a/src/MyNet.UI/ViewModels/List/Sorting/SortingViewModel.cs +++ b/src/MyNet.UI/ViewModels/List/Sorting/SortingViewModel.cs @@ -7,6 +7,7 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Linq; +using System.Windows.Input; using DynamicData; using DynamicData.Binding; using MyNet.DynamicData.Extensions; @@ -51,7 +52,7 @@ public class SortingViewModel : EditableObject, ISortingViewModel, ICollection { { defaultProperty, listSortDirection } }) { } public SortingViewModel(IList defaultProperties) : this(defaultProperties.ToDictionary(x => x, _ => ListSortDirection.Ascending)) { } diff --git a/src/MyNet.UI/ViewModels/Rules/EditableRulesViewModel.cs b/src/MyNet.UI/ViewModels/Rules/EditableRulesViewModel.cs index 01c0f41..6ac0c10 100644 --- a/src/MyNet.UI/ViewModels/Rules/EditableRulesViewModel.cs +++ b/src/MyNet.UI/ViewModels/Rules/EditableRulesViewModel.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Windows.Input; using MyNet.Observable; using MyNet.Observable.Attributes; using MyNet.Observable.Resources; diff --git a/src/MyNet.UI/ViewModels/Shell/AboutViewModel.cs b/src/MyNet.UI/ViewModels/Shell/AboutViewModel.cs index ac2d96b..5562aba 100644 --- a/src/MyNet.UI/ViewModels/Shell/AboutViewModel.cs +++ b/src/MyNet.UI/ViewModels/Shell/AboutViewModel.cs @@ -12,7 +12,7 @@ public class AboutViewModel : WorkspaceViewModel { public string? Version { get; private set; } = ApplicationHelper.GetVersion(); - public string? Message { get; private set; } + public string? Message { get; set; } public string? Copyright { get; private set; } = ApplicationHelper.GetCopyright(); diff --git a/src/MyNet.UI/ViewModels/Shell/FileMenuViewModelBase.cs b/src/MyNet.UI/ViewModels/Shell/FileMenuViewModelBase.cs index 78b3823..477bd7d 100644 --- a/src/MyNet.UI/ViewModels/Shell/FileMenuViewModelBase.cs +++ b/src/MyNet.UI/ViewModels/Shell/FileMenuViewModelBase.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Windows.Input; using MyNet.Observable; using MyNet.UI.Commands; using MyNet.UI.Dialogs; diff --git a/src/MyNet.UI/ViewModels/Shell/MainWindowViewModelBase.cs b/src/MyNet.UI/ViewModels/Shell/MainWindowViewModelBase.cs index 1811d15..910eab2 100644 --- a/src/MyNet.UI/ViewModels/Shell/MainWindowViewModelBase.cs +++ b/src/MyNet.UI/ViewModels/Shell/MainWindowViewModelBase.cs @@ -4,6 +4,7 @@ using System; using System.Collections.ObjectModel; using System.Globalization; +using System.Windows.Input; using DynamicData.Binding; using MyNet.Observable; using MyNet.UI.Busy; diff --git a/src/MyNet.UI/ViewModels/Shell/NotificationsViewModel.cs b/src/MyNet.UI/ViewModels/Shell/NotificationsViewModel.cs index b83313c..823766a 100644 --- a/src/MyNet.UI/ViewModels/Shell/NotificationsViewModel.cs +++ b/src/MyNet.UI/ViewModels/Shell/NotificationsViewModel.cs @@ -3,6 +3,7 @@ using System; using System.Linq; +using System.Windows.Input; using DynamicData.Binding; using MyNet.Observable; using MyNet.Observable.Collections; @@ -54,7 +55,7 @@ public NotificationsViewModel(INotificationsManager notificationsManager) Messenger.Default.Register(this, OnOpenDialog); } - private void ExecuteAction(ActionNotification notification) => notification.Action?.Invoke(notification); + private static void ExecuteAction(ActionNotification notification) => notification.Action?.Invoke(notification); private void UpdateVisibility(VisibilityAction visibilityAction) => IsVisible = visibilityAction == VisibilityAction.Toggle ? !IsVisible : visibilityAction != VisibilityAction.Hide; diff --git a/src/MyNet.UI/ViewModels/Workspace/ItemViewModel.cs b/src/MyNet.UI/ViewModels/Workspace/ItemViewModel.cs index 2ae2ada..49d394b 100644 --- a/src/MyNet.UI/ViewModels/Workspace/ItemViewModel.cs +++ b/src/MyNet.UI/ViewModels/Workspace/ItemViewModel.cs @@ -7,6 +7,7 @@ using System.Reactive.Subjects; using System.Runtime.CompilerServices; using System.Threading.Tasks; +using System.Windows.Input; using MyNet.UI.Commands; using MyNet.UI.Dialogs; using MyNet.UI.Dialogs.Models; diff --git a/src/MyNet.UI/ViewModels/Workspace/WorkspaceDialogViewModel.cs b/src/MyNet.UI/ViewModels/Workspace/WorkspaceDialogViewModel.cs index 5897992..82dff83 100644 --- a/src/MyNet.UI/ViewModels/Workspace/WorkspaceDialogViewModel.cs +++ b/src/MyNet.UI/ViewModels/Workspace/WorkspaceDialogViewModel.cs @@ -3,6 +3,7 @@ using System.ComponentModel; using System.Threading.Tasks; +using System.Windows.Input; using MyNet.Observable.Attributes; using MyNet.UI.Commands; using MyNet.UI.Dialogs.Models; diff --git a/src/MyNet.UI/ViewModels/Workspace/WorkspaceViewModel.cs b/src/MyNet.UI/ViewModels/Workspace/WorkspaceViewModel.cs index ebdd341..d5aac02 100644 --- a/src/MyNet.UI/ViewModels/Workspace/WorkspaceViewModel.cs +++ b/src/MyNet.UI/ViewModels/Workspace/WorkspaceViewModel.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Reactive.Linq; using System.Threading.Tasks; +using System.Windows.Input; using DynamicData; using MyNet.Observable; using MyNet.Observable.Attributes;