Commit 8f96860e by 鲁志-悦动

再次修复二次确认倒计时数字不变的缺陷

parent 54e5c2ff
...@@ -812,7 +812,7 @@ ...@@ -812,7 +812,7 @@
IsEnabled="False" IsEnabled="False"
Style="{StaticResource TextBoxStyle}" Style="{StaticResource TextBoxStyle}"
Text="{Binding AutoSendCount}" />--> Text="{Binding AutoSendCount}" />-->
<!--<TextBlock <TextBlock
Width="30" Width="30"
Height="30" Height="30"
Padding="0,6,0,0" Padding="0,6,0,0"
...@@ -822,8 +822,9 @@ ...@@ -822,8 +822,9 @@
FontSize="14" FontSize="14"
Foreground="Black" Foreground="Black"
IsEnabled="False" IsEnabled="False"
Text="{Binding AutoSendCount, Mode=TwoWay}" Text="{Binding AutoSendIntervalTime}"
TextAlignment="Center" />--> TextAlignment="Center"
Visibility="{Binding TimeCountDefaultVisibility}" />
<fcommon:CountdownDisplayControl <fcommon:CountdownDisplayControl
Width="30" Width="30"
Height="30" Height="30"
...@@ -834,9 +835,10 @@ ...@@ -834,9 +835,10 @@
FontSize="14" FontSize="14"
Foreground="Black" Foreground="Black"
IsEnabled="False" IsEnabled="False"
NumText="{Binding AutoSendCount}" NumText="{Binding AutoSendIntervalTime}"
TempNumText="{Binding AutoSendCount}" TempNumText="{Binding AutoSendIntervalTime}"
TextAlignment="Center" /> TextAlignment="Center"
Visibility="{Binding TimeCountActVisibility}" />
</StackPanel> </StackPanel>
</Border> </Border>
......
...@@ -52,10 +52,12 @@ namespace VIZ.FGOUT.Module ...@@ -52,10 +52,12 @@ namespace VIZ.FGOUT.Module
ApplicationDomainEx.ServiceManager.AddService(NDIMainViewKeys.MainView, this); ApplicationDomainEx.ServiceManager.AddService(NDIMainViewKeys.MainView, this);
// 初始化二次确认自动发送倒计时器 // 初始化二次确认自动发送倒计时器
InitAutoSendTimer(); //InitAutoSendTimer();
//_autoSend_Timer.Stop(); //_autoSend_Timer.Stop();
//_autoSend_Timer.Start(); //_autoSend_Timer.Start();
//TimeCountActVisibility = Visibility.Visible;
//TimeCountDefaultVisibility = Visibility.Collapsed;
//初始化算法数据 //初始化算法数据
//InitAlgorithmData(); //InitAlgorithmData();
...@@ -200,7 +202,7 @@ namespace VIZ.FGOUT.Module ...@@ -200,7 +202,7 @@ namespace VIZ.FGOUT.Module
ApplicationDomain.MessageManager.Register<AutoSendModel>(this, this.AutoSendIntervalTimeChanged); ApplicationDomain.MessageManager.Register<AutoSendModel>(this, this.AutoSendIntervalTimeChanged);
// 算法落盘开始、结束时间戳消息 // 算法落盘开始、结束时间戳消息
ApplicationDomain.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end); //ApplicationDomain.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end);
} }
/// <summary> /// <summary>
...@@ -214,45 +216,71 @@ namespace VIZ.FGOUT.Module ...@@ -214,45 +216,71 @@ namespace VIZ.FGOUT.Module
/// <param name="msg"></param> /// <param name="msg"></param>
private void OnAlgorithmMessage__start_end(AlgorithmMessage__start_end msg) private void OnAlgorithmMessage__start_end(AlgorithmMessage__start_end msg)
{ {
_tempAutoSendCount = AutoSendCount = (ALGORITHM_ReconfirmAutoSend_TIME / 1000) + 1; //_tempAutoSendCount = AutoSendCount = (ALGORITHM_ReconfirmAutoSend_TIME / 1000) + 1;
_autoSend_Timer.Stop(); //_autoSend_Timer.Stop();
_autoSend_Timer.Start(); //_autoSend_Timer.Start();
} }
#region 自动发送倒计时器
private System.Timers.Timer _autoSend_Timer = new System.Timers.Timer();
private int _tempAutoSendCount = 4;
private void AutoSendIntervalTimeChanged(AutoSendModel model) private void AutoSendIntervalTimeChanged(AutoSendModel model)
{ {
_tempAutoSendCount = AutoSendCount = (model.Interval / 1000) + 1; //_tempAutoSendCount = AutoSendCount = (model.Interval / 1000) + 1;
_autoSend_Timer.Stop(); //_autoSend_Timer.Stop();
_autoSend_Timer.Start(); //_autoSend_Timer.Start();
}
public void InitAutoSendTimer()
{
_autoSend_Timer.Interval = 1000;
_autoSend_Timer.Elapsed += UpdateAutoSendTimer_Tick;
}
private void UpdateAutoSendTimer_Tick(object sender, EventArgs e)
{
try
{
//WPFHelper.BeginInvoke(() => //WPFHelper.BeginInvoke(() =>
//{ //{
if (AutoSendCount == 1) // this.GetWindow().WindowState = WindowState.Minimized;
AutoSendCount = _tempAutoSendCount; // this.GetWindow().WindowState = WindowState.Normal;
AutoSendCount--;
//}); //});
//Refresh();
TimeCountActVisibility = Visibility.Visible;
TimeCountDefaultVisibility = Visibility.Collapsed;
} }
catch (Exception ex)
{ #region 自动发送倒计时器
log.Error(ex);
} //private System.Timers.Timer _autoSend_Timer = new System.Timers.Timer();
}
//private int _tempAutoSendCount = 4;
////刷新界面控件
////public void Refresh()
////{
//// DispatcherFrame frame = new DispatcherFrame();
//// Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
//// new DispatcherOperationCallback(delegate (object f)
//// {
//// ((DispatcherFrame)f).Continue = false;
//// return null;
//// }
//// ), frame);
//// Dispatcher.PushFrame(frame);
////}
//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 #endregion
...@@ -811,7 +839,9 @@ namespace VIZ.FGOUT.Module ...@@ -811,7 +839,9 @@ namespace VIZ.FGOUT.Module
//ReconfirmSendParamsCommon(ReconfirmStatus.Abandon); //ReconfirmSendParamsCommon(ReconfirmStatus.Abandon);
ApplicationDomain.MessageManager.Send(_reconfirmAbandonModel); ApplicationDomain.MessageManager.Send(_reconfirmAbandonModel);
_autoSend_Timer.Stop(); //_autoSend_Timer.Stop();
TimeCountActVisibility = Visibility.Collapsed;
TimeCountDefaultVisibility = Visibility.Visible;
} }
public VCommand SendCommand { get; set; } public VCommand SendCommand { get; set; }
...@@ -825,6 +855,34 @@ namespace VIZ.FGOUT.Module ...@@ -825,6 +855,34 @@ namespace VIZ.FGOUT.Module
ApplicationDomain.MessageManager.Send(_reconfirmSendModel); ApplicationDomain.MessageManager.Send(_reconfirmSendModel);
} }
private Visibility _timeCountDefaultVisibility = Visibility.Visible;
/// <summary>
/// 倒计时默认
/// </summary>
public Visibility TimeCountDefaultVisibility
{
get => _timeCountDefaultVisibility;
set
{
_timeCountDefaultVisibility = value;
this.RaisePropertyChanged(nameof(TimeCountDefaultVisibility));
}
}
private Visibility _timeCountActVisibility = Visibility.Collapsed;
/// <summary>
/// 倒计时动
/// </summary>
public Visibility TimeCountActVisibility
{
get => _timeCountActVisibility;
set
{
_timeCountActVisibility = value;
this.RaisePropertyChanged(nameof(TimeCountActVisibility));
}
}
private int _autoSendIntervalTime = 3; private int _autoSendIntervalTime = 3;
public int AutoSendIntervalTime public int AutoSendIntervalTime
{ {
...@@ -1029,7 +1087,9 @@ namespace VIZ.FGOUT.Module ...@@ -1029,7 +1087,9 @@ namespace VIZ.FGOUT.Module
SliderEndValue = NDIViewModel.SliderEndValue; SliderEndValue = NDIViewModel.SliderEndValue;
_isReplayChecked = false; _isReplayChecked = false;
_autoSend_Timer.Stop(); //_autoSend_Timer.Stop();
TimeCountActVisibility = Visibility.Collapsed;
TimeCountDefaultVisibility = Visibility.Visible;
} }
public VCommand ReplayUncheckedCommand { get; set; } public VCommand ReplayUncheckedCommand { get; set; }
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A9E446E52202FB592D2DDA06292EF9A66CAF6396058637C224187CFE75309B21" #pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3AE56A5E80B0D3376E90D3FCCC96344D84255D7E5D7899D93FAD020FE782E930"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module { ...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1259 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1261 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1; internal VIZ.FGOUT.Module.NDIView cam1;
...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module { ...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1388 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1390 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2; internal VIZ.FGOUT.Module.NDIView cam2;
...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module { ...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1403 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1405 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3; internal VIZ.FGOUT.Module.NDIView cam3;
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A9E446E52202FB592D2DDA06292EF9A66CAF6396058637C224187CFE75309B21" #pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3AE56A5E80B0D3376E90D3FCCC96344D84255D7E5D7899D93FAD020FE782E930"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module { ...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1259 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1261 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1; internal VIZ.FGOUT.Module.NDIView cam1;
...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module { ...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1388 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1390 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2; internal VIZ.FGOUT.Module.NDIView cam2;
...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module { ...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1403 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1405 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3; internal VIZ.FGOUT.Module.NDIView cam3;
......
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs 
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIMainView\View\NDIMainView.xaml;; FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIMainView\View\NDIMainView.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;; FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;;
......
...@@ -95,9 +95,9 @@ namespace VIZ.Framework.Common ...@@ -95,9 +95,9 @@ namespace VIZ.Framework.Common
{ {
WPFHelper.BeginInvoke(() => WPFHelper.BeginInvoke(() =>
{ {
//if (NumText == 1) if (NumText == 1)
// NumText = TempNumText + 1; NumText = TempNumText + 1;
//NumText--; NumText--;
this.Text = NumText.ToString(); this.Text = NumText.ToString();
}); });
......
//------------------------------------------------------------------------------ 
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}
...@@ -10,11 +10,11 @@ none ...@@ -10,11 +10,11 @@ none
false false
DEBUG;TRACE DEBUG;TRACE
15-721109437 15488264905
121-1133520871 1212046750213
44-785521425 44-1238315823
MessageBox\MessageBoxEx.xaml;MessageBox\MessageBoxExWindow.xaml;Themes\Generic.xaml;VideoControl\Control\VideoControl.xaml;Widgets\ColorPickButton\ColorPickButton.xaml;Widgets\ColorPickButton\ColorPickWindow.xaml;Widgets\GPIOPinTestControl\GPIOPinTestControl.xaml;Widgets\HotkeyBox\HotkeyBox.xaml;Widgets\IconButton\IconButton.xaml;Widgets\LabelValue\LabelValue.xaml;Widgets\NavigationControl\NavigationControl.xaml;Widgets\ResizeImageControl\ResizeImageControl.xaml;Widgets\ShowMessageControl\ShowMessageControl.xaml;Widgets\VideoTimeBar\VideoTimeBar.xaml;Widgets\ViewLoader\ViewLoader.xaml; MessageBox\MessageBoxEx.xaml;MessageBox\MessageBoxExWindow.xaml;Themes\Generic.xaml;VideoControl\Control\VideoControl.xaml;Widgets\ColorPickButton\ColorPickButton.xaml;Widgets\ColorPickButton\ColorPickWindow.xaml;Widgets\GPIOPinTestControl\GPIOPinTestControl.xaml;Widgets\HotkeyBox\HotkeyBox.xaml;Widgets\IconButton\IconButton.xaml;Widgets\LabelValue\LabelValue.xaml;Widgets\NavigationControl\NavigationControl.xaml;Widgets\ResizeImageControl\ResizeImageControl.xaml;Widgets\ShowMessageControl\ShowMessageControl.xaml;Widgets\VideoTimeBar\VideoTimeBar.xaml;Widgets\ViewLoader\ViewLoader.xaml;
True False
 C:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxEx.xaml;; FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxEx.xaml;;
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxExWindow.xaml;; FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxExWindow.xaml;;
......
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