Commit 209a4665 by 鲁志-悦动

修复Replay时按左键向前移动一帧后又退回来了的缺陷

parent c6c02484
...@@ -10,11 +10,11 @@ none ...@@ -10,11 +10,11 @@ none
false false
DEBUG;TRACE DEBUG;TRACE
22-1578589972 221979955803
1-1441241311 1470602451
11-1602666439 11-350624472
23-2035776870 24-1321085892
Resources\StringResource.zh-CN.xaml;Resources\StringResource.en.xaml;Style\Button\Button_NdiView.xaml;Style\Button\Button_Setting.xaml;Style\Button\Button_WindowTop.xaml;Style\CheckBox\CheckBox_NdiView.xaml;Style\CheckBox\CheckBox_RaidoButtonStyle.xaml;Style\CheckBox\CheckBox_Setting.xaml;Style\CheckBox\CheckBox_WindowTop.xaml;Style\ComboBox\ComboBox_Setting.xaml;Style\HotkeyBox\HotkeyBox_Setting.xaml;Style\MessageBox\MessageBoxEx.xaml;Style\RadioButton\RadioButton_FootballSide.xaml;Style\RadioButton\RadioButton_NdiMainViewBlue.xaml;Style\RadioButton\RadioButton_NdiView.xaml;Style\RadioButton\RadioButton_Setting.xaml;Style\Slider\Slider_Setting.xaml;Style\TextBlock\TextBlock_Setting.xaml;Style\TextBox\TextBox_Setting.xaml;Style\ToogleButton\ToogleButton_Setting.xaml;Themes\Generic.xaml;Toolkit\NumericUpDown\NumericUpDown.xaml; Resources\StringResource.zh-CN.xaml;Resources\StringResource.en.xaml;Style\Button\Button_NdiView.xaml;Style\Button\Button_Setting.xaml;Style\Button\Button_WindowTop.xaml;Style\CheckBox\CheckBox_NdiView.xaml;Style\CheckBox\CheckBox_RaidoButtonStyle.xaml;Style\CheckBox\CheckBox_Setting.xaml;Style\CheckBox\CheckBox_WindowTop.xaml;Style\ComboBox\ComboBox_Setting.xaml;Style\HotkeyBox\HotkeyBox_Setting.xaml;Style\MessageBox\MessageBoxEx.xaml;Style\RadioButton\RadioButton_FootballSide.xaml;Style\RadioButton\RadioButton_NdiMainViewBlue.xaml;Style\RadioButton\RadioButton_NdiView.xaml;Style\RadioButton\RadioButton_Setting.xaml;Style\Slider\Slider_Setting.xaml;Style\TextBlock\TextBlock_Setting.xaml;Style\TextBox\TextBox_Setting.xaml;Style\ToogleButton\ToogleButton_Setting.xaml;Themes\Generic.xaml;Toolkit\NumericUpDown\NumericUpDown.xaml;
True False
...@@ -1832,12 +1832,8 @@ namespace VIZ.FGOUT.Module ...@@ -1832,12 +1832,8 @@ namespace VIZ.FGOUT.Module
set { _sliderVisibility = value; this.RaisePropertyChanged(nameof(SliderVisibility)); } set { _sliderVisibility = value; this.RaisePropertyChanged(nameof(SliderVisibility)); }
} }
//private int _sliderValue; DateTime _startDt = DateTime.Now;
//public int SliderValue //DateTime _endDt = DateTime.Now;
//{
// get => (int)_sliderValue;
// set { _sliderValue = value; this.RaisePropertyChanged(nameof(SliderValue)); }
//}
private int _sliderStartValue = 0; private int _sliderStartValue = 0;
public int SliderStartValue public int SliderStartValue
...@@ -1845,36 +1841,33 @@ namespace VIZ.FGOUT.Module ...@@ -1845,36 +1841,33 @@ namespace VIZ.FGOUT.Module
get => (int)_sliderStartValue; get => (int)_sliderStartValue;
set set
{ {
if (!_isReplayChecked) var nowDt = DateTime.Now;
var minus = (nowDt - _startDt).TotalMilliseconds;
if (minus > 450)
{ {
var nowDt = DateTime.Now; if (!_isReplayChecked)
var minus = (nowDt - _endDt).TotalMilliseconds;
if (minus > 450)
{ {
_sliderStartValue = value; _sliderStartValue = value;
this.RaisePropertyChanged(nameof(SliderStartValue)); this.RaisePropertyChanged(nameof(SliderStartValue));
var replayModel = new ReplayModel() { IsReplay = true, IsStartValue = true, SliderValue = value }; var replayModel = new ReplayModel() { IsReplay = true, IsStartValue = true, SliderValue = value };
ApplicationDomain.MessageManager.Send(replayModel); ApplicationDomain.MessageManager.Send(replayModel);
_startDt = DateTime.Now;
} }
} }
} }
} }
DateTime _startDt = DateTime.Now;
DateTime _endDt = DateTime.Now;
private int _sliderEndValue = 500; private int _sliderEndValue = 500;
public int SliderEndValue public int SliderEndValue
{ {
get => _sliderEndValue; get => _sliderEndValue;
set set
{ {
if (!_isReplayChecked) var nowDt = DateTime.Now;
var minus = (nowDt - _startDt).TotalMilliseconds;
if (minus > 450)
{ {
var nowDt = DateTime.Now; if (!_isReplayChecked)
var minus = (nowDt - _startDt).TotalMilliseconds;
if (minus > 450)
{ {
_sliderEndValue = value; _sliderEndValue = value;
this.RaisePropertyChanged(nameof(SliderEndValue)); this.RaisePropertyChanged(nameof(SliderEndValue));
...@@ -1882,7 +1875,6 @@ namespace VIZ.FGOUT.Module ...@@ -1882,7 +1875,6 @@ namespace VIZ.FGOUT.Module
var replayModel = new ReplayModel() { IsReplay = true, IsEndValue = true, SliderValue = value }; var replayModel = new ReplayModel() { IsReplay = true, IsEndValue = true, SliderValue = value };
ApplicationDomain.MessageManager.Send(replayModel); ApplicationDomain.MessageManager.Send(replayModel);
} }
_endDt = DateTime.Now;
} }
} }
} }
...@@ -2305,12 +2297,14 @@ namespace VIZ.FGOUT.Module ...@@ -2305,12 +2297,14 @@ namespace VIZ.FGOUT.Module
{ {
SliderStartValue = NDIViewModel.SliderStartValue; SliderStartValue = NDIViewModel.SliderStartValue;
_isDown = false; _isDown = false;
_startDt = DateTime.Now;
} }
//下 //下
else if (context.hotkey.Equals(NDIMainViewHotkeys.Down)) else if (context.hotkey.Equals(NDIMainViewHotkeys.Down))
{ {
SliderEndValue = NDIViewModel.SliderEndValue; SliderEndValue = NDIViewModel.SliderEndValue;
_isDown = true; _isDown = true;
_startDt = DateTime.Now;
} }
//左 //左
else if (context.hotkey.Equals(NDIMainViewHotkeys.Left)) else if (context.hotkey.Equals(NDIMainViewHotkeys.Left))
...@@ -2319,6 +2313,7 @@ namespace VIZ.FGOUT.Module ...@@ -2319,6 +2313,7 @@ namespace VIZ.FGOUT.Module
NDIViewModel.SliderEndValue = --SliderEndValue; NDIViewModel.SliderEndValue = --SliderEndValue;
else else
NDIViewModel.SliderStartValue = --SliderStartValue; NDIViewModel.SliderStartValue = --SliderStartValue;
_startDt = DateTime.Now;
} }
//右 //右
else if (context.hotkey.Equals(NDIMainViewHotkeys.Right)) else if (context.hotkey.Equals(NDIMainViewHotkeys.Right))
...@@ -2327,27 +2322,20 @@ namespace VIZ.FGOUT.Module ...@@ -2327,27 +2322,20 @@ namespace VIZ.FGOUT.Module
NDIViewModel.SliderEndValue = ++SliderEndValue; NDIViewModel.SliderEndValue = ++SliderEndValue;
else else
NDIViewModel.SliderStartValue = ++SliderStartValue; NDIViewModel.SliderStartValue = ++SliderStartValue;
_startDt = DateTime.Now;
} }
//Replay Start //Replay Start
else if (context.hotkey.Equals(NDIMainViewHotkeys.ReplayStart)) else if (context.hotkey.Equals(NDIMainViewHotkeys.ReplayStart))
{
ReplayStart(); ReplayStart();
}
//Replay Stop //Replay Stop
else if (context.hotkey.Equals(NDIMainViewHotkeys.ReplayStop)) else if (context.hotkey.Equals(NDIMainViewHotkeys.ReplayStop))
{ ReplayStop();
ReplayStop();
}
//清除区域 //清除区域
else if (context.hotkey.Equals(NDIMainViewHotkeys.CleanInPoints)) else if (context.hotkey.Equals(NDIMainViewHotkeys.CleanInPoints))
{
CleanInPoint(); CleanInPoint();
}
//Replay UnChecked //Replay UnChecked
else if (context.hotkey.Equals(NDIMainViewHotkeys.Replay)) else if (context.hotkey.Equals(NDIMainViewHotkeys.Replay))
{
ReplayIsChecked = false; ReplayIsChecked = false;
}
} }
else else
{ {
......
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace VIZ.FGOUT.Module namespace VIZ.FGOUT.Module
{ {
/// <summary> /// <summary>
/// SilderArrange.xaml 的交互逻辑 /// SilderArrange.xaml 的交互逻辑
/// </summary> /// </summary>
public partial class SliderArrange : UserControl public partial class SliderArrange
{ {
#region 私有变量 #region 私有变量
......
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;;
......
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