Commit bd592e0f by liulongfei

预览更新

parent 28138c77
...@@ -54,6 +54,12 @@ namespace VIZ.Package.Domain ...@@ -54,6 +54,12 @@ namespace VIZ.Package.Domain
void PreviewOut(ConnModel conn); void PreviewOut(ConnModel conn);
/// <summary> /// <summary>
/// 预览更新
/// </summary>
/// <param name="conn"></param>
void PreviewUpdate(ConnModel conn);
/// <summary>
/// 打开页后触发 /// 打开页后触发
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
mc:Ignorable="d" d:Background="Black" mc:Ignorable="d" d:Background="Black"
d:DataContext="{d:DesignInstance Type=local:AboutCustomControlFieldWindowModel}" d:DataContext="{d:DesignInstance Type=local:AboutCustomControlFieldWindowModel}"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
Title="摩羯座播控系统" Height="700" Width="800"> Title="摩羯座播控系统" Height="700" Width="800">
<Grid> <Grid>
<RichTextBox IsReadOnly="True" Background="Transparent" Margin="5" Foreground="White"> <RichTextBox IsReadOnly="True" Background="Transparent" Margin="5" Foreground="White">
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
Icon="/VIZ.Package.Module.Resource;component/Icons/stop_36x36.png" Icon="/VIZ.Package.Module.Resource;component/Icons/stop_36x36.png"
IconHover="/VIZ.Package.Module.Resource;component/Icons/stop_hover_36x36.png" IconHover="/VIZ.Package.Module.Resource;component/Icons/stop_hover_36x36.png"
Command="{Binding Path=StopCommand}"></fcommon:IconButton> Command="{Binding Path=StopCommand}"></fcommon:IconButton>
<fcommon:IconButton Content="更新" Margin="5,0,0,0" Style="{StaticResource IconButton_Preview}"
Icon="/VIZ.Package.Module.Resource;component/Icons/stop_36x36.png"
IconHover="/VIZ.Package.Module.Resource;component/Icons/stop_hover_36x36.png"
Command="{Binding Path=UpdateCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
......
...@@ -47,6 +47,7 @@ namespace VIZ.Package.Module ...@@ -47,6 +47,7 @@ namespace VIZ.Package.Module
this.PlayCommand = new VCommand(this.Play); this.PlayCommand = new VCommand(this.Play);
this.ContinueCommand = new VCommand(this.Continue); this.ContinueCommand = new VCommand(this.Continue);
this.StopCommand = new VCommand(this.Stop); this.StopCommand = new VCommand(this.Stop);
this.UpdateCommand = new VCommand(this.Update);
this.ShowRGBCommand = new VCommand(this.ShowRGB); this.ShowRGBCommand = new VCommand(this.ShowRGB);
this.ShowKeyCommand = new VCommand(this.ShowKey); this.ShowKeyCommand = new VCommand(this.ShowKey);
this.ShowKeyPreviewCommand = new VCommand(this.ShowKeyPreview); this.ShowKeyPreviewCommand = new VCommand(this.ShowKeyPreview);
...@@ -380,6 +381,40 @@ namespace VIZ.Package.Module ...@@ -380,6 +381,40 @@ namespace VIZ.Package.Module
#endregion #endregion
#region UpdateCommand -- 更新命令
/// <summary>
/// 更新命令
/// </summary>
public VCommand UpdateCommand { get; set; }
/// <summary>
/// 更新
/// </summary>
private void Update()
{
// 更新控制字段List的值
IFieldTreeService service = ApplicationDomainEx.ServiceManager.GetService<IFieldTreeService>(ViewServiceKeys.FIELD_TREE_SERVICE);
if (service == null)
return;
// 尝试更新控制字段List的值
service.TryUpdateControlFieldListValue();
// 执行更新流程
this.Execute((obj, view, conn) =>
{
if (obj != null)
{
this.vizCommandControlObjectService.SetControlObject(conn, obj);
this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes);
}
view?.PreviewUpdate(conn);
});
}
#endregion
// -------------------------------- // --------------------------------
// 其他 // 其他
......
...@@ -115,6 +115,13 @@ namespace VIZ.Package.TestPlugin ...@@ -115,6 +115,13 @@ namespace VIZ.Package.TestPlugin
{ } { }
/// <summary> /// <summary>
/// 预览更新
/// </summary>
/// <param name="conn"></param>
public void PreviewUpdate(ConnModel conn)
{ }
/// <summary>
/// 销毁 /// 销毁
/// </summary> /// </summary>
public void Dispose() public void Dispose()
......
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