Commit 2c393f71 by liulongfei

项目搭建

parent bdb9d682
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Domain;
using VIZ.Framework.Plugin;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 应用程序域
/// </summary>
public class ApplicationDomainEx : ApplicationDomain
{
/// <summary>
/// 插件管理器
/// </summary>
public static PluginManager PluginManager { get; private set; } = new PluginManager();
/// <summary>
/// 窗口管理器
/// </summary>
public static WindowManager WindowManager { get; private set; } = new WindowManager();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 插件ID集合
/// </summary>
public static class PluginIDs
{
/// <summary>
/// 日志
/// </summary>
public const string LOG = "LOG";
/// <summary>
/// VIZ渲染
/// </summary>
public const string VIZ_RENDER = "VIZ_RENDER";
/// <summary>
/// VIZ资源
/// </summary>
public const string VIZ_RESOURCE = "VIZ_RESOURCE";
/// <summary>
/// 本地资源
/// </summary>
public const string LOCAL_RESOURCE = "LOCAL_RESOURCE";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 服务键
/// </summary>
public static class ServiceKeys
{
/// <summary>
/// 日志服务
/// </summary>
public const string LOG_SERVICE = "LOG_SERVICE";
/// <summary>
/// VIZ资源服务
/// </summary>
public const string VIZ_RESOURCE_SERVICE = "VIZ_RESOURCE_SERVICE";
/// <summary>
/// 本地资源服务
/// </summary>
public const string LOCAL_RESOURCE_SERVICE = "LOCAL_RESOURCE_SERVICE";
}
}
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 插件管理器
/// </summary>
public class PluginManager
{
/// <summary>
/// 插件集合
/// </summary>
public List<PluginInfo> Plugins { get; private set; } = new List<PluginInfo>();
/// <summary>
/// 模板插件集合
/// </summary>
public List<PluginInfo> TemplatePlugins { get; private set; } = new List<PluginInfo>();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 窗口管理器
/// </summary>
public class WindowManager
{
/// <summary>
/// 登录窗口类型
/// </summary>
public Type LoginWindowType { get; set; }
/// <summary>
/// 主窗口类型
/// </summary>
public Type MainWindowType { get; set; }
/// <summary>
/// 登录窗口
/// </summary>
public Window LoginWindow { get; set; }
/// <summary>
/// 主窗口
/// </summary>
public Window MainWindow { get; set; }
}
}
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -49,6 +50,11 @@ ...@@ -49,6 +50,11 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ApplicationDomainEx.cs" />
<Compile Include="Enum\PluginIDs.cs" />
<Compile Include="Enum\ServiceKeys.cs" />
<Compile Include="Manager\PluginManager.cs" />
<Compile Include="Manager\WindowManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
...@@ -60,10 +66,18 @@ ...@@ -60,10 +66,18 @@
<Project>{28661e82-c86a-4611-a028-c34f6ac85c97}</Project> <Project>{28661e82-c86a-4611-a028-c34f6ac85c97}</Project>
<Name>VIZ.Framework.Domain</Name> <Name>VIZ.Framework.Domain</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\Viz.Framework.Plugin\VIZ.Framework.Plugin.csproj">
<Project>{39a3cdbe-2132-4c71-bf2f-f99a9e966109}</Project>
<Name>VIZ.Framework.Plugin</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj"> <ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj">
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project> <Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name> <Name>VIZ.Framework.Storage</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj">
<Project>{75b858df-c0ac-4b56-b109-5c21317af0ce}</Project>
<Name>VIZ.TVP.Plugin</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj"> <ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj">
<Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project> <Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project>
<Name>VIZ.TVP.Storage</Name> <Name>VIZ.TVP.Storage</Name>
......
...@@ -7,6 +7,6 @@ ...@@ -7,6 +7,6 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid>
<Button Width="120" Height="40" Command="{Binding TestCommand}"></Button>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -12,6 +12,7 @@ using System.Windows.Media; ...@@ -12,6 +12,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Navigation; using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.TVP.Module namespace VIZ.TVP.Module
{ {
...@@ -23,6 +24,8 @@ namespace VIZ.TVP.Module ...@@ -23,6 +24,8 @@ namespace VIZ.TVP.Module
public DebugView() public DebugView()
{ {
InitializeComponent(); InitializeComponent();
WPFHelper.BindingViewModel(this, new DebugViewModel());
} }
} }
} }
<Window x:Class="VIZ.TVP.Module.Debug.DebugWindow" <dx:ThemedWindow x:Class="VIZ.TVP.Module.DebugWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:VIZ.TVP.Module"
xmlns:local="clr-namespace:VIZ.TVP.Module.Debug" Title="调试窗口" Height="400" Width="600" WindowStartupLocation="CenterScreen">
mc:Ignorable="d"
Title="DebugWindow" Height="450" Width="800">
<Grid> <Grid>
<local:DebugView Margin="10"></local:DebugView>
</Grid> </Grid>
</Window> </dx:ThemedWindow>
using System; using DevExpress.Xpf.Core;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
...@@ -12,12 +12,13 @@ using System.Windows.Media; ...@@ -12,12 +12,13 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace VIZ.TVP.Module.Debug
namespace VIZ.TVP.Module
{ {
/// <summary> /// <summary>
/// DebugWindow.xaml 的交互逻辑 /// Interaction logic for DebugWindow.xaml
/// </summary> /// </summary>
public partial class DebugWindow : Window public partial class DebugWindow : ThemedWindow
{ {
public DebugWindow() public DebugWindow()
{ {
......
...@@ -4,6 +4,7 @@ using System.Linq; ...@@ -4,6 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module namespace VIZ.TVP.Module
{ {
...@@ -12,5 +13,32 @@ namespace VIZ.TVP.Module ...@@ -12,5 +13,32 @@ namespace VIZ.TVP.Module
/// </summary> /// </summary>
public class DebugViewModel : ViewModelBase public class DebugViewModel : ViewModelBase
{ {
public DebugViewModel()
{
this.TestCommand = new VCommand(this.Test);
}
// ==================================================================================
// Command
// ==================================================================================
#region TestCommand -- 测试命令
/// <summary>
/// 测试命令
/// </summary>
public VCommand TestCommand { get; set; }
/// <summary>
/// 测试
/// </summary>
private void Test()
{
ILogService service = ApplicationDomainEx.ServiceManager.GetService<ILogService>(ServiceKeys.LOG_SERVICE);
service.AppendLog("this is a try.");
}
#endregion
} }
} }
<dx:ThemedWindow x:Class="VIZ.TVP.Module.DebugWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:local="clr-namespace:VIZ.TVP.Module"
Title="DebugWindow" Height="400" Width="600">
<Grid>
<local:DebugView Margin="10"></local:DebugView>
</Grid>
</dx:ThemedWindow>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Module
{
/// <summary>
/// 登录支持
/// </summary>
public interface ILoginSupport
{
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Module
{
/// <summary>
/// 登录控制器
/// </summary>
public class LoginController
{
/// <summary>
/// 登录控制器
/// </summary>
/// <param name="support">支持</param>
public LoginController(ILoginSupport support)
{
this.Support = support;
}
/// <summary>
/// 支持
/// </summary>
public ILoginSupport Support { get; private set; }
/// <summary>
/// 登录
/// </summary>
/// <returns>是否成功执行登录</returns>
public bool Login()
{
return true;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Module
{
/// <summary>
/// 插件支持
/// </summary>
public interface IPluginSupport
{
}
}
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
using VIZ.TVP.Plugin;
namespace VIZ.TVP.Module
{
/// <summary>
/// 插件控制器
/// </summary>
/// <remarks>
/// 1. 插件命名空间为 VIZ.TVP.Plugin 开头
/// 2. 实现IPluginAssemblyLifeCycle接口
/// </remarks>
public class PluginController
{
/// <summary>
/// 日志
/// </summary>
private static readonly ILog log = LogManager.GetLogger(typeof(PluginController));
/// <summary>
/// 插件程序集前缀
/// </summary>
public const string PLUGIN_ASSEMBLY_PREFIX = "VIZ.TVP.Plugin";
/// <summary>
/// 插件控制器
/// </summary>
/// <param name="support">支持</param>
public PluginController(IPluginSupport support)
{
this.Support = support;
}
/// <summary>
/// 支持
/// </summary>
public IPluginSupport Support { get; private set; }
/// <summary>
/// 开始异步加载插件
/// </summary>
public void BeginLoadPlugins()
{
Task.Run(() =>
{
try
{
// 加载插件
this.executeLoadPlugins();
// 加载模板插件
this.executeLoadTemplatePlugins();
}
catch (Exception ex)
{
log.Error(ex);
}
});
}
/// <summary>
/// 执行加载内置插件
/// </summary>
private void executeLoadPlugins()
{
Assembly assembly = this.GetType().Assembly;
string version = assembly.GetCustomAttribute<AssemblyVersionAttribute>()?.Version;
Type[] types = assembly.GetTypes();
Type lifeCycleType = typeof(IPluginLifeCycle);
foreach (Type type in types)
{
if (!lifeCycleType.IsAssignableFrom(type))
continue;
IPluginLifeCycle lifeCycle = type.Assembly.CreateInstance(type.FullName) as IPluginLifeCycle;
if (lifeCycle == null)
{
log.Error($"init plugin type: {type.FullName} error.");
continue;
}
PluginInfo info = lifeCycle.Register();
info.LifeCycle = lifeCycle;
info.Version = version;
lifeCycle.Initialize();
ApplicationDomainEx.PluginManager.Plugins.Add(info);
}
}
/// <summary>
/// 执行加载模板插件
/// </summary>
private void executeLoadTemplatePlugins()
{
string[] files = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory);
foreach (string file in files)
{
string fileName = System.IO.Path.GetFileName(file);
if (!fileName.StartsWith(PLUGIN_ASSEMBLY_PREFIX))
continue;
Assembly assembly = Assembly.LoadFile(file);
string version = assembly.GetCustomAttribute<AssemblyVersionAttribute>()?.Version;
Type[] types = assembly.GetTypes();
Type lifeCycleType = typeof(ITemplatePluginLifeCycle);
foreach (Type type in types)
{
if (!lifeCycleType.IsAssignableFrom(type))
continue;
ITemplatePluginLifeCycle lifeCycle = type.Assembly.CreateInstance(type.FullName) as ITemplatePluginLifeCycle;
if (lifeCycle == null)
{
log.Error($"init template plugin type: {type.FullName} error.");
continue;
}
PluginInfo info = lifeCycle.Register();
info.LifeCycle = lifeCycle;
info.Version = version;
lifeCycle.Initialize();
ApplicationDomainEx.PluginManager.TemplatePlugins.Add(info);
}
}
}
}
}
<UserControl x:Class="VIZ.TVP.Module.LoginView"
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:local="clr-namespace:VIZ.TVP.Module"
d:DataContext="{d:DesignInstance Type=local:LoginViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Grid.Row="4" Content="登录" Command="{Binding Path=LoginCommand}"></Button>
</Grid>
</UserControl>
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;
using VIZ.Framework.Core;
namespace VIZ.TVP.Module
{
/// <summary>
/// LoginView.xaml 的交互逻辑
/// </summary>
public partial class LoginView : UserControl
{
public LoginView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new LoginViewModel());
}
}
}
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module
{
/// <summary>
/// 登录视图模型
/// </summary>
public class LoginViewModel : ViewModelBase, ILoginSupport, IPluginSupport
{
/// <summary>
/// 日志
/// </summary>
private static readonly ILog log = LogManager.GetLogger(typeof(LoginViewModel));
public LoginViewModel()
{
// 初始化命令
this.initCommand();
// 初始化控制器
this.initController();
}
/// <summary>
/// 初始化命令
/// </summary>
private void initCommand()
{
this.LoadedCommand = new VCommand(this.Loaded);
this.LoginCommand = new VCommand(this.Login);
}
/// <summary>
/// 初始化控制器
/// </summary>
private void initController()
{
this.loginController = new LoginController(this);
this.pluginController = new PluginController(this);
}
// ==================================================================================
// Property
// ==================================================================================
// ==================================================================================
// Controller
// ==================================================================================
/// <summary>
/// 登录控制器
/// </summary>
private LoginController loginController;
/// <summary>
/// 插件控制器
/// </summary>
private PluginController pluginController;
// ==================================================================================
// Command
// ==================================================================================
#region LoadedCommand -- 加载命令
/// <summary>
/// 加载命令
/// </summary>
public VCommand LoadedCommand { get; set; }
/// <summary>
/// 加载
/// </summary>
private void Loaded()
{
this.pluginController.BeginLoadPlugins();
}
#endregion
#region LoginCommand -- 登录命令
/// <summary>
/// 登录命令
/// </summary>
public VCommand LoginCommand { get; set; }
/// <summary>
/// 登录
/// </summary>
private void Login()
{
// 执行登录流程
if (!this.loginController.Login())
return;
// 成功登录
Window loginWindow = this.GetWindow();
loginWindow.ShowInTaskbar = false;
ApplicationDomainEx.WindowManager.MainWindow = ApplicationDomainEx.WindowManager.MainWindowType.Assembly.CreateInstance(ApplicationDomainEx.WindowManager.MainWindowType.FullName) as Window;
ApplicationDomainEx.WindowManager.MainWindow.Show();
loginWindow.Hide();
}
#endregion
}
}
<UserControl x:Class="VIZ.TVP.Module.MainView"
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:fplugin="clr-namespace:VIZ.Framework.Plugin;assembly=VIZ.Framework.Plugin"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
d:DataContext="{d:DesignInstance Type=local:MainViewModel}"
xmlns:local="clr-namespace:VIZ.TVP.Module"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<DataTemplate DataType="{x:Type fplugin:PluginInfo}">
<fplugin:PluginLoader ViewInfo="{Binding ViewInfo}"></fplugin:PluginLoader>
</DataTemplate>
<Style TargetType="{x:Type dxdo:LayoutPanel}">
<Setter Property="BindableName" Value="{Binding ID}" />
<Setter Property="Caption" Value="{Binding DisplayName}" />
<Setter Property="ShowCloseButton" Value="False"></Setter>
</Style>
<Style TargetType="{x:Type dxdo:DocumentPanel}">
<Setter Property="BindableName" Value="{Binding ID}" />
<Setter Property="Caption" Value="{Binding DisplayName}" />
<Setter Property="ShowCloseButton" Value="False"></Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
</Grid.RowDefinitions>
<dxdo:DockLayoutManager x:Name="dockLayoutManager" FloatingMode="Desktop">
<dxdo:LayoutGroup ItemsSource="{Binding ItemsSource}"></dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Content="Save" Click="Button_Click"></Button>
<Button Content="Load" Grid.Column="1" Click="Button_Click_1"></Button>
</Grid>
</Grid>
</UserControl>
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;
using VIZ.Framework.Core;
namespace VIZ.TVP.Module
{
/// <summary>
/// MainView.xaml 的交互逻辑
/// </summary>
public partial class MainView : UserControl
{
public MainView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new MainViewModel());
//this.Loaded += MainView_Loaded;
}
private void MainView_Loaded(object sender, RoutedEventArgs e)
{
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "1.xml");
this.dockLayoutManager.RestoreLayoutFromXml(path);
}
private void Button_Click(object sender, RoutedEventArgs e)
{
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "1.xml");
this.dockLayoutManager.SaveLayoutToXml(path);
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "1.xml");
this.dockLayoutManager.RestoreLayoutFromXml(path);
}
}
}
using DevExpress.Data.XtraReports.Native;
using log4net;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module
{
/// <summary>
/// 主视图模型
/// </summary>
public class MainViewModel : ViewModelBase
{
/// <summary>
/// 日志
/// </summary>
private static readonly ILog log = LogManager.GetLogger(typeof(MainViewModel));
public MainViewModel()
{
// 包含视图的插件
this.ItemsSource = ApplicationDomainEx.PluginManager.Plugins.Where(p => p.HasView).ToObservableCollection();
//
}
#region ItemsSource -- 视图项
private ObservableCollection<PluginInfo> itemsSource;
/// <summary>
/// 视图项
/// </summary>
public ObservableCollection<PluginInfo> ItemsSource
{
get { return itemsSource; }
set { itemsSource = value; this.RaisePropertyChanged(nameof(ItemsSource)); }
}
#endregion
}
}
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DevExpress.Data.Desktop.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v22.1.Core, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Core.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Docking.v22.1, Version=22.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
...@@ -56,12 +61,65 @@ ...@@ -56,12 +61,65 @@
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="Debug\View\DebugWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Debug\View\DebugView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Login\View\LoginView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Log\View\LogView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainView\View\MainView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Generic.xaml"> <Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="VizRender\View\VizRenderView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="VizResource\View\VizResourceView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Debug\View\DebugWindow.xaml.cs">
<DependentUpon>DebugWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Debug\View\DebugView.xaml.cs">
<DependentUpon>DebugView.xaml</DependentUpon>
</Compile>
<Compile Include="Debug\ViewModel\DebugViewModel.cs" />
<Compile Include="Login\Controller\Login\ILoginSupport.cs" />
<Compile Include="Login\Controller\Login\LoginController.cs" />
<Compile Include="Login\Controller\Plugin\IPluginSupport.cs" />
<Compile Include="Login\Controller\Plugin\PluginController.cs" />
<Compile Include="Login\ViewModel\LoginViewModel.cs" />
<Compile Include="Login\View\LoginView.xaml.cs">
<DependentUpon>LoginView.xaml</DependentUpon>
</Compile>
<Compile Include="Log\Service\ILogService.cs" />
<Compile Include="Log\ViewModel\LogViewModel.cs" />
<Compile Include="Log\View\LogView.xaml.cs">
<DependentUpon>LogView.xaml</DependentUpon>
</Compile>
<Compile Include="Log\LogPluginLifeCycle.cs" />
<Compile Include="MainView\ViewModel\MainViewModel.cs" />
<Compile Include="MainView\View\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
...@@ -75,6 +133,16 @@ ...@@ -75,6 +133,16 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="VizRender\ViewModel\VizRenderViewModel.cs" />
<Compile Include="VizRender\VizRenderPluginLifeCycle.cs" />
<Compile Include="VizResource\View\VizResourceView.xaml.cs">
<DependentUpon>VizResourceView.xaml</DependentUpon>
</Compile>
<Compile Include="VizResource\VizResourcePluginLifeCycle.cs" />
<Compile Include="VizResource\ViewModel\VizResourceViewModel.cs" />
<Compile Include="VizRender\View\VizRenderView.xaml.cs">
<DependentUpon>VizRenderView.xaml</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
...@@ -111,6 +179,10 @@ ...@@ -111,6 +179,10 @@
<Project>{47cf6fb0-e37d-4ef1-afc7-03db2bca8892}</Project> <Project>{47cf6fb0-e37d-4ef1-afc7-03db2bca8892}</Project>
<Name>VIZ.Framework.Module</Name> <Name>VIZ.Framework.Module</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\Viz.Framework.Plugin\VIZ.Framework.Plugin.csproj">
<Project>{39a3cdbe-2132-4c71-bf2f-f99a9e966109}</Project>
<Name>VIZ.Framework.Plugin</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj"> <ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj">
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project> <Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name> <Name>VIZ.Framework.Storage</Name>
...@@ -124,13 +196,21 @@ ...@@ -124,13 +196,21 @@
<Name>VIZ.TVP.Domain</Name> <Name>VIZ.TVP.Domain</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj"> <ProjectReference Include="..\VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj">
<Project>{67ac6fd3-9170-443e-b341-8d383b79c7e8}</Project> <Project>{75b858df-c0ac-4b56-b109-5c21317af0ce}</Project>
<Name>VIZ.TVP.Plugin</Name> <Name>VIZ.TVP.Plugin</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Service\VIZ.TVP.Service.csproj">
<Project>{b4faa424-e356-465b-b0ba-7b915c4f8e2a}</Project>
<Name>VIZ.TVP.Service</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj"> <ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj">
<Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project> <Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project>
<Name>VIZ.TVP.Storage</Name> <Name>VIZ.TVP.Storage</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Login\Service\" />
<Folder Include="Setup\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
<UserControl x:Class="VIZ.TVP.Module.VizRenderView"
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.TVP.Module"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<TextBlock Text="VIZ渲染" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="36" Foreground="Red"></TextBlock>
</Grid>
</UserControl>
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 VIZ.TVP.Module
{
/// <summary>
/// VizRenderView.xaml 的交互逻辑
/// </summary>
public partial class VizRenderView : UserControl
{
public VizRenderView()
{
InitializeComponent();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
namespace VIZ.TVP.Module
{
/// <summary>
/// VIZ渲染视图模型
/// </summary>
public class VizRenderViewModel : PluginViewModelBase
{
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
using VIZ.TVP.Plugin;
namespace VIZ.TVP.Module
{
/// <summary>
/// VIZ渲染插件生命周期
/// </summary>
public class VizRenderPluginLifeCycle : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = PluginIDs.VIZ_RENDER;
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_DISPLAY_NAME = "VIZ预览";
/// <summary>
/// 注册
/// </summary>
/// <returns>插件信息</returns>
public PluginInfo Register()
{
PluginInfo info = new PluginInfo();
info.ID = PLUGIN_ID;
info.DisplayName = PLUGIN_DISPLAY_NAME;
info.HasView = true;
info.HasSettingView = false;
info.ViewInfo = new PluginViewInfo(typeof(VizRenderView), typeof(VizRenderViewModel));
return info;
}
/// <summary>
/// 初始化
/// </summary>
public void Initialize()
{
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
}
}
}
<UserControl x:Class="VIZ.TVP.Module.VizResourceView"
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.TVP.Module"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>
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 VIZ.TVP.Module
{
/// <summary>
/// VizResourceView.xaml 的交互逻辑
/// </summary>
public partial class VizResourceView : UserControl
{
public VizResourceView()
{
InitializeComponent();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Framework.Plugin;
namespace VIZ.TVP.Module
{
/// <summary>
/// VIZ资源视图模型
/// </summary>
public class VizResourceViewModel : PluginViewModelBase
{
// ==================================================================================
// Property
// ==================================================================================
// ==================================================================================
// Command
// ==================================================================================
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
using VIZ.TVP.Plugin;
namespace VIZ.TVP.Module
{
/// <summary>
/// VIZ资源插件生命周期
/// </summary>
public class VizResourcePluginLifeCycle : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = PluginIDs.VIZ_RESOURCE;
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_DISPLAY_NAME = "VIZ资源";
/// <summary>
/// 注册
/// </summary>
/// <returns>插件信息</returns>
public PluginInfo Register()
{
PluginInfo info = new PluginInfo();
info.ID = PLUGIN_ID;
info.DisplayName = PLUGIN_DISPLAY_NAME;
info.HasView = true;
info.HasSettingView = false;
info.ViewInfo = new PluginViewInfo(typeof(VizResourceView), typeof(VizResourceViewModel));
return info;
}
/// <summary>
/// 初始化
/// </summary>
public void Initialize()
{
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
namespace VIZ.TVP.Plugin
{
/// <summary>
/// 模板插件生命周期
/// </summary>
public interface ITemplatePluginLifeCycle : IPluginLifeCycle
{
}
}
...@@ -20,7 +20,7 @@ using System.Runtime.InteropServices; ...@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("67ac6fd3-9170-443e-b341-8d383b79c7e8")] [assembly: Guid("75b858df-c0ac-4b56-b109-5c21317af0ce")]
// 程序集的版本信息由下列四个值组成: // 程序集的版本信息由下列四个值组成:
// //
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{67AC6FD3-9170-443E-B341-8D383B79C7E8}</ProjectGuid> <ProjectGuid>{75B858DF-C0AC-4B56-B109-5C21317AF0CE}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VIZ.TVP.Plugin</RootNamespace> <RootNamespace>VIZ.TVP.Plugin</RootNamespace>
...@@ -34,9 +34,6 @@ ...@@ -34,9 +34,6 @@
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -49,52 +46,23 @@ ...@@ -49,52 +46,23 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Interface\ITemplatePluginLifeCycle.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Common.Resource\VIZ.Framework.Common.Resource.csproj">
<Project>{76ef480a-e486-41b7-b7a5-2a849fc8d5bf}</Project>
<Name>VIZ.Framework.Common.Resource</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Common\VIZ.Framework.Common.csproj">
<Project>{92834c05-703e-4f05-9224-f36220939d8f}</Project>
<Name>VIZ.Framework.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Connection\VIZ.Framework.Connection.csproj">
<Project>{e07528dd-9dee-47c2-b79d-235ecfa6b003}</Project>
<Name>VIZ.Framework.Connection</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Core\VIZ.Framework.Core.csproj"> <ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Core\VIZ.Framework.Core.csproj">
<Project>{75b39591-4bc3-4b09-bd7d-ec9f67efa96e}</Project> <Project>{75b39591-4bc3-4b09-bd7d-ec9f67efa96e}</Project>
<Name>VIZ.Framework.Core</Name> <Name>VIZ.Framework.Core</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Domain\VIZ.Framework.Domain.csproj"> <ProjectReference Include="..\..\VIZ.Framework\Viz.Framework.Plugin\VIZ.Framework.Plugin.csproj">
<Project>{28661e82-c86a-4611-a028-c34f6ac85c97}</Project> <Project>{39a3cdbe-2132-4c71-bf2f-f99a9e966109}</Project>
<Name>VIZ.Framework.Domain</Name> <Name>VIZ.Framework.Plugin</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Module\VIZ.Framework.Module.csproj">
<Project>{47cf6fb0-e37d-4ef1-afc7-03db2bca8892}</Project>
<Name>VIZ.Framework.Module</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj">
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Connection\VIZ.TVP.Connection.csproj">
<Project>{c42e3144-2ad7-461b-80b8-491d69b3530e}</Project>
<Name>VIZ.TVP.Connection</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Domain\VIZ.TVP.Domain.csproj">
<Project>{65425cb5-7465-4e36-86a7-416341c8793c}</Project>
<Name>VIZ.TVP.Domain</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj">
<Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project>
<Name>VIZ.TVP.Storage</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <Folder Include="Info\" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.14" targetFramework="net48" /> <package id="log4net" version="2.0.14" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
</packages> </packages>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Service
{
/// <summary>
/// GH服务
/// </summary>
public class GHService : IGHService
{
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Service
{
/// <summary>
/// GH服务
/// </summary>
public interface IGHService
{
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("VIZ.TVP.Service")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VIZ.TVP.Service")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("b4faa424-e356-465b-b0ba-7b915c4f8e2a")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VIZ.TVP.Service</RootNamespace>
<AssemblyName>VIZ.TVP.Service</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="GH\Implementation\GHService.cs" />
<Compile Include="GH\Interface\IGHService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.14" targetFramework="net48" />
</packages>
\ No newline at end of file
...@@ -105,10 +105,6 @@ ...@@ -105,10 +105,6 @@
<Project>{d5e72447-d86a-443c-b0a4-e76bca89ae8d}</Project> <Project>{d5e72447-d86a-443c-b0a4-e76bca89ae8d}</Project>
<Name>VIZ.TVP.Module</Name> <Name>VIZ.TVP.Module</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj">
<Project>{67ac6fd3-9170-443e-b341-8d383b79c7e8}</Project>
<Name>VIZ.TVP.Plugin</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj"> <ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj">
<Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project> <Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project>
<Name>VIZ.TVP.Storage</Name> <Name>VIZ.TVP.Storage</Name>
......
...@@ -49,14 +49,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Module", "VIZ.TVP.M ...@@ -49,14 +49,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Module", "VIZ.TVP.M
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP", "VIZ.TVP\VIZ.TVP.csproj", "{FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP", "VIZ.TVP\VIZ.TVP.csproj", "{FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "55-Plugin", "55-Plugin", "{72D1C6DE-7B56-4963-89B3-FAE8B2D3F5B5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "25-Plugin", "25-Plugin", "{72D1C6DE-7B56-4963-89B3-FAE8B2D3F5B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Plugin", "VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj", "{67AC6FD3-9170-443E-B341-8D383B79C7E8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.UnitTest", "VIZ.TVP.UnitTest\VIZ.TVP.UnitTest.csproj", "{4FB7774A-F781-4059-A3F5-FA45E1669F60}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.UnitTest", "VIZ.TVP.UnitTest\VIZ.TVP.UnitTest.csproj", "{4FB7774A-F781-4059-A3F5-FA45E1669F60}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.WpfTest", "VIZ.TVP.WpfTest\VIZ.TVP.WpfTest.csproj", "{4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.WpfTest", "VIZ.TVP.WpfTest\VIZ.TVP.WpfTest.csproj", "{4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Plugin", "VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj", "{75B858DF-C0AC-4B56-B109-5C21317AF0CE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.Plugin", "..\VIZ.Framework\Viz.Framework.Plugin\VIZ.Framework.Plugin.csproj", "{39A3CDBE-2132-4C71-BF2F-F99A9E966109}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "55-Service", "55-Service", "{D835160C-344B-4EE4-8441-3847686C4AB0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Service", "VIZ.TVP.Service\VIZ.TVP.Service.csproj", "{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -161,14 +167,6 @@ Global ...@@ -161,14 +167,6 @@ Global
{FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}.Release|Any CPU.Build.0 = Release|Any CPU {FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}.Release|Any CPU.Build.0 = Release|Any CPU
{FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}.Release|x64.ActiveCfg = Release|Any CPU {FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}.Release|x64.ActiveCfg = Release|Any CPU
{FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}.Release|x64.Build.0 = Release|Any CPU {FA5C5192-FEEB-45A1-96B8-ACD2588EFC41}.Release|x64.Build.0 = Release|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Debug|x64.ActiveCfg = Debug|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Debug|x64.Build.0 = Debug|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Release|Any CPU.Build.0 = Release|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Release|x64.ActiveCfg = Release|Any CPU
{67AC6FD3-9170-443E-B341-8D383B79C7E8}.Release|x64.Build.0 = Release|Any CPU
{4FB7774A-F781-4059-A3F5-FA45E1669F60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4FB7774A-F781-4059-A3F5-FA45E1669F60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FB7774A-F781-4059-A3F5-FA45E1669F60}.Debug|Any CPU.Build.0 = Debug|Any CPU {4FB7774A-F781-4059-A3F5-FA45E1669F60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FB7774A-F781-4059-A3F5-FA45E1669F60}.Debug|x64.ActiveCfg = Debug|Any CPU {4FB7774A-F781-4059-A3F5-FA45E1669F60}.Debug|x64.ActiveCfg = Debug|Any CPU
...@@ -185,6 +183,30 @@ Global ...@@ -185,6 +183,30 @@ Global
{4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}.Release|Any CPU.Build.0 = Release|Any CPU {4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}.Release|Any CPU.Build.0 = Release|Any CPU
{4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}.Release|x64.ActiveCfg = Release|Any CPU {4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}.Release|x64.ActiveCfg = Release|Any CPU
{4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}.Release|x64.Build.0 = Release|Any CPU {4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5}.Release|x64.Build.0 = Release|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Debug|x64.ActiveCfg = Debug|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Debug|x64.Build.0 = Debug|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Release|Any CPU.Build.0 = Release|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Release|x64.ActiveCfg = Release|Any CPU
{75B858DF-C0AC-4B56-B109-5C21317AF0CE}.Release|x64.Build.0 = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|x64.ActiveCfg = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Debug|x64.Build.0 = Debug|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|Any CPU.Build.0 = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|x64.ActiveCfg = Release|Any CPU
{39A3CDBE-2132-4C71-BF2F-F99A9E966109}.Release|x64.Build.0 = Release|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Debug|x64.ActiveCfg = Debug|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Debug|x64.Build.0 = Debug|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Release|Any CPU.Build.0 = Release|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Release|x64.ActiveCfg = Release|Any CPU
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
...@@ -202,9 +224,11 @@ Global ...@@ -202,9 +224,11 @@ Global
{C42E3144-2AD7-461B-80B8-491D69B3530E} = {200F02F8-DF62-4DCA-9180-D38E24151490} {C42E3144-2AD7-461B-80B8-491D69B3530E} = {200F02F8-DF62-4DCA-9180-D38E24151490}
{D5E72447-D86A-443C-B0A4-E76BCA89AE8D} = {68E0F44E-70C5-4D7D-A0BC-0D8A56D8B979} {D5E72447-D86A-443C-B0A4-E76BCA89AE8D} = {68E0F44E-70C5-4D7D-A0BC-0D8A56D8B979}
{FA5C5192-FEEB-45A1-96B8-ACD2588EFC41} = {EC9AE10C-D65C-466D-9396-EC110B570AAE} {FA5C5192-FEEB-45A1-96B8-ACD2588EFC41} = {EC9AE10C-D65C-466D-9396-EC110B570AAE}
{67AC6FD3-9170-443E-B341-8D383B79C7E8} = {72D1C6DE-7B56-4963-89B3-FAE8B2D3F5B5}
{4FB7774A-F781-4059-A3F5-FA45E1669F60} = {04AEE067-B771-47B3-8E5C-D49D3F7E7D2E} {4FB7774A-F781-4059-A3F5-FA45E1669F60} = {04AEE067-B771-47B3-8E5C-D49D3F7E7D2E}
{4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5} = {04AEE067-B771-47B3-8E5C-D49D3F7E7D2E} {4E7B7F05-B099-4E95-9FD3-64EEA5E2EBC5} = {04AEE067-B771-47B3-8E5C-D49D3F7E7D2E}
{75B858DF-C0AC-4B56-B109-5C21317AF0CE} = {72D1C6DE-7B56-4963-89B3-FAE8B2D3F5B5}
{39A3CDBE-2132-4C71-BF2F-F99A9E966109} = {72D1C6DE-7B56-4963-89B3-FAE8B2D3F5B5}
{B4FAA424-E356-465B-B0BA-7B915C4F8E2A} = {D835160C-344B-4EE4-8441-3847686C4AB0}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {25E4D7B8-911F-47E7-8C18-B6F002A07E00} SolutionGuid = {25E4D7B8-911F-47E7-8C18-B6F002A07E00}
......
<Application x:Class="VIZ.TVP.App" <Application x:Class="VIZ.TVP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VIZ.TVP" xmlns:local="clr-namespace:VIZ.TVP">
StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>
</Application.Resources> </Application.Resources>
</Application> </Application>
using System; using DevExpress.Xpf.Core;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration; using System.Configuration;
using System.Data; using System.Data;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using VIZ.Framework.Core;
using VIZ.Framework.Module;
using VIZ.TVP.Domain;
using VIZ.TVP.Module;
namespace VIZ.TVP namespace VIZ.TVP
{ {
...@@ -13,5 +18,39 @@ namespace VIZ.TVP ...@@ -13,5 +18,39 @@ namespace VIZ.TVP
/// </summary> /// </summary>
public partial class App : Application public partial class App : Application
{ {
public App()
{
// 设置DevExpress主推
ApplicationThemeHelper.ApplicationThemeName = Theme.VS2019DarkName;
// TODO: AppSetup
// 执行启动流程
AppSetupContext context = AppSetup.Setup();
if (context.Exception != null)
{
MessageBox.Show($"执行 {context.ProviderDetail} 失败\r\n{context.Exception.Message}");
}
if (!context.IsSuccess)
{
Environment.Exit(-1);
}
// 初始化窗口
ApplicationDomainEx.WindowManager.LoginWindowType = typeof(LoginWindow);
ApplicationDomainEx.WindowManager.MainWindowType = typeof(MainWindow);
ApplicationDomainEx.WindowManager.LoginWindow = new LoginWindow();
ApplicationDomainEx.WindowManager.LoginWindow.Show();
// 调试窗口
if (ApplicationDomainEx.IS_DEBUG)
{
DebugWindow debugWindow = new DebugWindow();
debugWindow.Show();
debugWindow.Topmost = true;
}
}
} }
} }
<dx:ThemedWindow x:Class="VIZ.TVP.LoginWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:module="clr-namespace:VIZ.TVP.Module;assembly=VIZ.TVP.Module"
Title="咪咕播控系统" Height="600" Width="600" WindowStartupLocation="CenterScreen"
WindowStyle="SingleBorderWindow">
<Grid>
<module:LoginView></module:LoginView>
</Grid>
</dx:ThemedWindow>
using DevExpress.Xpf.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Shapes;
using VIZ.Framework.Module;
namespace VIZ.TVP
{
/// <summary>
/// Interaction logic for LoginWindow.xaml
/// </summary>
public partial class LoginWindow : ThemedWindow
{
public LoginWindow()
{
InitializeComponent();
this.Closed += MainWindow_Closed;
}
/// <summary>
/// 关闭窗口
/// </summary>
private void MainWindow_Closed(object sender, EventArgs e)
{
AppSetup.ShutDown();
Environment.Exit(0);
}
}
}
<dx:ThemedWindow <dx:ThemedWindow x:Class="VIZ.TVP.MainWindow"
x:Class="VIZ.TVP.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:module="clr-namespace:VIZ.TVP.Module;assembly=VIZ.TVP.Module"
Title="MainWindow" Height="800" Width="1000" Title="会智云播控系统" Height="800" Width="1000" WindowStartupLocation="CenterScreen" WindowState="Maximized">
>
<Grid> <Grid>
<module:MainView></module:MainView>
</Grid> </Grid>
</dx:ThemedWindow> </dx:ThemedWindow>
...@@ -11,7 +11,7 @@ using System.Windows.Input; ...@@ -11,7 +11,7 @@ using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
using VIZ.Framework.Module;
namespace VIZ.TVP namespace VIZ.TVP
{ {
...@@ -23,6 +23,18 @@ namespace VIZ.TVP ...@@ -23,6 +23,18 @@ namespace VIZ.TVP
public MainWindow() public MainWindow()
{ {
InitializeComponent(); InitializeComponent();
this.Closed += MainWindow_Closed;
}
/// <summary>
/// 关闭窗口
/// </summary>
private void MainWindow_Closed(object sender, EventArgs e)
{
AppSetup.ShutDown();
Environment.Exit(0);
} }
} }
} }
...@@ -73,6 +73,9 @@ ...@@ -73,6 +73,9 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="LoginWindow.xaml.cs">
<DependentUpon>LoginWindow.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs"> <Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon> <DependentUpon>MainWindow.xaml</DependentUpon>
</Compile> </Compile>
...@@ -133,6 +136,10 @@ ...@@ -133,6 +136,10 @@
<Project>{47cf6fb0-e37d-4ef1-afc7-03db2bca8892}</Project> <Project>{47cf6fb0-e37d-4ef1-afc7-03db2bca8892}</Project>
<Name>VIZ.Framework.Module</Name> <Name>VIZ.Framework.Module</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\Viz.Framework.Plugin\VIZ.Framework.Plugin.csproj">
<Project>{39a3cdbe-2132-4c71-bf2f-f99a9e966109}</Project>
<Name>VIZ.Framework.Plugin</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj"> <ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj">
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project> <Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name> <Name>VIZ.Framework.Storage</Name>
...@@ -150,15 +157,23 @@ ...@@ -150,15 +157,23 @@
<Name>VIZ.TVP.Module</Name> <Name>VIZ.TVP.Module</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj"> <ProjectReference Include="..\VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj">
<Project>{67ac6fd3-9170-443e-b341-8d383b79c7e8}</Project> <Project>{75b858df-c0ac-4b56-b109-5c21317af0ce}</Project>
<Name>VIZ.TVP.Plugin</Name> <Name>VIZ.TVP.Plugin</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Service\VIZ.TVP.Service.csproj">
<Project>{b4faa424-e356-465b-b0ba-7b915c4f8e2a}</Project>
<Name>VIZ.TVP.Service</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj"> <ProjectReference Include="..\VIZ.TVP.Storage\VIZ.TVP.Storage.csproj">
<Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project> <Project>{d9e0c48d-d7e7-4207-a999-2fded536d4da}</Project>
<Name>VIZ.TVP.Storage</Name> <Name>VIZ.TVP.Storage</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="LoginWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml"> <Page Include="MainWindow.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
......
[Application]
APPLICATION_IS_DEBUG=true
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment