Commit bebfaab6 by wangonghui

添加清屏快捷键

parent 608a27bc
using DevExpress.Data; using DevExpress.Data;
using DevExpress.Xpf.Grid.GroupRowLayout;
using log4net; using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -251,6 +252,29 @@ namespace VIZ.Package.Module ...@@ -251,6 +252,29 @@ namespace VIZ.Package.Module
#endregion #endregion
#region 清屏操作----更新命令
public void ClearSceen()
{
var pageModel = ApplicationDomainEx.CurrentPage as PageModel;
ConnGroupModel group = ApplicationDomainEx.ConnGroups.FirstOrDefault(p => p.GroupID == pageModel.ConnGroupID);
foreach (var item in group.Items)
{
if (!item.IsEnabled || !item.IsConnected)
continue;
vizCommandService.ClearSceen(item, VizLayer.FRONT_LAYER);
vizCommandService.ClearSceen(item, VizLayer.MAIN_LAYER);
vizCommandService.ClearSceen(item, VizLayer.BACK_LAYER);
}
}
#endregion
// ============================================================== // ==============================================================
// Message // Message
// ============================================================== // ==============================================================
...@@ -302,6 +326,16 @@ namespace VIZ.Package.Module ...@@ -302,6 +326,16 @@ namespace VIZ.Package.Module
this.Update(); this.Update();
return; return;
} }
if(string.Equals(msg.Key, ApplicationDomainEx.HotKeyConfig.ClearSceen))
{
//记录操作日志
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.SYSTEM_HOT_KEY, msg.Key);
this.ClearSceen();
return;
}
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- Take --> <!-- Take -->
<TextBlock Text="Take:" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock> <TextBlock Text="Take:" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
...@@ -80,6 +81,13 @@ ...@@ -80,6 +81,13 @@
<TextBlock Text="打开并Take选中页:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="6"></TextBlock> <TextBlock Text="打开并Take选中页:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="6"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Height="30" Grid.Row="6" Margin="15,0,10,0" <fcommon:HotkeyBox Grid.Column="1" Height="30" Grid.Row="6" Margin="15,0,10,0"
Hotkey="{Binding Path=OpenAndTakeSelectedPage,Mode=TwoWay}"></fcommon:HotkeyBox> Hotkey="{Binding Path=OpenAndTakeSelectedPage,Mode=TwoWay}"></fcommon:HotkeyBox>
<!--清屏快捷键-->
<TextBlock Text="清屏快捷键:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="7"/>
<fcommon:HotkeyBox Grid.Column="1" Height="30" Grid.Row="7" Margin="15,0,10,0"
Hotkey="{Binding Path=ClearSceen,Mode=TwoWay}"></fcommon:HotkeyBox>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Header="其他快捷键" Margin="10,5,10,10" Padding="5" Grid.Row="1"> <GroupBox Header="其他快捷键" Margin="10,5,10,10" Padding="5" Grid.Row="1">
......
...@@ -167,6 +167,29 @@ namespace VIZ.Package.Module ...@@ -167,6 +167,29 @@ namespace VIZ.Package.Module
#endregion #endregion
#region ClearSceen --清屏快捷键
/// <summary>
/// 清屏快捷键
/// </summary>
public string clearSceen;
public string ClearSceen
{
get { return clearSceen; }
set
{
this.CheckHotkey(value);
clearSceen = value;
this.RaisePropertyChanged(nameof(ClearSceen));
}
}
#endregion
#region SaveOpendPageOrTemplateAndProject -- 保存当前打开的页或模板和项目 #region SaveOpendPageOrTemplateAndProject -- 保存当前打开的页或模板和项目
private string saveOpendPageOrTemplateAndProject; private string saveOpendPageOrTemplateAndProject;
...@@ -211,6 +234,7 @@ namespace VIZ.Package.Module ...@@ -211,6 +234,7 @@ namespace VIZ.Package.Module
this.OpenNextPage = config.OpenNextPage; this.OpenNextPage = config.OpenNextPage;
this.TakeAndOpenNextPage = config.TakeAndOpenNextPage; this.TakeAndOpenNextPage = config.TakeAndOpenNextPage;
this.OpenAndTakeSelectedPage = config.OpenAndTakeSelectedPage; this.OpenAndTakeSelectedPage = config.OpenAndTakeSelectedPage;
this.ClearSceen = config.ClearSceen;
this.SaveOpendPageOrTemplateAndProject = config.SaveOpendPageOrTemplateAndProject; this.SaveOpendPageOrTemplateAndProject = config.SaveOpendPageOrTemplateAndProject;
} }
...@@ -234,6 +258,7 @@ namespace VIZ.Package.Module ...@@ -234,6 +258,7 @@ namespace VIZ.Package.Module
config.OpenNextPage = this.OpenNextPage; config.OpenNextPage = this.OpenNextPage;
config.TakeAndOpenNextPage = this.TakeAndOpenNextPage; config.TakeAndOpenNextPage = this.TakeAndOpenNextPage;
config.OpenAndTakeSelectedPage = this.OpenAndTakeSelectedPage; config.OpenAndTakeSelectedPage = this.OpenAndTakeSelectedPage;
config.ClearSceen = this.ClearSceen;
config.SaveOpendPageOrTemplateAndProject = this.SaveOpendPageOrTemplateAndProject; config.SaveOpendPageOrTemplateAndProject = this.SaveOpendPageOrTemplateAndProject;
ApplicationDomainEx.LocalDbContext.HotKeyConfig.Update(config); ApplicationDomainEx.LocalDbContext.HotKeyConfig.Update(config);
...@@ -287,6 +312,10 @@ namespace VIZ.Package.Module ...@@ -287,6 +312,10 @@ namespace VIZ.Package.Module
this.SaveOpendPageOrTemplateAndProject = string.Empty; this.SaveOpendPageOrTemplateAndProject = string.Empty;
} }
if(string.Equals(this.ClearSceen,key))
{
this.ClearSceen = string.Empty;
}
this.isInHotkeyCheck = false; this.isInHotkeyCheck = false;
} }
} }
......
...@@ -610,5 +610,11 @@ namespace VIZ.Package.Service ...@@ -610,5 +610,11 @@ namespace VIZ.Package.Service
conn.EndpointManager.Send($"RENDERER*MAIN_LAYER*TREE*${pageBase.LayerIdentifier}*FUNCTION*Toggle*continue INVOKE"); conn.EndpointManager.Send($"RENDERER*MAIN_LAYER*TREE*${pageBase.LayerIdentifier}*FUNCTION*Toggle*continue INVOKE");
} }
public void ClearSceen(ConnModel conn, VizLayer layer)
{
conn.EndpointManager.Send($"RENDERER*{layer} SET_OBJECT");
}
} }
} }
...@@ -74,6 +74,11 @@ namespace VIZ.Package.Storage ...@@ -74,6 +74,11 @@ namespace VIZ.Package.Storage
public string OpenAndTakeSelectedPage { get; set; } = "F11"; public string OpenAndTakeSelectedPage { get; set; } = "F11";
/// <summary> /// <summary>
/// 清屏快捷键
/// </summary>
public string ClearSceen { get; set; } = "F12";
/// <summary>
/// 保存当前打开的页或模板和项目 /// 保存当前打开的页或模板和项目
/// </summary> /// </summary>
public string SaveOpendPageOrTemplateAndProject { get; set; } = "Ctrl + S"; public string SaveOpendPageOrTemplateAndProject { get; set; } = "Ctrl + S";
......
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