Commit 72e51754 by liulongfei

添加默认页

parent 39917ebe
...@@ -30,5 +30,20 @@ namespace VIZ.TVP.Domain ...@@ -30,5 +30,20 @@ namespace VIZ.TVP.Domain
/// 本地资源 /// 本地资源
/// </summary> /// </summary>
public const string LOCAL_RESOURCE = "LOCAL_RESOURCE"; public const string LOCAL_RESOURCE = "LOCAL_RESOURCE";
/// <summary>
/// 媒体资源
/// </summary>
public const string MEDIA_RESOURCE = "MEDIA_RESOURCE";
/// <summary>
/// 节目模板
/// </summary>
public const string PROGRAM_TEMPLATE = "PROGRAM_TEMPLATE";
/// <summary>
/// 节目单
/// </summary>
public const string PROGRAM_LIST = "PROGRAM_LIST";
} }
} }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module
{
/// <summary>
/// 节目单插件生命周期
/// </summary>
public class ProgramListPluginLifeCycle : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = PluginIDs.PROGRAM_LIST;
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_DISPLAY_NAME = "节目单";
/// <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(ProgramListView), typeof(ProgramListViewModel));
return info;
}
/// <summary>
/// 初始化
/// </summary>
public void Initialize()
{
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
}
}
}
<UserControl x:Class="VIZ.TVP.Module.ProgramListView"
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="节目单" 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>
/// ProgramListView.xaml 的交互逻辑
/// </summary>
public partial class ProgramListView : UserControl
{
public ProgramListView()
{
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>
/// 节目单视图模型
/// </summary>
public class ProgramListViewModel : PluginViewModelBase
{
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module
{
/// <summary>
/// 节目模板插件生命周期
/// </summary>
public class ProgramTemplatePluginLifeCycle : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = PluginIDs.PROGRAM_TEMPLATE;
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_DISPLAY_NAME = "节目模板";
/// <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(ProgramTemplateView), typeof(ProgramTemplateViewModel));
return info;
}
/// <summary>
/// 初始化
/// </summary>
public void Initialize()
{
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
}
}
}
<UserControl x:Class="VIZ.TVP.Module.ProgramTemplateView"
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="节目模板" 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>
/// ProgramTemplateView.xaml 的交互逻辑
/// </summary>
public partial class ProgramTemplateView : UserControl
{
public ProgramTemplateView()
{
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>
/// 节目模板视图模型
/// </summary>
public class ProgramTemplateViewModel : PluginViewModelBase
{
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module
{
/// <summary>
/// 本地资源插件生命周期
/// </summary>
public class LocalResourcePluginLifeCycle : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = PluginIDs.LOCAL_RESOURCE;
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_DISPLAY_NAME = "本地资源";
/// <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(LocalResourceView), typeof(LocalResourceViewModel));
return info;
}
/// <summary>
/// 初始化
/// </summary>
public void Initialize()
{
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
}
}
}
<UserControl x:Class="VIZ.TVP.Module.LocalResourceView"
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="本地资源" 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>
/// LocalResourceView.xaml 的交互逻辑
/// </summary>
public partial class LocalResourceView : UserControl
{
public LocalResourceView()
{
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>
/// 本地资源视图模型
/// </summary>
public class LocalResourceViewModel : PluginViewModelBase
{
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module
{
/// <summary>
/// 媒体资源插件生命周期
/// </summary>
public class MediaResourcePluginLifeCycle : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = PluginIDs.MEDIA_RESOURCE;
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_DISPLAY_NAME = "媒体资源";
/// <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(MediaResourceView), typeof(MediaResourceViewModel));
return info;
}
/// <summary>
/// 初始化
/// </summary>
public void Initialize()
{
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
}
}
}
<UserControl x:Class="VIZ.TVP.Module.MediaResourceView"
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="媒体资源" 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>
/// MediaResourceView.xaml 的交互逻辑
/// </summary>
public partial class MediaResourceView : UserControl
{
public MediaResourceView()
{
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>
/// 媒体资源视图模型
/// </summary>
public class MediaResourceViewModel : PluginViewModelBase
{
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
}
}
}
...@@ -94,6 +94,22 @@ ...@@ -94,6 +94,22 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="Program\ProgramList\View\ProgramListView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Program\ProgramTemplate\View\ProgramTemplateView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resource\MediaResource\View\MediaResourceView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resource\LocalResource\View\LocalResourceView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Login\View\LoginView.xaml"> <Page Include="Login\View\LoginView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -114,7 +130,7 @@ ...@@ -114,7 +130,7 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="VizResource\View\VizResourceView.xaml"> <Page Include="Resource\VizResource\View\VizResourceView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
...@@ -127,6 +143,25 @@ ...@@ -127,6 +143,25 @@
<DependentUpon>DebugView.xaml</DependentUpon> <DependentUpon>DebugView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Debug\ViewModel\DebugViewModel.cs" /> <Compile Include="Debug\ViewModel\DebugViewModel.cs" />
<Compile Include="Program\ProgramList\ProgramListPluginLifeCycle.cs" />
<Compile Include="Program\ProgramList\ViewModel\ProgramListViewModel.cs" />
<Compile Include="Program\ProgramList\View\ProgramListView.xaml.cs">
<DependentUpon>ProgramListView.xaml</DependentUpon>
</Compile>
<Compile Include="Program\ProgramTemplate\ProgramTemplatePluginLifeCycle.cs" />
<Compile Include="Program\ProgramTemplate\ViewModel\ProgramTemplateViewModel.cs" />
<Compile Include="Program\ProgramTemplate\View\ProgramTemplateView.xaml.cs">
<DependentUpon>ProgramTemplateView.xaml</DependentUpon>
</Compile>
<Compile Include="Resource\MediaResource\ViewModel\MediaResourceViewModel.cs" />
<Compile Include="Resource\MediaResource\View\MediaResourceView.xaml.cs">
<DependentUpon>MediaResourceView.xaml</DependentUpon>
</Compile>
<Compile Include="Resource\LocalResource\LocalResourcePluginLifeCycle.cs" />
<Compile Include="Resource\LocalResource\ViewModel\LocalResourceViewModel.cs" />
<Compile Include="Resource\LocalResource\View\LocalResourceView.xaml.cs">
<DependentUpon>LocalResourceView.xaml</DependentUpon>
</Compile>
<Compile Include="Login\Controller\Login\ILoginSupport.cs" /> <Compile Include="Login\Controller\Login\ILoginSupport.cs" />
<Compile Include="Login\Controller\Login\LoginController.cs" /> <Compile Include="Login\Controller\Login\LoginController.cs" />
<Compile Include="Login\Controller\Plugin\IPluginSupport.cs" /> <Compile Include="Login\Controller\Plugin\IPluginSupport.cs" />
...@@ -159,20 +194,21 @@ ...@@ -159,20 +194,21 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Resource\MediaResource\MediaResourcePluginLifeCycle.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_InitLiteDB.cs" /> <Compile Include="Setup\Provider\Setup\AppSetup_InitLiteDB.cs" />
<Compile Include="VizRender\Controller\VizController\IVizSupport.cs" /> <Compile Include="VizRender\Controller\VizController\IVizSupport.cs" />
<Compile Include="VizRender\Controller\VizController\VizController.cs" /> <Compile Include="VizRender\Controller\VizController\VizController.cs" />
<Compile Include="VizRender\Model\VizConnectionModel.cs" /> <Compile Include="VizRender\Model\VizConnectionModel.cs" />
<Compile Include="VizRender\ViewModel\VizRenderViewModel.cs" /> <Compile Include="VizRender\ViewModel\VizRenderViewModel.cs" />
<Compile Include="VizRender\VizRenderPluginLifeCycle.cs" /> <Compile Include="VizRender\VizRenderPluginLifeCycle.cs" />
<Compile Include="VizResource\Controller\VizResourceFile\IVizResourceFileSupport.cs" /> <Compile Include="Resource\VizResource\Controller\VizResourceFile\IVizResourceFileSupport.cs" />
<Compile Include="VizResource\Controller\VizResourceFile\VizResourceFileController.cs" /> <Compile Include="Resource\VizResource\Controller\VizResourceFile\VizResourceFileController.cs" />
<Compile Include="VizResource\Core\ResourceFolderNodeImageSelector.cs" /> <Compile Include="Resource\VizResource\Core\ResourceFolderNodeImageSelector.cs" />
<Compile Include="VizResource\View\VizResourceView.xaml.cs"> <Compile Include="Resource\VizResource\View\VizResourceView.xaml.cs">
<DependentUpon>VizResourceView.xaml</DependentUpon> <DependentUpon>VizResourceView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="VizResource\VizResourcePluginLifeCycle.cs" /> <Compile Include="Resource\VizResource\VizResourcePluginLifeCycle.cs" />
<Compile Include="VizResource\ViewModel\VizResourceViewModel.cs" /> <Compile Include="Resource\VizResource\ViewModel\VizResourceViewModel.cs" />
<Compile Include="VizRender\View\VizRenderView.xaml.cs"> <Compile Include="VizRender\View\VizRenderView.xaml.cs">
<DependentUpon>VizRenderView.xaml</DependentUpon> <DependentUpon>VizRenderView.xaml</DependentUpon>
</Compile> </Compile>
...@@ -247,6 +283,10 @@ ...@@ -247,6 +283,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Login\Service\" /> <Folder Include="Login\Service\" />
<Folder Include="Program\ProgramList\Controller\" />
<Folder Include="Program\ProgramTemplate\Controller\" />
<Folder Include="Resource\LocalResource\Controller\" />
<Folder Include="Resource\MediaResource\Controller\" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -52,8 +52,9 @@ namespace VIZ.TVP.Module ...@@ -52,8 +52,9 @@ namespace VIZ.TVP.Module
{ {
this.Support.IsEngineReady = false; this.Support.IsEngineReady = false;
int width = (int)view.ActualWidth; var dpi = WPFHelper.GetDpiByGraphics();
int height = (int)view.ActualHeight; int width = (int)(view.host.ActualWidth * (dpi.X / 96d));
int height = (int)(view.host.ActualHeight * (dpi.Y / 96d));
IntPtr hWnd = view.host.ContainerFormHandle; IntPtr hWnd = view.host.ContainerFormHandle;
IntPtr vizHandle = IntPtr.Zero; IntPtr vizHandle = IntPtr.Zero;
......
...@@ -8,6 +8,7 @@ using VIZ.Framework.Plugin; ...@@ -8,6 +8,7 @@ using VIZ.Framework.Plugin;
using VIZ.TVP.Connection; using VIZ.TVP.Connection;
using VIZ.TVP.Domain; using VIZ.TVP.Domain;
using VIZ.TVP.Storage; using VIZ.TVP.Storage;
using static VIZ.Framework.Core.WPFHelper;
namespace VIZ.TVP.Module namespace VIZ.TVP.Module
{ {
...@@ -113,8 +114,10 @@ namespace VIZ.TVP.Module ...@@ -113,8 +114,10 @@ namespace VIZ.TVP.Module
if (this.connectionModel == null || !this.connectionModel.IsConnected) if (this.connectionModel == null || !this.connectionModel.IsConnected)
return; return;
int width = (int)e.NewSize.Width; var dpi = WPFHelper.GetDpiByGraphics();
int height = (int)e.NewSize.Height;
int width = (int)(e.NewSize.Width * (dpi.X / 96d));
int height = (int)(e.NewSize.Height * (dpi.Y / 96d));
this.connectionModel.EndpointManager.Send($"RENDERER WINDOW_RESIZE {width} {height}"); this.connectionModel.EndpointManager.Send($"RENDERER WINDOW_RESIZE {width} {height}");
} }
...@@ -141,6 +144,7 @@ namespace VIZ.TVP.Module ...@@ -141,6 +144,7 @@ namespace VIZ.TVP.Module
config.Name = "测试VIZ引擎"; config.Name = "测试VIZ引擎";
config.EngineType = TVPEngineType.VIZ; config.EngineType = TVPEngineType.VIZ;
config.FullPath = @"D:\Program Files (x86)\Vizrt\Viz3\viz.exe"; config.FullPath = @"D:\Program Files (x86)\Vizrt\Viz3\viz.exe";
//config.FullPath = @"C:\Program Files\Vizrt\Viz3\viz.exe";
// -------------------------------------------------------------------- // --------------------------------------------------------------------
...@@ -149,8 +153,6 @@ namespace VIZ.TVP.Module ...@@ -149,8 +153,6 @@ namespace VIZ.TVP.Module
connectionModel.ID = "test"; connectionModel.ID = "test";
connectionModel.InitEndpointManager(new VizEndpointManager("test", "localhost", 6100)); connectionModel.InitEndpointManager(new VizEndpointManager("test", "localhost", 6100));
int width = (int)view.host.ActualWidth;
int height = (int)view.host.ActualHeight;
this.vizController.StartVizEngine(view, config, this.connectionModel); this.vizController.StartVizEngine(view, config, this.connectionModel);
} }
......
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