added LoggingModule

This commit is contained in:
2020-01-11 21:15:49 +01:00
parent a17ea99642
commit ad1e92362d
18 changed files with 1354 additions and 27 deletions

View 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));
}
}
}

View 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>

View 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; }
}
}

View 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>

View File

@ -0,0 +1,13 @@
namespace PhotoRenamer.Logging.Views
{
/// <summary>
/// Interaction logic for ViewA.xaml
/// </summary>
public partial class ViewA
{
public ViewA()
{
InitializeComponent();
}
}
}