Commit fcdf418f by wangonghui
parents efcb5cd5 d7beaaee
......@@ -20,6 +20,21 @@ namespace VIZ.Package.Domain
/// </summary>
public const string SYSTEM_SET_UP = "系统启动";
/// <summary>
/// 启动预览
/// </summary>
public const string SYSTEM_SET_UP_PREVIEW = "启动预览";
/// <summary>
/// 发送Viz命令
/// </summary>
public const string SYSTEM_SEND_VIZ_COMMAND = "发送Viz命令";
/// <summary>
/// 触发快捷键
/// </summary>
public const string SYSTEM_HOT_KEY = "触发快捷键";
// ===============================================================================================
// 操作
// ===============================================================================================
......@@ -33,5 +48,88 @@ namespace VIZ.Package.Domain
/// 关闭系统
/// </summary>
public const string OPERATE_SHUTDOWN = "关闭系统";
// =============================================================================
// Viz预览
// =============================================================================
/// <summary>
/// 重启预览引擎
/// </summary>
public const string OPERATE_RESTART_PREVIEW = "重启预览引擎";
/// <summary>
/// 点击预览播放
/// </summary>
public const string OPERATE_PREVIEW_PLAY = "点击预览播放";
/// <summary>
/// 点击预览继续
/// </summary>
public const string OPERATE_PREVIEW_CONTINUE = "点击预览继续";
/// <summary>
/// 点击预览停止
/// </summary>
public const string OPERATE_PREVIEW_STOP = "点击预览停止";
/// <summary>
/// 点击预览更新
/// </summary>
public const string OPERATE_PREVIEW_UPDATE = "点击预览更新";
/// <summary>
/// 点击预览RGB
/// </summary>
public const string OPERATE_PREVIEW_RGB = "点击预览RGB";
/// <summary>
/// 点击预览Key
/// </summary>
public const string OPERATE_PREVIEW_KEY = "点击预览Key";
/// <summary>
/// 点击预览KeyPreview
/// </summary>
public const string OPERATE_PREVIEW_KEY_PREVIEW = "点击预览KeyPreview";
/// <summary>
/// 点击预览TS
/// </summary>
public const string OPERATE_PREVIEW_TS = "点击预览TS";
/// <summary>
/// 点击预览SA
/// </summary>
public const string OPERATE_PREVIEW_SA = "点击预览SA";
/// <summary>
/// 点击预览BB
/// </summary>
public const string OPERATE_PREVIEW_BB = "点击预览BB";
// =============================================================================
// Take
// =============================================================================
/// <summary>
/// 点击Take
/// </summary>
public const string OPERATE_TAKE_TAKE = "播控:点击Take";
/// <summary>
/// 点击继续
/// </summary>
public const string OPERATE_TAKE_CONTINUE = "播控:点击Continue";
/// <summary>
/// 点击下版
/// </summary>
public const string OPERATE_TAKE_OUT = "播控:点击TakeOut";
/// <summary>
/// 点击更新
/// </summary>
public const string OPERATE_TAKE_UPDATE = "播控:点击Update";
}
}
......@@ -9,6 +9,7 @@ using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Plugin;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.Package.Module
{
......@@ -67,6 +68,11 @@ namespace VIZ.Package.Module
/// </summary>
private VizCommandControlObjectService vizCommandControlObjectService = new VizCommandControlObjectService();
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
// ==============================================================
// Property
// ==============================================================
......@@ -92,6 +98,9 @@ namespace VIZ.Package.Module
if (service == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_TAKE);
// 尝试更新控制字段List的值
service.TryUpdateControlFieldListValue();
......@@ -154,6 +163,9 @@ namespace VIZ.Package.Module
/// </summary>
private void Continue()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_CONTINUE);
this.Execute(
action: (obj, view, conn) =>
{
......@@ -177,6 +189,9 @@ namespace VIZ.Package.Module
/// </summary>
private void TakeOut()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_OUT);
this.Execute(
action: (obj, view, conn) =>
{
......@@ -216,6 +231,9 @@ namespace VIZ.Package.Module
if (service == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_UPDATE);
// 尝试更新控制字段List的值
service.TryUpdateControlFieldListValue();
......@@ -259,6 +277,9 @@ namespace VIZ.Package.Module
// 上板
if (string.Equals(msg.Key, ApplicationDomainEx.HotKeyConfig.Take))
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
this.Take();
return;
}
......@@ -266,6 +287,9 @@ namespace VIZ.Package.Module
// 继续
if (string.Equals(msg.Key, ApplicationDomainEx.HotKeyConfig.TakeContinue))
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
this.Continue();
return;
}
......@@ -273,6 +297,9 @@ namespace VIZ.Package.Module
// 下版
if (string.Equals(msg.Key, ApplicationDomainEx.HotKeyConfig.TakeOut))
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
this.TakeOut();
return;
}
......@@ -280,6 +307,9 @@ namespace VIZ.Package.Module
// 更新
if (string.Equals(msg.Key, ApplicationDomainEx.HotKeyConfig.TakeUpdate))
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
this.Update();
return;
}
......
......@@ -6,6 +6,8 @@ using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.Package.Module
{
......@@ -20,6 +22,11 @@ namespace VIZ.Package.Module
private static readonly ILog log = LogManager.GetLogger(typeof(VizCommandWindowModel));
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
/// <summary>
/// 日志视图模型
/// </summary>
public VizCommandWindowModel()
......@@ -82,6 +89,10 @@ namespace VIZ.Package.Module
/// <param name="msg">消息</param>
private void OnVizCommandLogMessage(VizCommandLogMessage msg)
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.System, RecordLogTrigger.System, RecordLogConstants.SYSTEM_SEND_VIZ_COMMAND, msg.Log);
// 更新界面
WPFHelper.BeginInvoke(() =>
{
VizCommandWindow view = this.GetView<VizCommandWindow>();
......
......@@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.Package.Module
......@@ -23,6 +24,11 @@ namespace VIZ.Package.Module
private readonly static ILog log = LogManager.GetLogger(typeof(VizPreviewController));
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
/// <summary>
/// Viz预览重启等待时间(单位:毫秒)
/// </summary>
private int VIZ_PREVIEW_RESTART_WAIT = ApplicationDomainEx.IniStorage.GetValue<VizConfig, int>(p => p.VIZ_PREVIEW_RESTART_WAIT);
......@@ -49,6 +55,9 @@ namespace VIZ.Package.Module
/// <param name="conn">连接模型</param>
public void StartVizEngine(VizPreviewView view, string path, ConnModel conn)
{
// 操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.System, RecordLogTrigger.System, RecordLogConstants.SYSTEM_SET_UP_PREVIEW);
var dpi = WPFHelper.GetDpiByGraphics();
int width = (int)(view.host.ActualWidth * (dpi.X / 96d));
int height = (int)(view.host.ActualHeight * (dpi.Y / 96d));
......
......@@ -181,6 +181,11 @@ namespace VIZ.Package.Module
/// </summary>
private VizCommandControlObjectService vizCommandControlObjectService = new VizCommandControlObjectService();
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
// ================================================================================
// Command
// ================================================================================
......@@ -291,6 +296,9 @@ namespace VIZ.Package.Module
if (DXMessageBox.Show("是否重启预览引擎?", "提示", MessageBoxButton.YesNo) != MessageBoxResult.Yes)
return;
// 操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_RESTART_PREVIEW);
// 设置预览引擎未准备完毕
ApplicationDomainEx.IsVizPreviewReadly = false;
this.IsVizPreviewReadly = false;
......@@ -333,6 +341,9 @@ namespace VIZ.Package.Module
/// </summary>
private void Play()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_PLAY);
this.Execute((obj, view, conn) =>
{
this.vizCommandService.SetEnabledUpdate(conn, false);
......@@ -363,6 +374,9 @@ namespace VIZ.Package.Module
/// </summary>
private void Continue()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_CONTINUE);
this.Execute((obj, view, conn) =>
{
this.vizCommandService.Continue(conn, null, VizLayer.MAIN_LAYER);
......@@ -384,6 +398,9 @@ namespace VIZ.Package.Module
/// </summary>
private void Stop()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_STOP);
this.Execute((obj, view, conn) =>
{
this.vizCommandService.Stop(conn, null, VizLayer.MAIN_LAYER);
......@@ -405,6 +422,9 @@ namespace VIZ.Package.Module
/// </summary>
private void Update()
{
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE);
// 更新控制字段List的值
IFieldTreeService service = ApplicationDomainEx.ServiceManager.GetService<IFieldTreeService>(ViewServiceKeys.FIELD_TREE_SERVICE);
if (service == null)
......@@ -455,6 +475,9 @@ namespace VIZ.Package.Module
if (!ApplicationDomainEx.IsVizPreviewReadly || ApplicationDomainEx.CurrentPage == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_RGB);
this.vizCommandService.ShowRGB(ApplicationDomainEx.PreviewConn);
}
......@@ -476,6 +499,9 @@ namespace VIZ.Package.Module
if (!ApplicationDomainEx.IsVizPreviewReadly || ApplicationDomainEx.CurrentPage == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_KEY);
this.vizCommandService.ShowKey(ApplicationDomainEx.PreviewConn);
}
......@@ -497,6 +523,9 @@ namespace VIZ.Package.Module
if (!ApplicationDomainEx.IsVizPreviewReadly || ApplicationDomainEx.CurrentPage == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_KEY_PREVIEW);
this.vizCommandService.ShowKeyPreview(ApplicationDomainEx.PreviewConn);
}
......@@ -719,6 +748,9 @@ namespace VIZ.Package.Module
if (!ApplicationDomainEx.IsVizPreviewReadly || ApplicationDomainEx.CurrentPage == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_TS, $"值: {this.IsShowTS}");
this.vizCommandService.ShowTS(ApplicationDomainEx.PreviewConn, this.IsShowTS);
}
......@@ -731,6 +763,9 @@ namespace VIZ.Package.Module
if (!ApplicationDomainEx.IsVizPreviewReadly || ApplicationDomainEx.CurrentPage == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_SA, $"值: {this.IsShowSA}");
this.vizCommandService.ShowSA(ApplicationDomainEx.PreviewConn, this.IsShowSA);
}
......@@ -743,6 +778,9 @@ namespace VIZ.Package.Module
if (!ApplicationDomainEx.IsVizPreviewReadly || ApplicationDomainEx.CurrentPage == null)
return;
// 记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_BB, $"值: {this.IsShowBB}");
this.vizCommandService.ShowBB(ApplicationDomainEx.PreviewConn, this.IsShowBB);
}
}
......
......@@ -21,7 +21,7 @@ namespace VIZ.Package.Storage
/// <summary>
/// 系统自动触发
/// </summary>
[Description("自动")]
[Description("系统")]
System
}
}
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