Commit bc4bac90 by 鲁志-悦动

“确定”和“保存”设置默认按钮属性

parent 52535121
using log4net;
using System.Linq;
using OpenCvSharp;
using VIZ.FGOUT.Connection;
using VIZ.FGOUT.Domain;
using VIZ.FGOUT.Storage;
using VIZ.Framework.Connection;
using VIZ.Framework.Domain;
......@@ -144,51 +142,18 @@ namespace VIZ.FGOUT.Module
//Replay入点命令
if (string.Equals(this.Support.HotkeyConfig.I, hotkey))
{
//service = ApplicationDomain.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_1);
//if (service == null) return false;
//var context = new NDIViewHotkeyContext()
//{
// hotkey = NDIViewHotkeys.I
//};
//service.NDIViewHotkeyMode(context);
//return true;
return AssembleHotkeyMode(NDIViewHotkeys.I);
}
//Replay出点命令
if (string.Equals(this.Support.HotkeyConfig.O, hotkey))
{
//service = ApplicationDomain.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_1);
//if (service == null) return false;
//var context = new NDIViewHotkeyContext()
//{
// hotkey = NDIViewHotkeys.O
//};
//service.NDIViewHotkeyMode(context);
//return true;
return AssembleHotkeyMode(NDIViewHotkeys.O);
}
//位置标记删除命令
if (string.Equals(this.Support.HotkeyConfig.Delete, hotkey))
{
//service = ApplicationDomain.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_1);
//if (service == null) return false;
//var context = new NDIViewHotkeyContext()
//{
// hotkey = NDIViewHotkeys.Delete
//};
//service.NDIViewHotkeyMode(context);
//return true;
return AssembleHotkeyMode(NDIViewHotkeys.Delete);
}
......@@ -231,7 +196,7 @@ namespace VIZ.FGOUT.Module
//点击空格实现算法手动模式下的开始、结束抠像
//先实现不兼容S、D的情况
if(string.Equals(this.Support.HotkeyConfig.Delete, hotkey))
if(string.Equals(this.Support.HotkeyConfig.Space, hotkey))
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmPackage__MatCmd algorithmPackage__MatCmd = new AlgorithmPackage__MatCmd();
......
......@@ -420,7 +420,8 @@ namespace VIZ.FGOUT.Module
manualConfig.IsManual = false;
ApplicationDomainEx.LiteDbContext.SetManualConfig.Upsert(manualConfig);
//CleanRect();
DisplayPlace();
ShowPlace();
PositionButtonEnable();
}
}
}
......@@ -451,6 +452,7 @@ namespace VIZ.FGOUT.Module
ApplicationDomainEx.LiteDbContext.SetManualConfig.Upsert(manualConfig);
//CleanRect();
HidePlace();
PositionButtonDisEnable();
}
}
}
......@@ -462,6 +464,10 @@ namespace VIZ.FGOUT.Module
{
cleanPlaceModel.CleanPlace = true;
ApplicationDomain.MessageManager.Send(cleanPlaceModel);
}
private void PositionButtonDisEnable()
{
//6个位置相关按钮都不可用
InvalidEnable = EndEnable = StartEnable = false;
SaveEnable = SendEnable = CleanEnable = false;
......@@ -970,6 +976,7 @@ namespace VIZ.FGOUT.Module
{
_markModel.IsMark = false;
ApplicationDomain.MessageManager.Send(_markModel);
ShowPlace();
}
/// <summary>
......@@ -981,6 +988,7 @@ namespace VIZ.FGOUT.Module
{
_markModel.IsMark = true;
ApplicationDomain.MessageManager.Send(_markModel);
HidePlace();
}
/// <summary>
......@@ -1082,9 +1090,13 @@ namespace VIZ.FGOUT.Module
/// <summary>
/// 显示位置
/// </summary>
private void DisplayPlace()
private void ShowPlace()
{
ApplicationDomain.MessageManager.Send(displayPlaceModel);
}
private void PositionButtonEnable()
{
//6个位置相关按钮都可用
InvalidEnable = EndEnable = StartEnable = true;
SaveEnable = SendEnable = CleanEnable = true;
......
......@@ -113,6 +113,7 @@
Margin="0,0,40,0"
Command="{Binding Path=SaveCommand}"
Content="保存"
IsDefault="True"
Style="{StaticResource ButtonStyle}" />
</StackPanel>
</Grid>
......
......@@ -378,7 +378,7 @@ namespace VIZ.FGOUT.Module
return;
}
NDIView nDIView = this.GetView<NDIView>();
var nDIView = this.GetView<NDIView>();
nDIView.dotPoints = new PointCollection();
nDIView._polygonsMark = new List<PointCollection>();
......
......@@ -141,6 +141,7 @@
Margin="0,0,40,0"
Command="{Binding Path=SaveCommand}"
Content="保存"
IsDefault="True"
Style="{StaticResource ButtonStyle}" />
</StackPanel>
</Grid>
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4F9B5C85633AE49854D67B6087B62599444A169F3147973692D9F7F7E5A53841"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "63FD1989510EB2DBA0C2AEECC7EFD86BF6F22D8ADDE38557E58E425DA46C62B4"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4F9B5C85633AE49854D67B6087B62599444A169F3147973692D9F7F7E5A53841"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "63FD1989510EB2DBA0C2AEECC7EFD86BF6F22D8ADDE38557E58E425DA46C62B4"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "8A992F1D7DD205E253FBA0C36092CEBC9E5F561A5487EC48125D77F4FFB27D52"
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "93FCC886D9DA7016C9F877C7900F6EFFF450A85B7DE4F874D7C7D45BA7A3BD91"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "8A992F1D7DD205E253FBA0C36092CEBC9E5F561A5487EC48125D77F4FFB27D52"
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "93FCC886D9DA7016C9F877C7900F6EFFF450A85B7DE4F874D7C7D45BA7A3BD91"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
......@@ -16,12 +16,14 @@ namespace VIZ.FGOUT.Storage
/// <summary>
/// 开始命令
/// </summary>
public string StartCmd { get; set; } = "Alt + S";
//public string StartCmd { get; set; } = "Alt + S";
public string StartCmd { get; set; } = "S";
/// <summary>
/// 结束命令
/// </summary>
public string EndCmd { get; set; } = "Alt + D";
//public string EndCmd { get; set; } = "Alt + D";
public string EndCmd { get; set; } = "D";
/// <summary>
/// Replay入点命令
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -114,6 +114,7 @@ namespace VIZ.Framework.Common
base.OnApplyTemplate();
this.PART_YesButton = this.Template.FindName(nameof(PART_YesButton), this) as Button;
this.PART_YesButton.IsDefault = true;
this.PART_CancelButton = this.Template.FindName(nameof(PART_CancelButton), this) as Button;
if (this.PART_YesButton != null)
......
......@@ -159,7 +159,7 @@ namespace VIZ.Framework.Core
}
/// <summary>
/// 开始UI步更新
/// 开始UI步更新
/// </summary>
/// <param name="action">行为</param>
/// <param name="dispatcherPriority">优先级</param>
......
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