diff --git a/App.xaml b/App.xaml index af3bc1a..fc93dd8 100644 --- a/App.xaml +++ b/App.xaml @@ -2,8 +2,4 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:VersionController" - xmlns:prism="http://prismlibrary.com/"> - - - - + xmlns:prism="http://prismlibrary.com/"/> \ No newline at end of file diff --git a/App.xaml.cs b/App.xaml.cs index 7c59c9d..6f6ca55 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -1,4 +1,6 @@ -using Prism.Events; +using CommonModule.Core; +using PackageModule.Core; +using Prism.Events; using Prism.Ioc; using Prism.Modularity; using Prism.Regions; @@ -7,8 +9,6 @@ using Serilog.Core; using System.Windows; using Unity; -using VersionController.Services; -using VersionController.Core; namespace VersionController { @@ -52,7 +52,7 @@ protected override void ConfigureViewModelLocator() protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog) { - moduleCatalog.AddModule(); + moduleCatalog.AddModule(); moduleCatalog.AddModule(); } diff --git a/Common/CommonModule/CommonModule.csproj b/Common/CommonModule/CommonModule.csproj new file mode 100644 index 0000000..357f28a --- /dev/null +++ b/Common/CommonModule/CommonModule.csproj @@ -0,0 +1,13 @@ + + + + net8.0-windows + enable + true + enable + + + + + + diff --git a/Controls/Converter/VisibilityConverter.cs b/Common/CommonModule/Converters/VisibilityConverter.cs similarity index 87% rename from Controls/Converter/VisibilityConverter.cs rename to Common/CommonModule/Converters/VisibilityConverter.cs index 98d3f3e..b98c5c4 100644 --- a/Controls/Converter/VisibilityConverter.cs +++ b/Common/CommonModule/Converters/VisibilityConverter.cs @@ -1,9 +1,4 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace VersionController.Controls.Converter +namespace CommonModule.Converters { public class VisibilityConverter : IValueConverter { diff --git a/Core/ConstantFilePaths.cs b/Common/CommonModule/Core/ConstantFilePaths.cs similarity index 87% rename from Core/ConstantFilePaths.cs rename to Common/CommonModule/Core/ConstantFilePaths.cs index 7b7cecb..87531f7 100644 --- a/Core/ConstantFilePaths.cs +++ b/Common/CommonModule/Core/ConstantFilePaths.cs @@ -1,6 +1,4 @@ -using System; - -namespace VersionController.Core +namespace CommonModule.Core { public class ConstantFilePaths { diff --git a/Common/CommonModule/Core/LogSink.cs b/Common/CommonModule/Core/LogSink.cs new file mode 100644 index 0000000..b317533 --- /dev/null +++ b/Common/CommonModule/Core/LogSink.cs @@ -0,0 +1,23 @@ +namespace CommonModule.Core; + +public class LogSink : ILogEventSink +{ + private readonly IEventAggregator _eventAggregator; + + public LogSink(IEventAggregator eventAggregator) + { + _eventAggregator = eventAggregator; + } + + public void Emit(LogEvent logEvent) + { + ArgumentNullException.ThrowIfNull(logEvent); + + StringWriter strWriter = new(); + + MessageTemplateTextFormatter textFormatter = new MessageTemplateTextFormatter("{Timestamp:yyyy/MM/dd HH:mm:ss} [{Level:u3}]: {Message}{Exception}"); + textFormatter.Format(logEvent, strWriter); + + _eventAggregator.GetEvent().Publish(strWriter.ToString()); + } +} diff --git a/Common/CommonModule/Events/LogEvent.cs b/Common/CommonModule/Events/LogEvent.cs new file mode 100644 index 0000000..736d8a3 --- /dev/null +++ b/Common/CommonModule/Events/LogEvent.cs @@ -0,0 +1,5 @@ +namespace CommonModule.Events; + +public class LogEvent : PubSubEvent +{ +} diff --git a/Common/CommonModule/Events/LogEventArgs.cs b/Common/CommonModule/Events/LogEventArgs.cs new file mode 100644 index 0000000..1f5f9a8 --- /dev/null +++ b/Common/CommonModule/Events/LogEventArgs.cs @@ -0,0 +1,6 @@ +namespace CommonModule.Events; + +public class LogEventArgs: EventArgs +{ + public required string LogMessage { get; set; } +} diff --git a/Common/CommonModule/Using.cs b/Common/CommonModule/Using.cs new file mode 100644 index 0000000..4b5314d --- /dev/null +++ b/Common/CommonModule/Using.cs @@ -0,0 +1,8 @@ +global using System.IO; +global using System.Globalization; +global using System.Windows; +global using System.Windows.Data; +global using Serilog.Core; +global using Serilog.Events; +global using Serilog.Formatting.Display; +global using Prism.Events; \ No newline at end of file diff --git a/LoggerService/Events/LogEvent.cs b/LoggerService/Events/LogEvent.cs deleted file mode 100644 index 86a49fa..0000000 --- a/LoggerService/Events/LogEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Prism.Events; - -namespace VersionController.Services.Events -{ - public class LogEvent : PubSubEvent - { - } -} diff --git a/LoggerService/Events/LogEventArgs.cs b/LoggerService/Events/LogEventArgs.cs deleted file mode 100644 index 7b5c05f..0000000 --- a/LoggerService/Events/LogEventArgs.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace VersionController.Services.Events -{ - public class LogEventArgs: EventArgs - { - public required string LogMessage { get; set; } - } -} diff --git a/LoggerService/LogSink.cs b/LoggerService/LogSink.cs deleted file mode 100644 index 8f28ffa..0000000 --- a/LoggerService/LogSink.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Prism.Events; -using Serilog.Core; -using Serilog.Events; -using Serilog.Formatting.Display; -using System; -using System.IO; - -namespace VersionController.Services -{ - public class LogSink : ILogEventSink - { - private readonly IEventAggregator _eventAggregator; - - public LogSink(IEventAggregator eventAggregator) - { - _eventAggregator = eventAggregator; - } - - public void Emit(LogEvent logEvent) - { - ArgumentNullException.ThrowIfNull(logEvent); - - StringWriter strWriter = new(); - - MessageTemplateTextFormatter textFormatter = new MessageTemplateTextFormatter("{Timestamp:yyyy/MM/dd HH:mm:ss} [{Level:u3}]: {Message}{Exception}"); - textFormatter.Format(logEvent, strWriter); - - _eventAggregator.GetEvent().Publish(strWriter.ToString()); - } - } -} diff --git a/Main/MainModule.cs b/Modules/MainModule/MainModule.cs similarity index 78% rename from Main/MainModule.cs rename to Modules/MainModule/MainModule.cs index 58899aa..ba72ef4 100644 --- a/Main/MainModule.cs +++ b/Modules/MainModule/MainModule.cs @@ -1,12 +1,4 @@ -using Prism.Ioc; -using Prism.Modularity; -using Prism.Mvvm; -using Prism.Regions; -using Serilog; -using VersionController.Main.ViewModels; -using VersionController.Main.Views; - -namespace VersionController.Main +namespace MainModule { public class MainModule : IModule { diff --git a/Modules/MainModule/MainModule.csproj b/Modules/MainModule/MainModule.csproj new file mode 100644 index 0000000..b8e7d4a --- /dev/null +++ b/Modules/MainModule/MainModule.csproj @@ -0,0 +1,18 @@ + + + + net8.0-windows + enable + true + enable + + + + + + + + + + + diff --git a/Modules/MainModule/Using.cs b/Modules/MainModule/Using.cs new file mode 100644 index 0000000..c31bd41 --- /dev/null +++ b/Modules/MainModule/Using.cs @@ -0,0 +1,9 @@ +global using Prism.Ioc; +global using Prism.Modularity; +global using Prism.Mvvm; +global using Prism.Regions; +global using Prism.Events; +global using Serilog; +global using MainModule.ViewModels; +global using MainModule.Views; +global using CommonModule.Events; diff --git a/Main/ViewModels/MainViewModel.cs b/Modules/MainModule/ViewModels/MainViewModel.cs similarity index 83% rename from Main/ViewModels/MainViewModel.cs rename to Modules/MainModule/ViewModels/MainViewModel.cs index 5d497b4..988c3d0 100644 --- a/Main/ViewModels/MainViewModel.cs +++ b/Modules/MainModule/ViewModels/MainViewModel.cs @@ -1,13 +1,4 @@ -using Prism.Commands; -using Prism.Events; -using Prism.Mvvm; -using Prism.Regions; -using Serilog; -using System; -using VersionController.PackageModule.ViewModels; -using VersionController.Services.Events; - -namespace VersionController.Main.ViewModels +namespace MainModule.ViewModels { public class MainViewModel : BindableBase, INavigationAware { diff --git a/Main/Views/MainView.xaml b/Modules/MainModule/Views/MainView.xaml similarity index 91% rename from Main/Views/MainView.xaml rename to Modules/MainModule/Views/MainView.xaml index ccd5acc..7a0a288 100644 --- a/Main/Views/MainView.xaml +++ b/Modules/MainModule/Views/MainView.xaml @@ -1,9 +1,9 @@ - /// Interaction logic for MainView.xaml diff --git a/Core/DirectoryUtils.cs b/Modules/PackageModule/Core/DirectoryUtils.cs similarity index 84% rename from Core/DirectoryUtils.cs rename to Modules/PackageModule/Core/DirectoryUtils.cs index b4ac532..f781986 100644 --- a/Core/DirectoryUtils.cs +++ b/Modules/PackageModule/Core/DirectoryUtils.cs @@ -1,18 +1,8 @@ -using Serilog; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading.Tasks; - -namespace VersionController.Core +namespace PackageModule.Core { public class DirectoryUtils : IDirectoryUtils { private readonly ILogger _logger; - private const string _folderPattern = @"(?<=\..*)\."; public DirectoryUtils(ILogger logger) { @@ -37,10 +27,18 @@ public DirectoryUtils(ILogger logger) return dotNugetPackages; } - public List<(string, string?)> GetFilterPackages(string filterFileNames) + public List<(string, string?)> GetDotNugetFilterPackages(string filterFileNames) { List<(string fileName, string? version)> packages = ReadPackages(Directory.GetDirectories(ConstantFilePaths.DotNugetFilePath)); - return packages.FindAll(x => x.fileName.Contains(filterFileNames.ToUpper())).ToList(); + + return packages.Where(x => x.fileName.Contains(filterFileNames) || (!string.IsNullOrEmpty(x.version) && x.version.Contains(filterFileNames))).ToList(); + } + + public List<(string, string?)> GetNugetFilterPackages(string filterFileNames) + { + List<(string fileName, string? version)> packages = ReadPackages(Directory.GetDirectories(ConstantFilePaths.NugetX86FilePath)); + + return packages.Where(x => x.fileName.Contains(filterFileNames) || (!string.IsNullOrEmpty(x.version) && x.version.Contains(filterFileNames))).ToList(); } private List<(string, string?)> ReadPackages(string[] filterFolderPaths) @@ -51,11 +49,7 @@ public DirectoryUtils(ILogger logger) { string? version = Path.GetFileName(Directory.GetDirectories(folder, "*", SearchOption.TopDirectoryOnly).FirstOrDefault()); - Match match = Regex.Match(folder, _folderPattern); - if (match.Success) - { - folders.Add((Path.GetFileName(folder), version)); - } + folders.Add((Path.GetFileName(folder), version)); } return folders; diff --git a/Core/IDirectoryUtils.cs b/Modules/PackageModule/Core/IDirectoryUtils.cs similarity index 59% rename from Core/IDirectoryUtils.cs rename to Modules/PackageModule/Core/IDirectoryUtils.cs index 7163ab0..07f3d96 100644 --- a/Core/IDirectoryUtils.cs +++ b/Modules/PackageModule/Core/IDirectoryUtils.cs @@ -1,12 +1,11 @@ -using System.Collections.Generic; - -namespace VersionController.Core +namespace PackageModule.Core { public interface IDirectoryUtils { List<(string, string?)> GetNugetPackages(); List<(string, string?)> GetDotNugetPackages(); - List<(string, string?)> GetFilterPackages(string filterFileNames); + List<(string, string?)> GetNugetFilterPackages(string filterFileNames); + List<(string, string?)> GetDotNugetFilterPackages(string filterFileNames); void Delete(List filterFileNames, string filePath); void Publish(string directory, string fileName); } diff --git a/PackageModule/Models/Package.cs b/Modules/PackageModule/Models/Package.cs similarity index 89% rename from PackageModule/Models/Package.cs rename to Modules/PackageModule/Models/Package.cs index cbaab79..c4ccd51 100644 --- a/PackageModule/Models/Package.cs +++ b/Modules/PackageModule/Models/Package.cs @@ -1,7 +1,4 @@ -using Prism.Mvvm; -using System.Xml.Linq; - -namespace VersionController.PackageModule.Models +namespace PackageModule.Models { public class Package : BindableBase { diff --git a/Modules/PackageModule/PackageModule.cs b/Modules/PackageModule/PackageModule.cs new file mode 100644 index 0000000..226ed71 --- /dev/null +++ b/Modules/PackageModule/PackageModule.cs @@ -0,0 +1,35 @@ +namespace PackageModule; + +public class PackageModule : IModule +{ + private readonly ILogger _logger; + private readonly IRegionManager _regionManager; + + public PackageModule(ILogger logger, IRegionManager regionManager) + { + _logger = logger; + _regionManager = regionManager; + } + + public void OnInitialized(IContainerProvider containerProvider) + { + _regionManager.RegisterViewWithRegion("PackageContentRegion", typeof(PackageView)); + _regionManager.RegisterViewWithRegion("DotNugetPackageContentRegion", typeof(DotNugetPackageListView)); + _regionManager.RegisterViewWithRegion("PackageListContentRegion", typeof(PackageListView)); + + //TODO: Update this implementation if there is a better way for first navigation + IRegion region = _regionManager.Regions["PackageContentRegion"]; + region.RequestNavigate(nameof(PackageView)); + } + + public void RegisterTypes(IContainerRegistry containerRegistry) + { + containerRegistry.RegisterForNavigation(); + containerRegistry.RegisterForNavigation(); + containerRegistry.RegisterForNavigation(); + + ViewModelLocationProvider.Register(); + ViewModelLocationProvider.Register(); + ViewModelLocationProvider.Register(); + } +} diff --git a/Modules/PackageModule/PackageModule.csproj b/Modules/PackageModule/PackageModule.csproj new file mode 100644 index 0000000..b8e7d4a --- /dev/null +++ b/Modules/PackageModule/PackageModule.csproj @@ -0,0 +1,18 @@ + + + + net8.0-windows + enable + true + enable + + + + + + + + + + + diff --git a/Modules/PackageModule/Using.cs b/Modules/PackageModule/Using.cs new file mode 100644 index 0000000..54d1810 --- /dev/null +++ b/Modules/PackageModule/Using.cs @@ -0,0 +1,15 @@ +global using System.IO; +global using System.Diagnostics; +global using System.Text.RegularExpressions; +global using System.Collections.ObjectModel; +global using Serilog; +global using Prism.Ioc; +global using Prism.Modularity; +global using Prism.Mvvm; +global using Prism.Commands; +global using Prism.Regions; +global using CommonModule.Core; +global using PackageModule.Core; +global using PackageModule.Models; +global using PackageModule.Views; +global using PackageModule.ViewModels; diff --git a/Modules/PackageModule/ViewModels/DotNugetPackageListViewModel.cs b/Modules/PackageModule/ViewModels/DotNugetPackageListViewModel.cs new file mode 100644 index 0000000..9c09dea --- /dev/null +++ b/Modules/PackageModule/ViewModels/DotNugetPackageListViewModel.cs @@ -0,0 +1,153 @@ +namespace PackageModule.ViewModels; + +public class DotNugetPackageListViewModel : BindableBase, INavigationAware +{ + private readonly ILogger _logger; + private readonly IDirectoryUtils _directoryUtils; + + private ObservableCollection _dotNuGetPackages = new(); + private Package _selectedDotNugetPackage = new(); + private bool _isVisible = false; + private bool _isAllChecked = false; + private string _dotNugetPackageToken = string.Empty; + + public ObservableCollection DotNuGetPackages + { + get => _dotNuGetPackages; + set { SetProperty(ref _dotNuGetPackages, value); } + } + + public string DotNugetPackageToken + { + get => _dotNugetPackageToken; + set + { + SetProperty(ref _dotNugetPackageToken, value); + if (string.IsNullOrEmpty(_dotNugetPackageToken)) + { + Refresh(); + } + } + } + + public Package SelectedDotNuGetPackage + { + get => _selectedDotNugetPackage; + set + { + SetProperty(ref _selectedDotNugetPackage, value); + if (_dotNuGetPackages != null) + { + Package? package = DotNuGetPackages.ToList().FirstOrDefault(x => x.Name == _selectedDotNugetPackage.Name); + if (package != null) + { + package.IsChecked = !_selectedDotNugetPackage.IsChecked; + } + } + + IsVisible = DotNuGetPackages.Any(x => x.IsChecked); + } + } + + public bool IsAllChecked + { + get => _isAllChecked; + set + { + SetProperty(ref _isAllChecked, value); + DotNuGetPackages.ToList().ForEach(x => x.IsChecked = _isAllChecked); + IsVisible = DotNuGetPackages.Any(x => x.IsChecked); + } + } + + public bool IsVisible + { + get => _isVisible; + set { SetProperty(ref _isVisible, value); } + } + public DelegateCommand DotNugetSearchCommand { get; set; } + public DelegateCommand DeleteCommand { get; set; } + public DelegateCommand PublishCommand { get; set; } + + public DotNugetPackageListViewModel(ILogger logger, IDirectoryUtils directoryUtils) + { + _logger = logger; + _directoryUtils = directoryUtils; + + DotNugetSearchCommand = new DelegateCommand(OnDotNugetSearch); + DeleteCommand = new DelegateCommand(OnDelete); + PublishCommand = new DelegateCommand(OnPublish); + } + + public void OnNavigatedTo(NavigationContext navigationContext) + { + Refresh(); + } + + private void Refresh() + { + IsVisible = false; + DotNuGetPackages.Clear(); + + List<(string, string?)> dotNuGetPackages = _directoryUtils.GetDotNugetPackages(); + + foreach ((string package, string? version) in dotNuGetPackages) + { + DotNuGetPackages.Add(new Package(package, version)); + } + } + + private void OnDotNugetSearch(string token) + { + if (string.IsNullOrEmpty(token)) + { + return; + } + + DotNuGetPackages.Clear(); + + List<(string, string?)> filterPackages = _directoryUtils.GetDotNugetFilterPackages(token); + + foreach ((string filterPackage, string? version) in filterPackages) + { + DotNuGetPackages.Add(new Package(filterPackage, version)); + } + } + + private void OnDelete() + { + if (!DotNuGetPackages.Any(x => x.IsChecked)) + { + _logger.Warning("Unable to delete the packages due to no package is selected."); + return; + } + + List deletePackages = new(); + + foreach (Package package in DotNuGetPackages) + { + if (package.IsChecked) + { + deletePackages.Add(package.Name); + } + } + + _directoryUtils.Delete(deletePackages, ConstantFilePaths.DotNugetFilePath); + + Refresh(); + } + + private void OnPublish() + { + //TODO: Add logic to OnPublish method + } + + public bool IsNavigationTarget(NavigationContext navigationContext) + { + return true; + } + + public void OnNavigatedFrom(NavigationContext navigationContext) + { + } +} diff --git a/Modules/PackageModule/ViewModels/PackageListViewModel.cs b/Modules/PackageModule/ViewModels/PackageListViewModel.cs new file mode 100644 index 0000000..ff70e01 --- /dev/null +++ b/Modules/PackageModule/ViewModels/PackageListViewModel.cs @@ -0,0 +1,154 @@ +namespace PackageModule.ViewModels; + +public class PackageListViewModel : BindableBase, INavigationAware +{ + private readonly ILogger _logger; + private readonly IDirectoryUtils _directoryUtils; + + private ObservableCollection _packages = new(); + private Package _selectedPackage = new(); + private bool _isVisible = false; + private bool _isAllChecked = false; + private string _nuGetToken = string.Empty; + + public ObservableCollection Packages + { + get => _packages; + set { SetProperty(ref _packages, value); } + } + + public string NugetToken + { + get => _nuGetToken; + set + { + SetProperty(ref _nuGetToken, value); + if (string.IsNullOrEmpty(_nuGetToken)) + { + Refresh(); + } + } + } + + public Package SelectedPackage + { + get => _selectedPackage; + set + { + SetProperty(ref _selectedPackage, value); + if(_selectedPackage != null) + { + Package? package = Packages.ToList().FirstOrDefault(x => x.Name == _selectedPackage.Name); + if (package != null) + { + package.IsChecked = !_selectedPackage.IsChecked; + } + } + + IsVisible = Packages.Any(x => x.IsChecked); + } + } + + public bool IsAllChecked + { + get => _isAllChecked; + set + { + SetProperty(ref _isAllChecked, value); + Packages.ToList().ForEach(x => x.IsChecked = _isAllChecked); + IsVisible = Packages.Any(x => x.IsChecked); + } + } + + public bool IsVisible + { + get => _isVisible; + set { SetProperty(ref _isVisible, value); } + } + + public DelegateCommand NugetSearchCommand { get; set; } + public DelegateCommand DeleteCommand { get; set; } + public DelegateCommand PublishCommand { get; set; } + + public PackageListViewModel(ILogger logger, IDirectoryUtils directoryUtils) + { + _logger = logger; + _directoryUtils = directoryUtils; + + NugetSearchCommand = new DelegateCommand(OnNugetSearch); + DeleteCommand = new DelegateCommand(OnDelete); + PublishCommand = new DelegateCommand(OnPublish); + } + + public void OnNavigatedTo(NavigationContext navigationContext) + { + Refresh(); + } + + private void Refresh() + { + IsVisible = false; + Packages.Clear(); + + List<(string, string?)> packages = _directoryUtils.GetNugetPackages(); + + foreach ((string fileName, string? version) in packages) + { + Packages.Add(new Package(fileName, version)); + } + } + + private void OnNugetSearch(string token) + { + if (string.IsNullOrEmpty(token)) + { + return; + } + + Packages.Clear(); + + List<(string, string?)> filterPackages = _directoryUtils.GetNugetFilterPackages(token); + + foreach ((string filterPackage, string? version) in filterPackages) + { + Packages.Add(new Package(filterPackage, version)); + } + } + + private void OnDelete() + { + if (!Packages.Any(x => x.IsChecked)) + { + _logger.Warning("Unable to delete the packages due to no package is selected."); + return; + } + + List deletePackages = new(); + + foreach (Package package in Packages) + { + if (package.IsChecked) + { + deletePackages.Add(package.Name); + } + } + + _directoryUtils.Delete(deletePackages, ConstantFilePaths.NugetX86FilePath); + + Refresh(); + } + + private void OnPublish() + { + //TODO: Implement the publish feature + } + + public bool IsNavigationTarget(NavigationContext navigationContext) + { + return true; + } + + public void OnNavigatedFrom(NavigationContext navigationContext) + { + } +} diff --git a/Modules/PackageModule/ViewModels/PackageViewModel.cs b/Modules/PackageModule/ViewModels/PackageViewModel.cs new file mode 100644 index 0000000..3e4a02f --- /dev/null +++ b/Modules/PackageModule/ViewModels/PackageViewModel.cs @@ -0,0 +1,43 @@ +namespace PackageModule.ViewModels; + +public class PackageViewModel : BindableBase, INavigationAware +{ + private readonly ILogger _logger; + private readonly IRegionManager _regionManager; + + public PackageViewModel(ILogger logger, IRegionManager regionManager) + { + _logger = logger; + _regionManager = regionManager; + } + + public void OnNavigatedTo(NavigationContext navigationContext) + { + if (navigationContext != null) + { + OnNavigateToDotNugetPackage(); + OnNavigateToPackageList(); + } + } + + private void OnNavigateToDotNugetPackage() + { + IRegion region = _regionManager.Regions["DotNugetPackageContentRegion"]; + region.RequestNavigate(nameof(DotNugetPackageListView)); + } + + private void OnNavigateToPackageList() + { + IRegion region = _regionManager.Regions["PackageListContentRegion"]; + region.RequestNavigate(nameof(PackageListView)); + } + + public bool IsNavigationTarget(NavigationContext navigationContext) + { + return true; + } + + public void OnNavigatedFrom(NavigationContext navigationContext) + { + } +} diff --git a/PackageModule/Views/DotNugetPackageListView.xaml b/Modules/PackageModule/Views/DotNugetPackageListView.xaml similarity index 77% rename from PackageModule/Views/DotNugetPackageListView.xaml rename to Modules/PackageModule/Views/DotNugetPackageListView.xaml index 9be991d..aafaed7 100644 --- a/PackageModule/Views/DotNugetPackageListView.xaml +++ b/Modules/PackageModule/Views/DotNugetPackageListView.xaml @@ -1,15 +1,15 @@ - - + @@ -36,20 +36,20 @@ - +