Commit 94f88b91 by 鲁志-悦动

选框操作内元素 And 自动模式下开始、结束抠图不可用 And 二次确认自动发送倒计时显示

parent 1164b610
namespace VIZ.FGOUT.Domain
{
public class AutoSendModel
{
public int Interval { get; set; }
}
}
......@@ -80,6 +80,7 @@
<Compile Include="Message\Algorithm\Implementation\AlgorithmMessage__detect.cs" />
<Compile Include="Message\Algorithm\Implementation\AlgorithmMessage__start_end.cs" />
<Compile Include="Message\Algorithm\Interface\IAlgorithmMessage__roi.cs" />
<Compile Include="Message\Setting\AutoSendModel.cs" />
<Compile Include="Message\Setting\CleanInPointsModel.cs" />
<Compile Include="Message\Setting\CleanPlaceModel.cs" />
<Compile Include="Message\Setting\DisplayPlaceModel.cs" />
......
d3e4f59c122a03f90859987a8cf2800734b297bb
93ee4586c7532ced3ab352476596ea66c48809f0
......@@ -50,6 +50,11 @@ namespace VIZ.FGOUT.Module
// 注册服务
//ApplicationDomainEx.ServiceManager.AddService(NDIViewKeys.MainView, this);
ApplicationDomainEx.ServiceManager.AddService(NDIMainViewKeys.MainView, this);
// 初始化二次确认自动发送倒计时器
InitAutoSendTimer();
//_autoSend_Timer.Stop();
//_autoSend_Timer.Start();
}
/// <summary>
......@@ -135,8 +140,46 @@ namespace VIZ.FGOUT.Module
//ApplicationDomain.MessageManager.Register<ReplayStartValueModel>(this, this.ReplayStartValueFromNDIViewModel);
////Replay出点值
//ApplicationDomain.MessageManager.Register<ReplayEndValueModel>(this, this.ReplayEndValueFromNDIViewModel);
ApplicationDomain.MessageManager.Register<AutoSendModel>(this, this.AutoSendIntervalTimeChanged);
}
private int _tempAutoSendCount = 4;
private void AutoSendIntervalTimeChanged(AutoSendModel model)
{
_tempAutoSendCount = AutoSendCount = model.Interval / 1000 + 1;
_autoSend_Timer.Stop();
_autoSend_Timer.Start();
}
#region 自动发送倒计时器
private System.Timers.Timer _autoSend_Timer = new System.Timers.Timer();
public void InitAutoSendTimer()
{
_autoSend_Timer.Interval = 1000;
_autoSend_Timer.Elapsed += UpdateAutoSendTimer_Tick;
}
private void UpdateAutoSendTimer_Tick(object sender, EventArgs e)
{
try
{
WPFHelper.BeginInvoke(() =>
{
if (AutoSendCount == 1)
AutoSendCount = _tempAutoSendCount;
AutoSendCount--;
});
}
catch (Exception ex)
{
log.Error(ex);
}
}
#endregion
//int _sliderStartInitValue;
//int _sliderEndInitValue;
//private void ReplayStartValueFromNDIViewModel(ReplayStartValueModel vm)
......@@ -536,6 +579,8 @@ namespace VIZ.FGOUT.Module
//2个位置相关按钮都不可用
EndEnable = StartEnable = false;
StartIsChecked = EndIsChecked = InvalidIsChecked = false;
MattStartIsEnabled = true;
}
#endregion
......@@ -616,6 +661,8 @@ namespace VIZ.FGOUT.Module
{
//ReconfirmSendParamsCommon(ReconfirmStatus.Abandon);
ApplicationDomain.MessageManager.Send(_reconfirmAbandonModel);
_autoSend_Timer.Stop();
}
public VCommand SendCommand { get; set; }
......@@ -640,6 +687,17 @@ namespace VIZ.FGOUT.Module
}
}
private int _autoSendCount = 3;
public int AutoSendCount
{
get => _autoSendCount;
set
{
_autoSendCount = value;
this.RaisePropertyChanged(nameof(AutoSendCount));
}
}
public ReconfirmAutoSendIntervalTimeModel _reconfirmAutoSendIntervalTimeModel = new ReconfirmAutoSendIntervalTimeModel();
public VCommand<RoutedEventArgs> AutoSendIntervalTimeChangedCommand { get; set; }
private void AutoSendIntervalTimeChanged(RoutedEventArgs e)
......@@ -828,6 +886,8 @@ namespace VIZ.FGOUT.Module
SliderStartValue = NDIViewModel.SliderStartValue;
SliderEndValue = NDIViewModel.SliderEndValue;
_isReplayChecked = false;
_autoSend_Timer.Stop();
}
private void ReplayUnchecked()
......@@ -1372,6 +1432,8 @@ namespace VIZ.FGOUT.Module
//6个位置相关按钮都可用
InvalidEnable = EndEnable = StartEnable = true;
SaveEnable = SendEnable = CleanEnable = true;
MattStartIsEnabled = false;
}
/// <summary>
......@@ -1513,6 +1575,13 @@ namespace VIZ.FGOUT.Module
set { startEnable = value; this.RaisePropertyChanged(nameof(StartEnable)); }
}
private bool _mattStartIsEnabled = true;
public bool MattStartIsEnabled
{
get { return _mattStartIsEnabled; }
set { _mattStartIsEnabled = value; this.RaisePropertyChanged(nameof(MattStartIsEnabled)); }
}
private bool _endIsChecked;
/// <summary>
/// 结束位置是否选中
......
......@@ -31,6 +31,8 @@ namespace VIZ.FGOUT.Module
_autoSend_Timer.Stop();
_autoSend_Timer.Start();
AutoSendModel autoSendModel = new AutoSendModel(){ Interval = ALGORITHM_ReconfirmAutoSend_TIME };
}
/// <summary>
......@@ -41,7 +43,7 @@ namespace VIZ.FGOUT.Module
/// <summary>
/// 算法二次确认自动发送时间
/// </summary>
protected readonly int ALGORITHM_ReconfirmAutoSend_TIME = ApplicationDomain.IniStorage.GetValue<AlgorithmConfig, int>(p => p.ALGORITHM_ReconfirmAutoSend_TIME);
protected int ALGORITHM_ReconfirmAutoSend_TIME = ApplicationDomain.IniStorage.GetValue<AlgorithmConfig, int>(p => p.ALGORITHM_ReconfirmAutoSend_TIME);
//CleanPlaceModel cpModel = new CleanPlaceModel{ CleanPlace = true };
/// <summary>
......
......@@ -344,7 +344,7 @@ namespace VIZ.FGOUT.Module
{
if (this.ViewKey != NDIViewKeys.CAM_1)
return;
_autoSend_Timer.Interval = reconfirmAutoSendIntervalTimeModel.IntervalTime * 1000;
_autoSend_Timer.Interval = ALGORITHM_ReconfirmAutoSend_TIME = reconfirmAutoSendIntervalTimeModel.IntervalTime * 1000;
}
private void ReconfirmSendParamsCommon(ReconfirmStatus reconfirmStatus)
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9D2B2F6CF035D1B06FC8DD16AFF531F620ADEAE09A243CC524307F1763D19790"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1A5E5C45B7C6682273BB06D6E7240FD1F78577BC498AD968A13AE3C50311E4AB"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 206 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 230 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.CheckBox _AutoMode_;
......@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 217 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 243 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.CheckBox _ManualMode_;
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1018 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1072 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1109 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1163 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1124 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1178 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......@@ -140,7 +140,7 @@ namespace VIZ.FGOUT.Module {
case 2:
this._AutoMode_ = ((System.Windows.Controls.CheckBox)(target));
#line 210 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 236 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._AutoMode_.Click += new System.Windows.RoutedEventHandler(this.AutoMode_OnClick);
#line default
......@@ -149,7 +149,7 @@ namespace VIZ.FGOUT.Module {
case 3:
this._ManualMode_ = ((System.Windows.Controls.CheckBox)(target));
#line 221 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 249 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick);
#line default
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9D2B2F6CF035D1B06FC8DD16AFF531F620ADEAE09A243CC524307F1763D19790"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1A5E5C45B7C6682273BB06D6E7240FD1F78577BC498AD968A13AE3C50311E4AB"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 206 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 230 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.CheckBox _AutoMode_;
......@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 217 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 243 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.CheckBox _ManualMode_;
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1018 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1072 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1109 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1163 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1124 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1178 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......@@ -140,7 +140,7 @@ namespace VIZ.FGOUT.Module {
case 2:
this._AutoMode_ = ((System.Windows.Controls.CheckBox)(target));
#line 210 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 236 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._AutoMode_.Click += new System.Windows.RoutedEventHandler(this.AutoMode_OnClick);
#line default
......@@ -149,7 +149,7 @@ namespace VIZ.FGOUT.Module {
case 3:
this._ManualMode_ = ((System.Windows.Controls.CheckBox)(target));
#line 221 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 249 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick);
#line default
......
This source diff could not be displayed because it is too large. You can view the blob instead.
using log4net;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
......
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