模块化
This commit is contained in:
19
UpdateInfoModule/UpdateInfoModule.cs
Normal file
19
UpdateInfoModule/UpdateInfoModule.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Reflection;
|
||||
using UpdateInfoModule.Views;
|
||||
|
||||
namespace UpdateInfoModule
|
||||
{
|
||||
public class UpdateInfoModule : IModule
|
||||
{
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
IRegionManager regionManager = containerProvider.Resolve<IRegionManager>();
|
||||
regionManager.RegisterViewWithRegion("ShellViewManager", typeof(UpdateInfoView));
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.RegisterForNavigation<UpdateInfoView>("UpdateInfoView");
|
||||
}
|
||||
}
|
||||
}
|
||||
20
UpdateInfoModule/UpdateInfoModule.csproj
Normal file
20
UpdateInfoModule/UpdateInfoModule.csproj
Normal file
@@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\UIShare\UIShare.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Views\UpdateInfoView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
30
UpdateInfoModule/ViewModels/UpdateInfoViewModel.cs
Normal file
30
UpdateInfoModule/ViewModels/UpdateInfoViewModel.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using UIShare.ViewModelBase;
|
||||
|
||||
namespace UpdateInfoModule.ViewModels
|
||||
{
|
||||
public class UpdateInfoViewModel : NavigateViewModelBase
|
||||
{
|
||||
#region 属性
|
||||
|
||||
|
||||
#endregion
|
||||
#region 命令
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
public UpdateInfoViewModel(IContainerProvider containerProvider) : base(containerProvider)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
#region 命令处理
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
15
UpdateInfoModule/Views/UpdateInfoView.xaml
Normal file
15
UpdateInfoModule/Views/UpdateInfoView.xaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="UpdateInfoModule.Views.UpdateInfoView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
d:DesignHeight="1080"
|
||||
d:DesignWidth="1920">
|
||||
<Grid Background="Yellow">
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
UpdateInfoModule/Views/UpdateInfoView.xaml.cs
Normal file
28
UpdateInfoModule/Views/UpdateInfoView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace UpdateInfoModule.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// UpdateInfoView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class UpdateInfoView : UserControl
|
||||
{
|
||||
public UpdateInfoView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user