Commit 02acfd1c by wangonghui

Merge branch 'master' of http://49.233.21.66/liulongfei/VIZ.TVP

parents 7afb1f14 5f6b37e9
...@@ -41,6 +41,11 @@ namespace VIZ.TVP.Domain ...@@ -41,6 +41,11 @@ namespace VIZ.TVP.Domain
public static SelectionManager SelectionManager { get; private set; } = new SelectionManager(); public static SelectionManager SelectionManager { get; private set; } = new SelectionManager();
/// <summary> /// <summary>
/// 本地VIZ渲染器管理器
/// </summary>
public static LocalVizManager LocalVizManager { get; private set; } = new LocalVizManager();
/// <summary>
/// 当前项目领域 /// 当前项目领域
/// </summary> /// </summary>
public static ProjectDomain CurrentProjectDomain { get; set; } public static ProjectDomain CurrentProjectDomain { get; set; }
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 本地VIZ管理器
/// </summary>
public class LocalVizManager
{
/// <summary>
/// VIZ渲染器名字
/// </summary>
public string VizRendererName { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 节目单删除消息
/// </summary>
public class ProgramListDeleteMessage
{
/// <summary>
/// 删除的节目单模型
/// </summary>
public ProgramListModel DeletedProgramListModel { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Domain
{
/// <summary>
/// 节目单项删除消息
/// </summary>
public class ProgramListItemDeleteMessage
{
/// <summary>
/// 删除的节目单项
/// </summary>
public ProgramListItemModel DeletedProgramListItemModel { get; set; }
}
}
...@@ -29,6 +29,11 @@ namespace VIZ.TVP.Domain ...@@ -29,6 +29,11 @@ namespace VIZ.TVP.Domain
/// </summary> /// </summary>
public ProgramListItemEntity Entity { get; private set; } public ProgramListItemEntity Entity { get; private set; }
/// <summary>
/// 对象ID
/// </summary>
public string ObjectID { get; private set; } = Guid.NewGuid().ToString();
#region TemplateID -- 模板ID #region TemplateID -- 模板ID
private string templateID; private string templateID;
......
...@@ -75,11 +75,14 @@ ...@@ -75,11 +75,14 @@
<Compile Include="Enum\PluginIDs.cs" /> <Compile Include="Enum\PluginIDs.cs" />
<Compile Include="Enum\ServiceKeys.cs" /> <Compile Include="Enum\ServiceKeys.cs" />
<Compile Include="Manager\DataBaseManager.cs" /> <Compile Include="Manager\DataBaseManager.cs" />
<Compile Include="Manager\LocalVizManager.cs" />
<Compile Include="Manager\PluginManager.cs" /> <Compile Include="Manager\PluginManager.cs" />
<Compile Include="Manager\SelectionManager.cs" /> <Compile Include="Manager\SelectionManager.cs" />
<Compile Include="Manager\TVPConnectionManager.cs" /> <Compile Include="Manager\TVPConnectionManager.cs" />
<Compile Include="Manager\WindowManager.cs" /> <Compile Include="Manager\WindowManager.cs" />
<Compile Include="Message\Program\ProgramListDeleteMessage.cs" />
<Compile Include="Message\Program\ProgramListItemChangedMessage.cs" /> <Compile Include="Message\Program\ProgramListItemChangedMessage.cs" />
<Compile Include="Message\Program\ProgramListItemDeleteMessage.cs" />
<Compile Include="Message\Project\ProjectChangedMessage.cs" /> <Compile Include="Message\Project\ProjectChangedMessage.cs" />
<Compile Include="Message\Project\ProjectSaveMessage.cs" /> <Compile Include="Message\Project\ProjectSaveMessage.cs" />
<Compile Include="Model\Plugin\PluginConfigModel.cs" /> <Compile Include="Model\Plugin\PluginConfigModel.cs" />
......
...@@ -29,7 +29,7 @@ namespace VIZ.TVP.Module ...@@ -29,7 +29,7 @@ namespace VIZ.TVP.Module
/// <summary> /// <summary>
/// 插件程序集前缀 /// 插件程序集前缀
/// </summary> /// </summary>
public const string PLUGIN_ASSEMBLY_PREFIX = "VIZ.TVP.Plugin."; public const string PLUGIN_ASSEMBLY_PREFIX = "VIZ.TVP.";
/// <summary> /// <summary>
/// 插件控制器 /// 插件控制器
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:local="clr-namespace:VIZ.TVP.Module" xmlns:local="clr-namespace:VIZ.TVP.Module"
d:DataContext="{d:DesignInstance Type=local:PluginPanelViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<Grid> <Grid Background="Transparent">
<TextBlock Text="插件面板" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" FontSize="36"></TextBlock> <fcommon:NavigationControl ItemsSource="{Binding ItemsSource}"
SelectedValue="{Binding Path=SelectedItem,Mode=TwoWay}"></fcommon:NavigationControl>
</Grid> </Grid>
</UserControl> </UserControl>
using System; using log4net;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VIZ.Framework.Common;
using VIZ.Framework.Plugin; using VIZ.Framework.Plugin;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module namespace VIZ.TVP.Module
{ {
/// <summary> /// <summary>
/// 插件视图模型基类 /// 插件视图模型
/// </summary> /// </summary>
public class PluginPanelViewModel : PluginViewModelBase public class PluginPanelViewModel : PluginViewModelBase
{ {
/// <summary> /// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(PluginPanelViewModel));
/// <summary>
/// 插件视图模型
/// </summary>
public PluginPanelViewModel()
{
// 初始化消息
this.initMessage();
}
/// <summary>
/// 初始化消息
/// </summary>
private void initMessage()
{
ApplicationDomainEx.MessageManager.Register<ProgramListItemChangedMessage>(this, this.OnProgramListItemChangedMessage);
ApplicationDomainEx.MessageManager.Register<ProgramListDeleteMessage>(this, this.OnProgramListDeleteMessage);
ApplicationDomainEx.MessageManager.Register<ProgramListItemDeleteMessage>(this, this.OnProgramListItemDeleteMessage);
}
// ==========================================================================
// Property
// ==========================================================================
#region ItemsSource -- 插件项集合
private ObservableCollection<NavigationConfig> itemsSource = new ObservableCollection<NavigationConfig>();
/// <summary>
/// 插件项集合
/// </summary>
public ObservableCollection<NavigationConfig> ItemsSource
{
get { return itemsSource; }
set { itemsSource = value; this.RaisePropertyChanged(nameof(ItemsSource)); }
}
#endregion
#region SelectedItem -- 当前选中项
private NavigationConfig selectedItem;
/// <summary>
/// 当前选中项
/// </summary>
public NavigationConfig SelectedItem
{
get { return selectedItem; }
set { selectedItem = value; this.RaisePropertyChanged(nameof(SelectedItem)); }
}
#endregion
// ==========================================================================
// Message
// ==========================================================================
/// <summary>
/// 当切换节目单项时触发
/// </summary>
/// <param name="msg">消息</param>
private void OnProgramListItemChangedMessage(ProgramListItemChangedMessage msg)
{
lock (this.ItemsSource)
{
// 该节目单项没有插件配置
if (msg.ProgramListItemModel == null || string.IsNullOrWhiteSpace(msg.ProgramListItemModel.PluginID))
{
this.SelectedItem = null;
return;
}
// 该节目单项对应的插件已经被实例化过
NavigationConfig config = this.ItemsSource.FirstOrDefault(p => p.Key == msg.ProgramListItemModel.ObjectID);
if (config != null)
{
this.SelectedItem = config;
return;
}
// 为该节目单项实例化插件
PluginInfo pluginInfo = ApplicationDomainEx.PluginManager.TemplatePlugins.FirstOrDefault(p => p.ID == msg.ProgramListItemModel.PluginID);
if (pluginInfo == null)
{
log.Error($"can`t found plugin id: {msg.ProgramListItemModel.PluginID}, plugin is unloaded or not exists");
return;
}
config = new NavigationConfig();
config.Key = msg.ProgramListItemModel.ObjectID;
config.ViewType = pluginInfo.ViewInfo.ViewType;
config.ViewModelType = pluginInfo.ViewInfo.ViewModelType;
this.ItemsSource.Add(config);
this.SelectedItem = config;
}
}
/// <summary>
/// 当删除节目单时触发
/// </summary>
/// <param name="msg">消息</param>
private void OnProgramListDeleteMessage(ProgramListDeleteMessage msg)
{
lock (this.itemsSource)
{
if (msg.DeletedProgramListModel == null)
return;
foreach (var item in msg.DeletedProgramListModel.Items)
{
// 未配置插件
if (string.IsNullOrWhiteSpace(item.PluginID))
continue;
// 未找到相关插件视图
NavigationConfig config = this.ItemsSource.FirstOrDefault(p => p.Key == item.ObjectID);
// 尝试移除导航配置
this.tryRemoveItem(config);
}
}
}
/// <summary>
/// 当删除节目单项时触发
/// </summary>
/// <param name="msg">消息</param>
private void OnProgramListItemDeleteMessage(ProgramListItemDeleteMessage msg)
{
lock (this.ItemsSource)
{
if (msg.DeletedProgramListItemModel == null)
return;
// 未配置插件
if (string.IsNullOrWhiteSpace(msg.DeletedProgramListItemModel.PluginID))
return;
// 未找到相关插件视图
NavigationConfig config = this.ItemsSource.FirstOrDefault(p => p.Key == msg.DeletedProgramListItemModel.ObjectID);
// 尝试移除导航配置
this.tryRemoveItem(config);
}
}
// ==========================================================================
// Public Function
// ==========================================================================
/// <summary>
/// 销毁 /// 销毁
/// </summary> /// </summary>
public override void Dispose() public override void Dispose()
{ {
} }
// ==========================================================================
// Private Function
// ==========================================================================
/// <summary>
/// 尝试移除导航配置
/// </summary>
/// <param name="config">配置</param>
private void tryRemoveItem(NavigationConfig config)
{
if (config == null)
return;
this.ItemsSource.Remove(config);
if (this.SelectedItem == config)
{
this.SelectedItem = null;
}
if (config.View != null && config.View.TryGetTarget(out object view))
{
try
{
IDisposable disposable = view as IDisposable;
disposable?.Dispose();
}
catch (Exception ex)
{
log.Error(ex);
}
}
if (config.ViewModel != null && config.ViewModel.TryGetTarget(out object vm))
{
try
{
IDisposable disposable = vm as IDisposable;
disposable?.Dispose();
}
catch (Exception ex)
{
log.Error(ex);
}
}
}
} }
} }
<UserControl x:Class="VIZ.TVP.Module.ProgramItemCreateView"
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:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:domain="clr-namespace:VIZ.TVP.Domain;assembly=VIZ.TVP.Domain"
xmlns:local="clr-namespace:VIZ.TVP.Module"
d:DataContext="{d:DesignInstance Type=local:ProgramItemCreateViewModel}"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="600">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
<!-- 场景 -->
<TextBlock Text="场景:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
<dxe:TextEdit Grid.Column="1" Height="30" IsReadOnly="True"
EditValue="{Binding Path=Scene}"></dxe:TextEdit>
<!-- 备注 -->
<TextBlock Text="备注:" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
<dxe:TextEdit Grid.Row="1" Grid.Column="1" Height="30"
EditValue="{Binding Path=Remark,Mode=TwoWay}"></dxe:TextEdit>
<!-- 层 -->
<TextBlock Text="层:" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
<dxe:ComboBoxEdit Grid.Row="2" Grid.Column="1" Height="30" IsTextEditable="False"
ItemsSource="{Binding Source={x:Static domain:ApplicationConstants.VIZ_LAYERS}}"
SelectedItem="{Binding Path=Layer,Mode=TwoWay}"></dxe:ComboBoxEdit>
<!-- 插件 -->
<TextBlock Text="插件:" Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
<dxe:ComboBoxEdit Grid.Row="3" Grid.Column="1" Height="30" IsTextEditable="False"
ItemsSource="{Binding Path=TemplatePlugins}" DisplayMember="DisplayName"
SelectedItem="{Binding Path=SelectedTemplatePlugin,Mode=TwoWay}"></dxe:ComboBoxEdit>
<!-- 按钮组 -->
<StackPanel Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
<Button Width="80" Height="30" Content="確定" Margin="10" Command="{Binding Path=EnterCommand}"></Button>
<Button Width="80" Height="30" Content="取消" Margin="10" Command="{Binding Path=CancelCommand}"></Button>
</StackPanel>
</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>
/// ProgramItemCreateView.xaml 的交互逻辑
/// </summary>
public partial class ProgramItemCreateView : UserControl
{
public ProgramItemCreateView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new ProgramItemCreateViewModel());
}
}
}
<dx:ThemedWindow x:Class="VIZ.TVP.Module.ProgramItemCreateWindow"
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"
WindowStartupLocation="CenterScreen" WindowStyle="None"
Title="创建节目单项" Height="300" Width="600">
<Grid>
<module:ProgramItemCreateView x:Name="programItemCreateView"></module:ProgramItemCreateView>
</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;
namespace VIZ.TVP.Module
{
/// <summary>
/// Interaction logic for ProgramItemCreateWindow.xaml
/// </summary>
public partial class ProgramItemCreateWindow : ThemedWindow
{
public ProgramItemCreateWindow()
{
InitializeComponent();
}
}
}
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<dxe:TextEditSettings TextWrapping="Wrap" TextTrimming="CharacterEllipsis" MaxLength="50"></dxe:TextEditSettings> <dxe:TextEditSettings TextWrapping="Wrap" TextTrimming="CharacterEllipsis" MaxLength="50"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings> </dxg:GridColumn.EditSettings>
</dxg:GridColumn> </dxg:GridColumn>
<dxg:GridColumn Header="层" FieldName="Layer" AllowSorting="False" AllowColumnFiltering="false"> <dxg:GridColumn Header="层" FieldName="Layer" AllowSorting="False" AllowColumnFiltering="False">
<dxg:GridColumn.EditSettings> <dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Source={x:Static domain:ApplicationConstants.VIZ_LAYERS}}" <dxe:ComboBoxEditSettings ItemsSource="{Binding Source={x:Static domain:ApplicationConstants.VIZ_LAYERS}}"
IsTextEditable="False"></dxe:ComboBoxEditSettings> IsTextEditable="False"></dxe:ComboBoxEditSettings>
......
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.Framework.Plugin;
using VIZ.TVP.Domain;
namespace VIZ.TVP.Module
{
/// <summary>
/// 节目单项创建视图模型
/// </summary>
public class ProgramItemCreateViewModel : ViewModelBase
{
public ProgramItemCreateViewModel()
{
// 初始化命令
this.initCommand();
}
/// <summary>
/// 初始化命令
/// </summary>
private void initCommand()
{
this.EnterCommand = new VCommand(this.Enter);
this.CancelCommand = new VCommand(this.Cancel);
}
// ===========================================================
// Property
// ===========================================================
#region Scene -- 场景
private string scene;
/// <summary>
/// 场景
/// </summary>
public string Scene
{
get { return scene; }
set { scene = value; this.RaisePropertyChanged(nameof(Scene)); }
}
#endregion
#region Remark -- 备注
private string remark;
/// <summary>
/// 备注
/// </summary>
public string Remark
{
get { return remark; }
set { remark = value; this.RaisePropertyChanged(nameof(Remark)); }
}
#endregion
#region Layer --
private string layer;
/// <summary>
/// 层
/// </summary>
public string Layer
{
get { return layer; }
set { layer = value; this.RaisePropertyChanged(nameof(Layer)); }
}
#endregion
#region TemplatePlugins -- 模板插件集合
private List<PluginInfo> templatePlugins;
/// <summary>
/// 模板插件集合
/// </summary>
public List<PluginInfo> TemplatePlugins
{
get { return templatePlugins; }
set { templatePlugins = value; this.RaisePropertyChanged(nameof(TemplatePlugins)); }
}
#endregion
#region SelectedTemplatePlugin -- 选中的模板插件
private PluginInfo selectedTemplatePlugin;
/// <summary>
/// 选中的模板插件
/// </summary>
public PluginInfo SelectedTemplatePlugin
{
get { return selectedTemplatePlugin; }
set { selectedTemplatePlugin = value; this.RaisePropertyChanged(nameof(SelectedTemplatePlugin)); }
}
#endregion
// ===========================================================
// Command
// ===========================================================
#region EnterCommand -- 确定命令
/// <summary>
/// 确定命令
/// </summary>
public VCommand EnterCommand { get; set; }
/// <summary>
/// 确定
/// </summary>
private void Enter()
{
Window window = this.GetWindow();
if (window == null)
return;
window.DialogResult = true;
window.Close();
}
#endregion
#region CancelCommand -- 取消命令
/// <summary>
/// 取消命令
/// </summary>
public VCommand CancelCommand { get; set; }
/// <summary>
/// 取消
/// </summary>
private void Cancel()
{
Window window = this.GetWindow();
if (window == null)
return;
window.DialogResult = false;
window.Close();
}
#endregion
// ===========================================================
// Public Function
// ===========================================================
/// <summary>
/// 初始化属性
/// </summary>
/// <param name="model">节目单项模型</param>
public void InitPropertys(ProgramListItemModel model)
{
// 基础属性
this.Scene = model.SceneName;
this.Remark = model.Remark;
this.Layer = model.Layer;
// 插件
this.TemplatePlugins = ApplicationDomainEx.PluginManager.TemplatePlugins;
// TODO: 匹配插件
}
/// <summary>
/// 更新节目单项模型属性
/// </summary>
/// <param name="model">节目单项模</param>
public void UpdateProgramListItemModel(ProgramListItemModel model)
{
model.Remark = this.Remark;
model.Layer = this.Layer;
model.PluginID = this.SelectedTemplatePlugin?.ID;
model.PluginName = this.SelectedTemplatePlugin?.DisplayName;
}
}
}
...@@ -309,7 +309,15 @@ namespace VIZ.TVP.Module ...@@ -309,7 +309,15 @@ namespace VIZ.TVP.Module
if (DXMessageBox.Show($"确定删除节目单{this.SelectedProgramListModel.Name}?", "提示", System.Windows.MessageBoxButton.OKCancel) != System.Windows.MessageBoxResult.OK) if (DXMessageBox.Show($"确定删除节目单{this.SelectedProgramListModel.Name}?", "提示", System.Windows.MessageBoxButton.OKCancel) != System.Windows.MessageBoxResult.OK)
return; return;
this.ProgramListModels.Remove(this.SelectedProgramListModel); // 移除节目单
ProgramListModel selected = this.SelectedProgramListModel;
this.ProgramListModels.Remove(selected);
// 发送删除节目单消息
ProgramListDeleteMessage msg = new ProgramListDeleteMessage();
msg.DeletedProgramListModel = selected;
ApplicationDomainEx.MessageManager.Send(msg);
} }
#endregion #endregion
...@@ -329,8 +337,15 @@ namespace VIZ.TVP.Module ...@@ -329,8 +337,15 @@ namespace VIZ.TVP.Module
if (this.SelectedProgramListModel == null || this.SelectedProgramListModel.SelectedItem == null) if (this.SelectedProgramListModel == null || this.SelectedProgramListModel.SelectedItem == null)
return; return;
this.SelectedProgramListModel.Items.Remove(this.SelectedProgramListModel.SelectedItem); // 移除分组项
ProgramListItemModel selected = this.SelectedProgramListModel.SelectedItem;
this.SelectedProgramListModel.Items.Remove(selected);
this.SelectedProgramListModel.SelectedItem = null; this.SelectedProgramListModel.SelectedItem = null;
// 发送移除节目单项命令
ProgramListItemDeleteMessage msg = new ProgramListItemDeleteMessage();
msg.DeletedProgramListItemModel = selected;
ApplicationDomainEx.MessageManager.Send(msg);
} }
#endregion #endregion
...@@ -358,6 +373,17 @@ namespace VIZ.TVP.Module ...@@ -358,6 +373,17 @@ namespace VIZ.TVP.Module
model.ListID = this.SelectedProgramListModel.ListID; model.ListID = this.SelectedProgramListModel.ListID;
model.ProgramListModel = this.SelectedProgramListModel; model.ProgramListModel = this.SelectedProgramListModel;
model.FromProgramTemplateModel(this.SelectedSceneTemplateModel); model.FromProgramTemplateModel(this.SelectedSceneTemplateModel);
// 编辑节目单项属性 & 管理模板插件
ProgramItemCreateWindow window = new ProgramItemCreateWindow();
ProgramItemCreateViewModel vm = window.programItemCreateView.DataContext as ProgramItemCreateViewModel;
vm.InitPropertys(model);
if (window.ShowDialog() != true)
return;
vm.UpdateProgramListItemModel(model);
if (model.ThumbnailBitmap == null) if (model.ThumbnailBitmap == null)
{ {
ThreadHelper.SafeRun(() => ThreadHelper.SafeRun(() =>
......
...@@ -90,6 +90,14 @@ ...@@ -90,6 +90,14 @@
<Reference Include="WindowsFormsIntegration" /> <Reference Include="WindowsFormsIntegration" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="Program\View\ProgramItemCreateWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Program\View\ProgramItemCreateView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SettingInner\Control\View\ControlSettingView.xaml"> <Page Include="SettingInner\Control\View\ControlSettingView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -180,6 +188,13 @@ ...@@ -180,6 +188,13 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Program\View\ProgramItemCreateWindow.xaml.cs">
<DependentUpon>ProgramItemCreateWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Program\ViewModel\ProgramItemCreateViewModel.cs" />
<Compile Include="Program\View\ProgramItemCreateView.xaml.cs">
<DependentUpon>ProgramItemCreateView.xaml</DependentUpon>
</Compile>
<Compile Include="SettingInner\Control\ViewModel\ControlSettingViewModel.cs" /> <Compile Include="SettingInner\Control\ViewModel\ControlSettingViewModel.cs" />
<Compile Include="SettingInner\Control\View\ControlSettingView.xaml.cs"> <Compile Include="SettingInner\Control\View\ControlSettingView.xaml.cs">
<DependentUpon>ControlSettingView.xaml</DependentUpon> <DependentUpon>ControlSettingView.xaml</DependentUpon>
......
using DevExpress.Mvvm.Native; using DevExpress.Mvvm.Native;
using DevExpress.Printing.StreamingPagination;
using log4net; using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -64,13 +65,26 @@ namespace VIZ.TVP.Module ...@@ -64,13 +65,26 @@ namespace VIZ.TVP.Module
ThreadHelper.SafeRun(() => ThreadHelper.SafeRun(() =>
{ {
LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
// Step 1. 启动进程 // Step 1. 启动进程
this.VizProcess = new Process(); this.VizProcess = new Process();
this.VizProcess.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(path); this.VizProcess.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(path);
this.VizProcess.StartInfo.FileName = System.IO.Path.GetFileName(path); this.VizProcess.StartInfo.FileName = System.IO.Path.GetFileName(path);
// " -o -P -db Guest:@localhost/VizDbServer:19396" //VIZ3: " -o -P -db Guest:@localhost/VizDbServer:19396"
//VIZ4: "-u1 -n -M -e Guest:@localhost/VizDbServer:19396"
LocalInfoEntity loginInfo = ApplicationDomainEx.DataBaseManager.LocalInfo; LocalInfoEntity loginInfo = ApplicationDomainEx.DataBaseManager.LocalInfo;
this.VizProcess.StartInfo.Arguments = $" -o -P -db {loginInfo.VIZ_UserName}:@{loginInfo.VIZ_IP}/{loginInfo.GH_ServerName}:{loginInfo.GH_Port}";
if (info.LocalEngineType == LocalEngineType.Eng3)
{
this.VizProcess.StartInfo.Arguments = $" -o -P -db {loginInfo.VIZ_UserName}:@{loginInfo.VIZ_IP}/{loginInfo.GH_ServerName}:{loginInfo.GH_Port}";
}
if (info.LocalEngineType == LocalEngineType.Eng4)
{
this.VizProcess.StartInfo.Arguments = $" -o -P -db {loginInfo.VIZ_UserName}:@{loginInfo.VIZ_IP}/{loginInfo.GH_ServerName}:{loginInfo.GH_Port}";
//this.VizProcess.StartInfo.Arguments = $" -u1 -n -M -e {loginInfo.VIZ_UserName}:@{loginInfo.VIZ_IP}/{loginInfo.GH_ServerName}:{loginInfo.GH_Port}";
}
this.VizProcess.StartInfo.UseShellExecute = true; this.VizProcess.StartInfo.UseShellExecute = true;
this.VizProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal; this.VizProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
this.VizProcess.Start(); this.VizProcess.Start();
...@@ -87,8 +101,18 @@ namespace VIZ.TVP.Module ...@@ -87,8 +101,18 @@ namespace VIZ.TVP.Module
{ {
System.Threading.Thread.Sleep(1000); System.Threading.Thread.Sleep(1000);
string cmd = $"RENDERER WINDOW_OPEN_ON_PARENT 0x{hWnd.ToString("X6")} {width} {height} ONAIR"; if (info.LocalEngineType == LocalEngineType.Eng3)
connectionModel.EndpointManager.Send(cmd); {
string cmd = $"RENDERER WINDOW_OPEN_ON_PARENT 0x{hWnd.ToString("X6")} {width} {height} ONAIR";
connectionModel.EndpointManager.Send(cmd);
}
else if (string.IsNullOrWhiteSpace(ApplicationDomainEx.LocalVizManager.VizRendererName) && info.LocalEngineType == LocalEngineType.Eng4)
{
// 创建 EDITOR
ApplicationDomainEx.LocalVizManager.VizRendererName = connectionModel.EndpointManager.Request("EDITOR CREATE RENDERER");
string cmd = $"{ApplicationDomainEx.LocalVizManager.VizRendererName} WINDOW_OPEN_ON_PARENT 0x{hWnd.ToString("X6")} {width} {height} ONAIR";
connectionModel.EndpointManager.Send(cmd);
}
WPFHelper.Invoke(() => WPFHelper.Invoke(() =>
{ {
......
...@@ -157,6 +157,7 @@ namespace VIZ.TVP.Module ...@@ -157,6 +157,7 @@ namespace VIZ.TVP.Module
/// </summary> /// </summary>
private void WindowHostSizeChanged(System.Windows.SizeChangedEventArgs e) private void WindowHostSizeChanged(System.Windows.SizeChangedEventArgs e)
{ {
LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
TVPConnectionModel local = ApplicationDomainEx.TVPConnectionManager.LocalConnection; TVPConnectionModel local = ApplicationDomainEx.TVPConnectionManager.LocalConnection;
if (local == null || !local.IsConnected) if (local == null || !local.IsConnected)
...@@ -169,7 +170,14 @@ namespace VIZ.TVP.Module ...@@ -169,7 +170,14 @@ namespace VIZ.TVP.Module
ImageHelper.AdjustSize(width, height, 1920, 1080, out width, out height); ImageHelper.AdjustSize(width, height, 1920, 1080, out width, out height);
local.EndpointManager.Send($"RENDERER WINDOW_RESIZE {width} {height}"); if (info.LocalEngineType == LocalEngineType.Eng3)
{
local.EndpointManager.Send($"RENDERER WINDOW_RESIZE {width} {height}");
}
else
{
local.EndpointManager.Send($"{ApplicationDomainEx.LocalVizManager.VizRendererName} WINDOW_RESIZE {width} {height}");
}
} }
#endregion #endregion
......
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("VIZ.TVP.Plugin.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VIZ.TVP.Plugin.Test")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
//若要开始生成可本地化的应用程序,请设置
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
//例如,如果您在源文件中使用的是美国英语,
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly:ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(未在页面中找到资源时使用,
//或应用程序资源字典中找到时使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(未在页面中找到资源时使用,
//、应用程序或任何主题专用资源字典中找到时使用)
)]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace VIZ.TVP.Plugin.Test.Properties {
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if ((resourceMan == null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VIZ.TVP.Plugin.Test.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace VIZ.TVP.Plugin.Test.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
\ No newline at end of file
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.Plugin;
namespace VIZ.TVP.Plugin.Test
{
/// <summary>
/// 测试插件生命周期
/// </summary>
public class TestPluginLifeCycle : ITemplatePluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = "TestPlugin";
/// <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(TestPluginView), typeof(TestPluginViewModel));
return info;
}
/// <summary>
/// 初始化
/// </summary>
public void Initialize()
{
}
/// <summary>
/// 销毁
/// </summary>
public void Dispose()
{
}
}
}
<UserControl x:Class="VIZ.TVP.Plugin.Test.TestPluginView"
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.Plugin.Test"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<TextBlock Text="TestPluginView" VerticalAlignment="Center" HorizontalAlignment="Center"
Foreground="Red" FontSize="36"></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.Plugin.Test
{
/// <summary>
/// TestPluginView.xaml 的交互逻辑
/// </summary>
public partial class TestPluginView : UserControl
{
public TestPluginView()
{
InitializeComponent();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
namespace VIZ.TVP.Plugin.Test
{
/// <summary>
/// 测试插件视图模型
/// </summary>
public class TestPluginViewModel : ViewModelBase
{
}
}
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:VIZ.TVP.Plugin.Test">
</ResourceDictionary>
<?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>{B31C8C74-8B93-4247-9425-98AE346170BE}</ProjectGuid>
<OutputType>library</OutputType>
<RootNamespace>VIZ.TVP.Plugin.Test</RootNamespace>
<AssemblyName>VIZ.TVP.Plugin.Test</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<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>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Page Include="Test\View\TestPluginView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Test\TestPluginLifeCycle.cs" />
<Compile Include="Test\ViewModel\TestPluginViewModel.cs" />
<Compile Include="Test\View\TestPluginView.xaml.cs">
<DependentUpon>TestPluginView.xaml</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</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">
<Project>{75b39591-4bc3-4b09-bd7d-ec9f67efa96e}</Project>
<Name>VIZ.Framework.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Domain\VIZ.Framework.Domain.csproj">
<Project>{28661e82-c86a-4611-a028-c34f6ac85c97}</Project>
<Name>VIZ.Framework.Domain</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.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">
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.TVP.Plugin\VIZ.TVP.Plugin.csproj">
<Project>{75b858df-c0ac-4b56-b109-5c21317af0ce}</Project>
<Name>VIZ.TVP.Plugin</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
...@@ -83,6 +83,7 @@ namespace VIZ.TVP.Service ...@@ -83,6 +83,7 @@ namespace VIZ.TVP.Service
{ {
ProgramListItemModel model = new ProgramListItemModel(entity); ProgramListItemModel model = new ProgramListItemModel(entity);
model.PropertyFromEntity(); model.PropertyFromEntity();
model.PluginName = ApplicationDomainEx.PluginManager.TemplatePlugins.FirstOrDefault(p => p.ID == model.PluginID)?.DisplayName;
if (!dic.TryGetValue(model.ListID, out ProgramListModel owner)) if (!dic.TryGetValue(model.ListID, out ProgramListModel owner))
continue; continue;
......
...@@ -93,6 +93,10 @@ ...@@ -93,6 +93,10 @@
<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>
...@@ -101,6 +105,10 @@ ...@@ -101,6 +105,10 @@
<Project>{65425cb5-7465-4e36-86a7-416341c8793c}</Project> <Project>{65425cb5-7465-4e36-86a7-416341c8793c}</Project>
<Name>VIZ.TVP.Domain</Name> <Name>VIZ.TVP.Domain</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>
......
...@@ -100,7 +100,16 @@ namespace VIZ.TVP.Service ...@@ -100,7 +100,16 @@ namespace VIZ.TVP.Service
if (connection == null) if (connection == null)
throw new ArgumentNullException(nameof(connection)); throw new ArgumentNullException(nameof(connection));
connection.EndpointManager.Send($"RENDERER SET_TITLE_AREA {(show ? 1 : 0)}"); LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
if (info.LocalEngineType == LocalEngineType.Eng3)
{
connection.EndpointManager.Send($"RENDERER SET_TITLE_AREA {(show ? 1 : 0)}");
}
else if (info.LocalEngineType == LocalEngineType.Eng4)
{
connection.EndpointManager.Send($"{ApplicationDomainEx.LocalVizManager.VizRendererName} SET_TITLE_AREA {(show ? 1 : 0)}");
}
} }
/// <summary> /// <summary>
...@@ -113,7 +122,16 @@ namespace VIZ.TVP.Service ...@@ -113,7 +122,16 @@ namespace VIZ.TVP.Service
if (connection == null) if (connection == null)
throw new ArgumentNullException(nameof(connection)); throw new ArgumentNullException(nameof(connection));
connection.EndpointManager.Send($"RENDERER SET_SAFE_AREA {(show ? 1 : 0)}"); LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
if (info.LocalEngineType == LocalEngineType.Eng3)
{
connection.EndpointManager.Send($"RENDERER SET_SAFE_AREA {(show ? 1 : 0)}");
}
else if (info.LocalEngineType == LocalEngineType.Eng4)
{
connection.EndpointManager.Send($"{ApplicationDomainEx.LocalVizManager.VizRendererName} SET_SAFE_AREA {(show ? 1 : 0)}");
}
} }
/// <summary> /// <summary>
...@@ -126,7 +144,16 @@ namespace VIZ.TVP.Service ...@@ -126,7 +144,16 @@ namespace VIZ.TVP.Service
if (connection == null) if (connection == null)
throw new ArgumentNullException(nameof(connection)); throw new ArgumentNullException(nameof(connection));
connection.EndpointManager.Send($"RENDERER SHOW_BOUNDING_BOX {(show ? 1 : 0)}"); LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
if (info.LocalEngineType == LocalEngineType.Eng3)
{
connection.EndpointManager.Send($"RENDERER SHOW_BOUNDING_BOX {(show ? 1 : 0)}");
}
else if (info.LocalEngineType == LocalEngineType.Eng4)
{
connection.EndpointManager.Send($"{ApplicationDomainEx.LocalVizManager.VizRendererName} SHOW_BOUNDING_BOX {(show ? 1 : 0)}");
}
} }
/// <summary> /// <summary>
...@@ -138,7 +165,16 @@ namespace VIZ.TVP.Service ...@@ -138,7 +165,16 @@ namespace VIZ.TVP.Service
if (connection == null) if (connection == null)
throw new ArgumentNullException(nameof(connection)); throw new ArgumentNullException(nameof(connection));
connection.EndpointManager.Send($"RENDERER SET_KEY 0,RENDERER*KEY_INTERNAL*ACTIVE SET 0"); LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
if (info.LocalEngineType == LocalEngineType.Eng3)
{
connection.EndpointManager.Send($"RENDERER SET_KEY 0,RENDERER*KEY_INTERNAL*ACTIVE SET 0");
}
else if (info.LocalEngineType == LocalEngineType.Eng4)
{
connection.EndpointManager.Send($"{ApplicationDomainEx.LocalVizManager.VizRendererName} SET_KEY 0,RENDERER*KEY_INTERNAL*ACTIVE SET 0");
}
} }
/// <summary> /// <summary>
...@@ -150,7 +186,16 @@ namespace VIZ.TVP.Service ...@@ -150,7 +186,16 @@ namespace VIZ.TVP.Service
if (connection == null) if (connection == null)
throw new ArgumentNullException(nameof(connection)); throw new ArgumentNullException(nameof(connection));
connection.EndpointManager.Send($"RENDERER SET_KEY 1,RENDERER*KEY_INTERNAL*ACTIVE SET 0"); LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
if (info.LocalEngineType == LocalEngineType.Eng3)
{
connection.EndpointManager.Send($"RENDERER SET_KEY 1,RENDERER*KEY_INTERNAL*ACTIVE SET 0");
}
else if (info.LocalEngineType == LocalEngineType.Eng4)
{
connection.EndpointManager.Send($"{ApplicationDomainEx.LocalVizManager.VizRendererName} SET_KEY 1,RENDERER*KEY_INTERNAL*ACTIVE SET 0");
}
} }
/// <summary> /// <summary>
...@@ -162,7 +207,16 @@ namespace VIZ.TVP.Service ...@@ -162,7 +207,16 @@ namespace VIZ.TVP.Service
if (connection == null) if (connection == null)
throw new ArgumentNullException(nameof(connection)); throw new ArgumentNullException(nameof(connection));
connection.EndpointManager.Send($"RENDERER SET_KEY 0,RENDERER*KEY_INTERNAL*IMAGE RESET,RENDERER*KEY_INTERNAL*ACTIVE SET 1"); LocalInfoEntity info = ApplicationDomainEx.DataBaseManager.LocalInfo;
if (info.LocalEngineType == LocalEngineType.Eng3)
{
connection.EndpointManager.Send($"RENDERER SET_KEY 0,RENDERER*KEY_INTERNAL*IMAGE RESET,RENDERER*KEY_INTERNAL*ACTIVE SET 1");
}
else if (info.LocalEngineType == LocalEngineType.Eng4)
{
connection.EndpointManager.Send($"{ApplicationDomainEx.LocalVizManager.VizRendererName} SET_KEY 0,RENDERER*KEY_INTERNAL*IMAGE RESET,RENDERER*KEY_INTERNAL*ACTIVE SET 1");
}
} }
} }
} }
...@@ -70,6 +70,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Service", "VIZ.TVP. ...@@ -70,6 +70,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Service", "VIZ.TVP.
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Module.Resource", "VIZ.TVP.Module.Resource\VIZ.TVP.Module.Resource.csproj", "{18AC4721-CEF0-4D91-BE3A-65829313B2C7}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Module.Resource", "VIZ.TVP.Module.Resource\VIZ.TVP.Module.Resource.csproj", "{18AC4721-CEF0-4D91-BE3A-65829313B2C7}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Plugin.Test", "VIZ.TVP.Plugin.Test\VIZ.TVP.Plugin.Test.csproj", "{B31C8C74-8B93-4247-9425-98AE346170BE}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -222,6 +224,14 @@ Global ...@@ -222,6 +224,14 @@ Global
{18AC4721-CEF0-4D91-BE3A-65829313B2C7}.Release|Any CPU.Build.0 = Release|Any CPU {18AC4721-CEF0-4D91-BE3A-65829313B2C7}.Release|Any CPU.Build.0 = Release|Any CPU
{18AC4721-CEF0-4D91-BE3A-65829313B2C7}.Release|x64.ActiveCfg = Release|x64 {18AC4721-CEF0-4D91-BE3A-65829313B2C7}.Release|x64.ActiveCfg = Release|x64
{18AC4721-CEF0-4D91-BE3A-65829313B2C7}.Release|x64.Build.0 = Release|x64 {18AC4721-CEF0-4D91-BE3A-65829313B2C7}.Release|x64.Build.0 = Release|x64
{B31C8C74-8B93-4247-9425-98AE346170BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B31C8C74-8B93-4247-9425-98AE346170BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B31C8C74-8B93-4247-9425-98AE346170BE}.Debug|x64.ActiveCfg = Debug|x64
{B31C8C74-8B93-4247-9425-98AE346170BE}.Debug|x64.Build.0 = Debug|x64
{B31C8C74-8B93-4247-9425-98AE346170BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B31C8C74-8B93-4247-9425-98AE346170BE}.Release|Any CPU.Build.0 = Release|Any CPU
{B31C8C74-8B93-4247-9425-98AE346170BE}.Release|x64.ActiveCfg = Release|Any CPU
{B31C8C74-8B93-4247-9425-98AE346170BE}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
...@@ -245,6 +255,7 @@ Global ...@@ -245,6 +255,7 @@ Global
{39A3CDBE-2132-4C71-BF2F-F99A9E966109} = {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} {B4FAA424-E356-465B-B0BA-7B915C4F8E2A} = {D835160C-344B-4EE4-8441-3847686C4AB0}
{18AC4721-CEF0-4D91-BE3A-65829313B2C7} = {68E0F44E-70C5-4D7D-A0BC-0D8A56D8B979} {18AC4721-CEF0-4D91-BE3A-65829313B2C7} = {68E0F44E-70C5-4D7D-A0BC-0D8A56D8B979}
{B31C8C74-8B93-4247-9425-98AE346170BE} = {68E0F44E-70C5-4D7D-A0BC-0D8A56D8B979}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {25E4D7B8-911F-47E7-8C18-B6F002A07E00} SolutionGuid = {25E4D7B8-911F-47E7-8C18-B6F002A07E00}
......
ID,PluginID,Group,DisplayName,Type ID,PluginID,Group,DisplayName,Type
1,1,CBA,CBA,Plugin 1,TestPlugin,,Բ,TemplatePlugin
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