Commit 8c774978 by 鲁志-悦动

NDISetting里的TextBox在回车保存变化的值 And 提示说明文字 And 修复音频选择为空不生效的缺陷 And 修复窗口不是激活状态也生效的缺陷

parent 50662fa7
//------------------------------------------------------------------------------
// <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
false
2-725104376
21870986562
3947974750
17-1462717611
31364711570
17-1683084370
Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml;
True
False
......@@ -1517,9 +1517,12 @@ namespace VIZ.FGOUT.Module
if (window == null)
return;
//if (!window.IsActive)
// return;
//窗口不是激活状态,返回
if (!window.IsActive)
return;
//MessageBox.Show(HotkeyHelper.GetHotkey(e));
//// 屏蔽空格键
//if (e.KeyCode == System.Windows.Forms.Keys.Space)
//{
......@@ -1538,9 +1541,7 @@ namespace VIZ.FGOUT.Module
// 快捷键
string hotkey = HotkeyHelper.GetHotkey(e);
log.Info("快捷键:" + hotkey);
this.hotkeyController.Execute(hotkey);
});
}
......
......@@ -169,7 +169,16 @@
Grid.Row="1"
Grid.Column="1"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Maintain_matting_n, Mode=TwoWay}" />
Text="{Binding Maintain_matting_n, Mode=TwoWay}">
<!--<b:Interaction.Triggers>
<b:EventTrigger EventName="TextChanged">
<b:InvokeCommandAction Command="{Binding Maintain_matting_nTextChangedCommand}" PassEventArgsToCommand="True" />
</b:EventTrigger>
</b:Interaction.Triggers>-->
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="1"
Grid.Column="2"
......@@ -180,7 +189,11 @@
Grid.Row="1"
Grid.Column="3"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Matting_interval, Mode=TwoWay}" />
Text="{Binding Matting_interval, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="1"
Grid.Column="4"
......@@ -191,7 +204,11 @@
Grid.Row="1"
Grid.Column="5"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Moving_pixel, Mode=TwoWay}" />
Text="{Binding Moving_pixel, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="2"
VerticalAlignment="Center"
......@@ -201,7 +218,11 @@
Grid.Row="2"
Grid.Column="1"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Pad_det_x, Mode=TwoWay}" />
Text="{Binding Pad_det_x, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="2"
Grid.Column="2"
......@@ -212,7 +233,11 @@
Grid.Row="2"
Grid.Column="3"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Pad_det_y, Mode=TwoWay}" />
Text="{Binding Pad_det_y, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="2"
Grid.Column="4"
......@@ -223,7 +248,11 @@
Grid.Row="2"
Grid.Column="5"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Pad_det_square, Mode=TwoWay}" />
Text="{Binding Pad_det_square, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="3"
Grid.Column="0"
......@@ -234,7 +263,11 @@
Grid.Row="3"
Grid.Column="1"
Style="{StaticResource TextBoxStyle}"
Text="{Binding AScale, Mode=TwoWay}" />
Text="{Binding AScale, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="3"
Grid.Column="2"
......@@ -245,7 +278,11 @@
Grid.Row="3"
Grid.Column="3"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Extend_frame, Mode=TwoWay}" />
Text="{Binding Extend_frame, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
<TextBlock
Grid.Row="3"
......@@ -257,7 +294,11 @@
Grid.Row="3"
Grid.Column="5"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Landing_frame_interval, Mode=TwoWay}" />
Text="{Binding Landing_frame_interval, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
</TextBox>
</Grid>
<!-- 白线 -->
<Rectangle
......
......@@ -65,6 +65,7 @@
Content="视频输入"
FontSize="22"
Foreground="White"
IsChecked="True"
Style="{StaticResource RadioButton_Setting}" />
<RadioButton
x:Name="rbAlgorithm"
......@@ -73,7 +74,6 @@
Content="参数设置"
FontSize="22"
Foreground="White"
IsChecked="True"
Style="{StaticResource RadioButton_Setting}"
Visibility="{Binding IsCam1Visibility}" />
</StackPanel>
......@@ -100,10 +100,15 @@
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="16"
Foreground="Red"
Text="提示:敲击回车和鼠标点击保存按钮同样效果。" />
<Button
Width="120"
Height="40"
Margin="0,0,40,0"
Margin="40,0"
Command="{Binding Path=CancelCommand}"
Content="取消"
Style="{StaticResource ButtonStyle}" />
......
......@@ -30,6 +30,8 @@ namespace VIZ.FGOUT.Module
{
this.LoadedCommand = new VCommand(this.Loaded);
this.PresetsSelectionChangedCommand = new VCommand(this.PresetsSelectionChanged);
//this.Maintain_matting_nTextChangedCommand = new VCommand<RoutedEventArgs>(this.Maintain_matting_nTextChanged);
this.Maintain_matting_nTextChangedCommand = new VCommand(this.Maintain_matting_nTextChanged);
}
// ======================================================================================
......@@ -148,6 +150,18 @@ namespace VIZ.FGOUT.Module
// === Command ===
// ======================================================================================
public VCommand Maintain_matting_nTextChangedCommand { get; set; }
//private void Maintain_matting_nTextChanged(RoutedEventArgs e)
//{
//}
private void Maintain_matting_nTextChanged()
{
}
#region LoadedCommand -- 加载命令
/// <summary>
......
......@@ -349,8 +349,9 @@ namespace VIZ.FGOUT.Module
{
string streamName = this.SelectedNDIStreamInfo == null ? string.Empty : this.SelectedNDIStreamInfo.FullName;
// int delay = this.SelectedNDIDelayInfo == null ? 0 : this.SelectedNDIDelayInfo.Value;
if (streamName == null)
return false;
//if (streamName == null)
// return false;
//if (this.NdiDispalyName != this.ViewConfig.DisplayName)
// return true;
......
......@@ -169,8 +169,15 @@ namespace VIZ.FGOUT.Module
{
var nowDt = DateTime.Now;
var minus = (nowDt - cropDt).TotalMilliseconds;
if (minus >= ALGORITHM_ClearTrackingBox_TIME)
GetView<NDIView>().video.ClearTrackingBox();//清除跟踪(裁切)框
try
{
if (minus >= ALGORITHM_ClearTrackingBox_TIME)
GetView<NDIView>().video.ClearTrackingBox();//清除跟踪(裁切)框
}
catch (Exception ex)
{
log.Error(ex);
}
}
#endregion
......
using Microsoft.Xaml.Behaviors;
using System.Windows.Controls;
using System.Windows.Input;
namespace VIZ.FGOUT.Module
{
public class TextBoxEnterKeyUpdateBehavior : Behavior<TextBox>
{
protected override void OnAttached()
{
if (AssociatedObject != null)
{
base.OnAttached();
AssociatedObject.KeyDown += AssociatedObject_KeyDown;
}
}
protected override void OnDetaching()
{
if (AssociatedObject != null)
{
AssociatedObject.KeyDown -= AssociatedObject_KeyDown;
base.OnDetaching();
}
}
private void AssociatedObject_KeyDown(object sender, KeyEventArgs e)
{
if (sender is TextBox textBox)
{
if (e.Key == Key.Return)
{
if (e.Key == Key.Enter)
{
textBox.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
}
}
}
}
}
}
......@@ -265,6 +265,7 @@
<Compile Include="SystemSetting\View\UESettingPanelView.xaml.cs">
<DependentUpon>UESettingPanelView.xaml</DependentUpon>
</Compile>
<Compile Include="Themes\TextBoxEnterKeyUpdateBehavior.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
......@@ -323,7 +324,6 @@
<ItemGroup>
<Folder Include="NDIMainView\Model\" />
<Folder Include="NDISettingView\Service\" />
<Folder Include="Themes\" />
</ItemGroup>
<ItemGroup>
<Page Include="NDIMainView\View\NDIMainView.xaml">
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "577B9394477112379FA04A97AD73F2679B77A8E541E18DB324B94A6D4447202F"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F3D77DCC999A7CE3BA30909979FF28ADB008D784B65262B99895B228859F459C"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "577B9394477112379FA04A97AD73F2679B77A8E541E18DB324B94A6D4447202F"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F3D77DCC999A7CE3BA30909979FF28ADB008D784B65262B99895B228859F459C"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DD016B8F9DBF0067CEEFFD763DB77C7D02A9BC939BE92384C4C522B958436679"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0792279A3493C8DC20611D7422B6202C2756CC4A7485A0E43CAD47E1FC708364"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -56,7 +56,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 70 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
#line 71 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton rbAlgorithm;
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DD016B8F9DBF0067CEEFFD763DB77C7D02A9BC939BE92384C4C522B958436679"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0792279A3493C8DC20611D7422B6202C2756CC4A7485A0E43CAD47E1FC708364"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -56,7 +56,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 70 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
#line 71 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton rbAlgorithm;
......
a248c30fe9313ed2d352381fed47d331555b82ed
68293d47dc9d4ef0487262e0c0e9f91b238e2de6
......@@ -12,7 +12,7 @@ DEBUG;TRACE
23-1787007427
4-699044453
92-1486942549
931949589485
151674092382
NDIMainView\View\NDIMainView.xaml;NDIPreviewView\View\NDIPreviewView.xaml;NDISettingView\View\AlgorithmSettingPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmCablewayPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmNearPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSinglePanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSixteenPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmTacticsPanelView.xaml;NDISettingView\View\NDISettingPanelView.xaml;NDISettingView\View\NDISettingView.xaml;NDIView\View\NDIView.xaml;SystemSetting\View\AboutPanelView.xaml;SystemSetting\View\CheckDataPanelView.xaml;SystemSetting\View\HotkeySettingPanelView.xaml;SystemSetting\View\MattingImagePanelView.xaml;SystemSetting\View\NewWindowView.xaml;SystemSetting\View\PackageSettingPanelView.xaml;SystemSetting\View\PreviewSettingPanelView.xaml;SystemSetting\View\ReplayPanelView.xaml;SystemSetting\View\StyleSettingPanelView.xaml;SystemSetting\View\SystemSettingView.xaml;SystemSetting\View\UEControlPanelView.xaml;SystemSetting\View\UESettingPanelView.xaml;
......
VIZ.FGOUT.Module
library
C#
.cs
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\obj\x64\Debug\
VIZ.FGOUT.Module
none
false
DEBUG;TRACE
23-1787007427
4-699044453
93238500938
151674092382
NDIMainView\View\NDIMainView.xaml;NDIPreviewView\View\NDIPreviewView.xaml;NDISettingView\View\AlgorithmSettingPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmCablewayPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmNearPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSinglePanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSixteenPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmTacticsPanelView.xaml;NDISettingView\View\NDISettingPanelView.xaml;NDISettingView\View\NDISettingView.xaml;NDIView\View\NDIView.xaml;SystemSetting\View\AboutPanelView.xaml;SystemSetting\View\CheckDataPanelView.xaml;SystemSetting\View\HotkeySettingPanelView.xaml;SystemSetting\View\MattingImagePanelView.xaml;SystemSetting\View\NewWindowView.xaml;SystemSetting\View\PackageSettingPanelView.xaml;SystemSetting\View\PreviewSettingPanelView.xaml;SystemSetting\View\ReplayPanelView.xaml;SystemSetting\View\StyleSettingPanelView.xaml;SystemSetting\View\SystemSettingView.xaml;SystemSetting\View\UEControlPanelView.xaml;SystemSetting\View\UESettingPanelView.xaml;
False

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\NDIPreviewView\View\NDIPreviewView.xaml;;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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