added LoggingModule
This commit is contained in:
30
PhotoRenamer.Logging/LoggingModule.cs
Normal file
30
PhotoRenamer.Logging/LoggingModule.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using PhotoRenamer.Base;
|
||||
using PhotoRenamer.Logging.Views;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Prism.Regions;
|
||||
|
||||
namespace PhotoRenamer.Logging
|
||||
{
|
||||
public class LoggingModule : IModule
|
||||
{
|
||||
private readonly IRegionManager _regionManager;
|
||||
|
||||
public LoggingModule(IRegionManager regionManager)
|
||||
{
|
||||
_regionManager = regionManager;
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.RegisterForNavigation<ViewA>();
|
||||
_regionManager.RequestNavigate(RegionNames.LoggingRegion, new Uri(nameof(ViewA), UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
19
PhotoRenamer.Logging/PhotoRenamer.Logging.csproj
Normal file
19
PhotoRenamer.Logging/PhotoRenamer.Logging.csproj
Normal file
@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<UseWPF>true</UseWPF>
|
||||
<AssemblyName>PhotoRenamer.Logging</AssemblyName>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Prism.Wpf" Version="7.2.0.1422" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PhotoRenamer.Base\PhotoRenamer.Base.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
14
PhotoRenamer.Logging/ViewModels/ViewAViewModel.cs
Normal file
14
PhotoRenamer.Logging/ViewModels/ViewAViewModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System.Windows.Input;
|
||||
using JetBrains.Annotations;
|
||||
using Prism.Mvvm;
|
||||
|
||||
namespace PhotoRenamer.Logging.ViewModels
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class ViewAViewModel : BindableBase
|
||||
{
|
||||
public ICommand SelectFilesCommand { get; }
|
||||
|
||||
public ICommand ClearCommand { get; }
|
||||
}
|
||||
}
|
17
PhotoRenamer.Logging/Views/ViewA.xaml
Normal file
17
PhotoRenamer.Logging/Views/ViewA.xaml
Normal file
@ -0,0 +1,17 @@
|
||||
<UserControl
|
||||
x:Class="PhotoRenamer.Logging.Views.ViewA"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:viewModels="clr-namespace:PhotoRenamer.Logging.ViewModels"
|
||||
d:DataContext="{d:DesignInstance viewModels:ViewAViewModel}"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="300"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d">
|
||||
<GroupBox Margin="5" Header="Log">
|
||||
<ListView />
|
||||
</GroupBox>
|
||||
</UserControl>
|
13
PhotoRenamer.Logging/Views/ViewA.xaml.cs
Normal file
13
PhotoRenamer.Logging/Views/ViewA.xaml.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace PhotoRenamer.Logging.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ViewA.xaml
|
||||
/// </summary>
|
||||
public partial class ViewA
|
||||
{
|
||||
public ViewA()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user