Commit 9ba8e0e6 by 鲁志-悦动

英文版开发中:具体赛事名称、提示用语、页面样式调整这三块待完善

parent f6b0606f
......@@ -2,15 +2,55 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="WinTitle">MainWindow</sys:String>
<sys:String x:Key="TblText">Support multi language demo.</sys:String>
<sys:String x:Key="BtnOk">OK</sys:String>
<sys:String x:Key="HdNo">No.</sys:String>
<sys:String x:Key="HdName">Name</sys:String>
<sys:String x:Key="HdGender">Gender</sys:String>
<sys:String x:Key="HdDept">Dept</sys:String>
<sys:String x:Key="HdEmail">Email</sys:String>
<sys:String x:Key="HdTel">Tel</sys:String>
<sys:String x:Key="MsgShowTime">Now time is:{0}</sys:String>
<sys:String x:Key="Algorithm">Algorithm</sys:String>
<sys:String x:Key="HoldOn">HoldOn</sys:String>
<sys:String x:Key="GoOn">GoOn</sys:String>
<sys:String x:Key="Reset">Reset</sys:String>
<sys:String x:Key="Auto">Auto</sys:String>
<sys:String x:Key="Start">Start</sys:String>
<sys:String x:Key="End">End</sys:String>
<sys:String x:Key="Manual">Manual</sys:String>
<sys:String x:Key="SaveMatImage">SaveMatImage</sys:String>
<sys:String x:Key="Replay">Replay</sys:String>
<sys:String x:Key="CleanInPoint">CleanInPoint</sys:String>
<sys:String x:Key="Play">Play</sys:String>
<sys:String x:Key="Stop">Stop</sys:String>
<sys:String x:Key="AutoSend">AutoSend</sys:String>
<sys:String x:Key="Confirm">Confirm</sys:String>
<sys:String x:Key="Reconfirm">Reconfirm</sys:String>
<sys:String x:Key="Send">Send</sys:String>
<sys:String x:Key="Abandon">Abandon</sys:String>
<sys:String x:Key="Clear">Clear</sys:String>
<sys:String x:Key="Recover">Recover</sys:String>
<sys:String x:Key="Ignore">Ignore</sys:String>
<sys:String x:Key="BoxSelectionOperation">BoxSelectionOperation</sys:String>
<sys:String x:Key="Language">Language</sys:String>
<sys:String x:Key="LanguageSelection">LanguageSelection</sys:String>
<sys:String x:Key="SystemSetting">SystemSetting</sys:String>
<sys:String x:Key="LanguageSetting">LanguageSetting</sys:String>
<sys:String x:Key="HotkeySetting">HotkeySetting</sys:String>
<sys:String x:Key="About">About</sys:String>
<sys:String x:Key="Cancel">Cancel</sys:String>
<sys:String x:Key="Save">Save</sys:String>
<sys:String x:Key="Version">Version</sys:String>
<sys:String x:Key="SystemVersion">SystemVersion:</sys:String>
<sys:String x:Key="Hotkey">Hotkey</sys:String>
<sys:String x:Key="InPoint">InPoint</sys:String>
<sys:String x:Key="OutPoint">OutPoint</sys:String>
<sys:String x:Key="Up">Up</sys:String>
<sys:String x:Key="Down">Down</sys:String>
<sys:String x:Key="Left">Left</sys:String>
<sys:String x:Key="Right">Right</sys:String>
<sys:String x:Key="Minimize">Minimize</sys:String>
<sys:String x:Key="Close">Close</sys:String>
<sys:String x:Key="RestartAlgorithm">RestartAlgorithm</sys:String>
<sys:String x:Key="StopAlgorithm">StopAlgorithm</sys:String>
<sys:String x:Key="NewWindow">NewWindow</sys:String>
<sys:String x:Key="Setting">Setting</sys:String>
<sys:String x:Key="VideoInput">VideoInput</sys:String>
<sys:String x:Key="SourceVideoInput">SourceVideoInput</sys:String>
<sys:String x:Key="ParameterSettings">ParameterSettings</sys:String>
<sys:String x:Key="AlgorithmParameter">AlgorithmParameter</sys:String>
<sys:String x:Key="Match">Match</sys:String>
<sys:String x:Key="Tips">Tips</sys:String>
</ResourceDictionary>
\ No newline at end of file
......@@ -2,15 +2,55 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="WinTitle">主窗体</sys:String>
<sys:String x:Key="TblText">支持多国语言示例。</sys:String>
<sys:String x:Key="BtnOk">确定</sys:String>
<sys:String x:Key="HdNo">员工号</sys:String>
<sys:String x:Key="HdName">姓名</sys:String>
<sys:String x:Key="HdGender">性别</sys:String>
<sys:String x:Key="HdDept">部门</sys:String>
<sys:String x:Key="HdEmail">邮箱</sys:String>
<sys:String x:Key="HdTel">电话</sys:String>
<sys:String x:Key="MsgShowTime">现在时间是:{0}</sys:String>
<sys:String x:Key="Algorithm">算法</sys:String>
<sys:String x:Key="HoldOn">挂起</sys:String>
<sys:String x:Key="GoOn">继续</sys:String>
<sys:String x:Key="Reset">重置</sys:String>
<sys:String x:Key="Auto">自动</sys:String>
<sys:String x:Key="Start">开始</sys:String>
<sys:String x:Key="End">结束</sys:String>
<sys:String x:Key="Manual">手动</sys:String>
<sys:String x:Key="SaveMatImage">落盘</sys:String>
<sys:String x:Key="Replay">回放</sys:String>
<sys:String x:Key="CleanInPoint">清除选区</sys:String>
<sys:String x:Key="Play">播放</sys:String>
<sys:String x:Key="Stop">停止</sys:String>
<sys:String x:Key="AutoSend">自动发送</sys:String>
<sys:String x:Key="Confirm">确定</sys:String>
<sys:String x:Key="Reconfirm">二次确认</sys:String>
<sys:String x:Key="Send">发送</sys:String>
<sys:String x:Key="Abandon">抛弃</sys:String>
<sys:String x:Key="Clear">清空</sys:String>
<sys:String x:Key="Recover">恢复</sys:String>
<sys:String x:Key="Ignore">忽略</sys:String>
<sys:String x:Key="BoxSelectionOperation">选框操作</sys:String>
<sys:String x:Key="Language">语言</sys:String>
<sys:String x:Key="LanguageSelection">语言选择</sys:String>
<sys:String x:Key="SystemSetting">系统设置</sys:String>
<sys:String x:Key="LanguageSetting">语言设置</sys:String>
<sys:String x:Key="HotkeySetting">快捷键设置</sys:String>
<sys:String x:Key="About">关于</sys:String>
<sys:String x:Key="Cancel">取消</sys:String>
<sys:String x:Key="Save">保存</sys:String>
<sys:String x:Key="Version">版本</sys:String>
<sys:String x:Key="SystemVersion">系统版本:</sys:String>
<sys:String x:Key="Hotkey">快捷键</sys:String>
<sys:String x:Key="InPoint">入点</sys:String>
<sys:String x:Key="OutPoint">出点</sys:String>
<sys:String x:Key="Up">上</sys:String>
<sys:String x:Key="Down">下</sys:String>
<sys:String x:Key="Left">左</sys:String>
<sys:String x:Key="Right">右</sys:String>
<sys:String x:Key="Minimize">最小化</sys:String>
<sys:String x:Key="Close">关闭</sys:String>
<sys:String x:Key="RestartAlgorithm">重启算法</sys:String>
<sys:String x:Key="StopAlgorithm">关闭算法</sys:String>
<sys:String x:Key="NewWindow">新窗口</sys:String>
<sys:String x:Key="Setting">设置</sys:String>
<sys:String x:Key="VideoInput">视频输入</sys:String>
<sys:String x:Key="SourceVideoInput">源视频输入</sys:String>
<sys:String x:Key="ParameterSettings">参数设置</sys:String>
<sys:String x:Key="AlgorithmParameter">算法参数</sys:String>
<sys:String x:Key="Match">赛事</sys:String>
<sys:String x:Key="Tips">提示</sys:String>
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common">
<Style x:Key="VMessageBox_Button_Yes" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="16"></Setter>
<Setter Property="Width" Value="120"></Setter>
<Setter Property="Height" Value="40"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="40" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="border" Background="#aa303d54">
<TextBlock Text="确定" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Foreground="White"></TextBlock>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="{DynamicResource Confirm}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#ff303d54"></Setter>
<Setter TargetName="border" Property="Background" Value="#ff303d54" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.7"></Setter>
<Setter Property="Opacity" Value="0.7" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......@@ -28,23 +34,28 @@
</Style>
<Style x:Key="VMessageBox_Button_Cancel" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="16"></Setter>
<Setter Property="Width" Value="120"></Setter>
<Setter Property="Height" Value="40"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="40" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="border" Background="#aa303d54">
<TextBlock Text="取消" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Foreground="White"></TextBlock>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="{DynamicResource Cancel}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#ff303d54"></Setter>
<Setter TargetName="border" Property="Background" Value="#ff303d54" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.7"></Setter>
<Setter Property="Opacity" Value="0.7" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......@@ -53,37 +64,69 @@
</Style>
<Style TargetType="common:MessageBoxEx">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="400"></Setter>
<Setter Property="Height" Value="300"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Width" Value="400" />
<Setter Property="Height" Value="300" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="common:MessageBoxEx">
<Border Background="#ff252b3d" BorderBrush="#22000000" BorderThickness="1">
<Border
Background="#ff252b3d"
BorderBrush="#22000000"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="100" />
<RowDefinition Height="*" />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<common:DragWindowBar Grid.RowSpan="3" Background="Transparent"></common:DragWindowBar>
<TextBlock Text="{TemplateBinding Title}" Foreground="White" FontSize="40" VerticalAlignment="Center" HorizontalAlignment="Left"
FontWeight="Black" Margin="40,0,40,0"></TextBlock>
<TextBlock Grid.Row="1" Text="{TemplateBinding Message}" Foreground="White" FontSize="24" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"
Margin="40,0,40,0"></TextBlock>
<common:DragWindowBar Grid.RowSpan="3" Background="Transparent" />
<TextBlock
Margin="40,0,40,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="40"
FontWeight="Black"
Foreground="White"
Text="{TemplateBinding Title}" />
<TextBlock
Grid.Row="1"
Margin="40,0,40,0"
FontSize="24"
Foreground="White"
Text="{TemplateBinding Message}"
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />
<Rectangle Fill="#ff2b3445" Grid.Row="2"></Rectangle>
<StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
<Button x:Name="PART_CancelButton" Grid.Row="2" Style="{StaticResource VMessageBox_Button_Cancel}"
Width="120" Height="40" Margin="0,0,40,0" Content="取消" Visibility="Hidden"></Button>
<Button x:Name="PART_YesButton" Grid.Row="2" Style="{StaticResource VMessageBox_Button_Yes}"
Width="120" Height="40" Margin="0,0,40,0" Content="确定"></Button>
<Rectangle Grid.Row="2" Fill="#ff2b3445" />
<StackPanel
Grid.Row="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="PART_CancelButton"
Grid.Row="2"
Width="120"
Height="40"
Margin="0,0,40,0"
Content="{DynamicResource Cancel}"
Style="{StaticResource VMessageBox_Button_Cancel}"
Visibility="Hidden" />
<Button
x:Name="PART_YesButton"
Grid.Row="2"
Width="120"
Height="40"
Margin="0,0,40,0"
Content="{DynamicResource Confirm}"
Style="{StaticResource VMessageBox_Button_Yes}" />
</StackPanel>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Buttons" Value="YES_CANCEL">
<Setter TargetName="PART_CancelButton" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="PART_CancelButton" Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......
......@@ -499,7 +499,33 @@ namespace VIZ.FGOUT.Module
if (_setLanguageConfig == null) return;
if (!_setLanguageConfig.IsChinese)
{
InitEnglishLanguage();
}
}
/// <summary>
/// 初始化英文版
/// </summary>
private void InitEnglishLanguage()
{
var culture = "en";
List<ResourceDictionary> dictionaryList = new List<ResourceDictionary>();
foreach (ResourceDictionary dictionary in Application.Current.Resources.MergedDictionaries)
{
dictionaryList.Add(dictionary);
}
string requestedCulture = string.Format(@"/VIZ.FGOUT.Module.Resource;component/Resources/StringResource.{0}.xaml", culture);
ResourceDictionary resourceDictionary = dictionaryList.FirstOrDefault(d => d.Source.OriginalString.Equals(requestedCulture));
if (resourceDictionary == null)
{
requestedCulture = @"/VIZ.FGOUT.Module.Resource;component/Resources/StringResource.zh-cn.xaml";
resourceDictionary = dictionaryList.FirstOrDefault(d => d.Source.OriginalString.Equals(requestedCulture));
}
if (resourceDictionary != null)
{
Application.Current.Resources.MergedDictionaries.Remove(resourceDictionary);
//生效最后一行配置
Application.Current.Resources.MergedDictionaries.Add(resourceDictionary);
}
}
......
......@@ -109,7 +109,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="赛事" />
Text="{DynamicResource Match}" />
<!--<ComboBox
Grid.Row="5"
......@@ -160,7 +160,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="算法参数" />
Text="{DynamicResource AlgorithmParameter}" />
<TextBlock
Grid.Row="1"
VerticalAlignment="Center"
......
......@@ -72,7 +72,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="源视频输入" />
Text="{DynamicResource SourceVideoInput}" />
<!--<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="仅显示本机视频输入" Foreground="#aaffffff" VerticalAlignment="Center"></TextBlock>
<CheckBox Style="{StaticResource CheckBox_Setting}" VerticalAlignment="Center"
......
......@@ -55,14 +55,14 @@
Margin="10,0,0,0"
FontSize="24"
Foreground="White"
Text="设置" />
Text="{DynamicResource Setting}" />
</StackPanel>
<StackPanel Grid.Row="1" Grid.RowSpan="2">
<RadioButton
x:Name="rbNDI"
Height="50"
VerticalContentAlignment="Center"
Content="视频输入"
Content="{DynamicResource VideoInput}"
FontSize="22"
Foreground="White"
IsChecked="True"
......@@ -71,7 +71,7 @@
x:Name="rbAlgorithm"
Height="50"
VerticalContentAlignment="Center"
Content="参数设置"
Content="{DynamicResource ParameterSettings}"
FontSize="22"
Foreground="White"
Style="{StaticResource RadioButton_Setting}"
......@@ -110,14 +110,14 @@
Height="40"
Margin="40,0"
Command="{Binding Path=CancelCommand}"
Content="取消"
Content="{DynamicResource Cancel}"
Style="{StaticResource ButtonStyle}" />
<Button
Width="120"
Height="40"
Margin="0,0,40,0"
Command="{Binding Path=SaveCommand}"
Content="保存"
Content="{DynamicResource Save}"
IsDefault="True"
Style="{StaticResource ButtonStyle}" />
</StackPanel>
......
......@@ -363,6 +363,11 @@ namespace VIZ.FGOUT.Module
}
/// <summary>
/// 算法程序启动是否隐藏控制台窗口
/// </summary>
protected bool ALGORITHM_IS_HIDDEN_CONSOLE_WINDOW = ApplicationDomain.IniStorage.GetValue<AlgorithmConfig, bool>(p => p.ALGORITHM_IS_HIDDEN_CONSOLE_WINDOW);
/// <summary>
/// 停止算法 -- 启动算法
/// </summary>
/// <returns>是否成功</returns>
......@@ -421,10 +426,13 @@ namespace VIZ.FGOUT.Module
Process mainProcess = this.CreateSetupProcess(strategy.MainPath, args);
#region 调用算法程序隐藏运行
#region 调用算法程序是否隐藏运行
//mainProcess.StartInfo.UseShellExecute = true;
//mainProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
if (ALGORITHM_IS_HIDDEN_CONSOLE_WINDOW)
{
mainProcess.StartInfo.UseShellExecute = true;
mainProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
}
#endregion
......
......@@ -416,7 +416,7 @@
CommandParameter="{Binding ElementName=uc, Path=NDIKey, Mode=OneWay}"
Style="{StaticResource Button_Setting_Open}" />
</Border>-->
<Border ToolTip="设置">
<Border ToolTip="{DynamicResource Setting}">
<Button
x:Name="_Setting_"
Width="32"
......@@ -437,7 +437,7 @@
VerticalAlignment="Bottom"
Orientation="Vertical">
<!-- 新窗口 -->
<Border ToolTip="新窗口">
<Border ToolTip="{DynamicResource NewWindow}">
<Button
x:Name="_NewWindowBtn_"
Width="32"
......@@ -452,7 +452,7 @@
</Button>
</Border>
<!-- 重启算法 -->
<Border ToolTip="重启算法">
<Border ToolTip="{DynamicResource RestartAlgorithm}">
<Button
x:Name="_RestartBtn_"
Width="32"
......@@ -466,7 +466,7 @@
</Button>
</Border>
<!-- 关闭算法 -->
<Border ToolTip="关闭算法">
<Border ToolTip="{DynamicResource StopAlgorithm}">
<Button
x:Name="_StopBtn_"
Width="32"
......
<UserControl x:Class="VIZ.FGOUT.Module.AboutPanelView"
<UserControl
x:Class="VIZ.FGOUT.Module.AboutPanelView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.FGOUT.Module"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:VIZ.FGOUT.Module"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance Type=local:AboutPanelViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Loaded">
......@@ -19,28 +21,48 @@
<Border>
<Grid Margin="45,60,40,0">
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="180"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="60" />
<RowDefinition Height="180" />
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- 剪切框颜色 -->
<TextBlock Text="版本" Foreground="White" FontSize="20" VerticalAlignment="Center"></TextBlock>
<Rectangle Height="1" VerticalAlignment="Bottom" Fill="#ff3d4758"></Rectangle>
<TextBlock
VerticalAlignment="Center"
FontSize="20"
Foreground="White"
Text="{DynamicResource Version}" />
<Rectangle
Height="1"
VerticalAlignment="Bottom"
Fill="#ff3d4758" />
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 系统版本 -->
<TextBlock Text="系统版本:" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"></TextBlock>
<TextBlock Text="{Binding Path=SystemVersion}" Foreground="White" FontSize="18" VerticalAlignment="Center" Margin="20,0,0,0" Grid.Row="0" Grid.Column="1"></TextBlock>
<TextBlock
Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="{DynamicResource SystemVersion}" />
<TextBlock
Grid.Row="0"
Grid.Column="1"
Margin="20,0,0,0"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="{Binding Path=SystemVersion}" />
</Grid>
</Grid>
</Border>
......
......@@ -47,7 +47,7 @@
VerticalAlignment="Center"
FontSize="20"
Foreground="#AAFFFFFF"
Text="快捷键" />
Text="{DynamicResource Hotkey}" />
<Rectangle
Height="1"
VerticalAlignment="Bottom"
......@@ -73,7 +73,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="开始" />
Text="{DynamicResource Start}" />
<fcommon:HotkeyBox
Grid.Column="1"
Height="30"
......@@ -87,7 +87,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="结束" />
Text="{DynamicResource End}" />
<fcommon:HotkeyBox
Grid.Row="0"
Grid.Column="3"
......@@ -102,7 +102,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="入点" />
Text="{DynamicResource InPoint}" />
<fcommon:HotkeyBox
Grid.Row="1"
Grid.Column="1"
......@@ -117,7 +117,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="出点" />
Text="{DynamicResource OutPoint}" />
<fcommon:HotkeyBox
Grid.Row="1"
Grid.Column="3"
......@@ -132,7 +132,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="" />
Text="{DynamicResource Up}" />
<fcommon:HotkeyBox
Grid.Row="2"
Grid.Column="1"
......@@ -147,7 +147,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="" />
Text="{DynamicResource Down}" />
<fcommon:HotkeyBox
Grid.Row="2"
Grid.Column="3"
......@@ -162,7 +162,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="" />
Text="{DynamicResource Left}" />
<fcommon:HotkeyBox
Grid.Row="3"
Grid.Column="1"
......@@ -177,7 +177,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="" />
Text="{DynamicResource Right}" />
<fcommon:HotkeyBox
Grid.Row="3"
Grid.Column="3"
......@@ -192,7 +192,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="回放" />
Text="{DynamicResource Replay}" />
<fcommon:HotkeyBox
Grid.Row="4"
Grid.Column="1"
......@@ -207,7 +207,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="清除选区" />
Text="{DynamicResource CleanInPoint}" />
<fcommon:HotkeyBox
Grid.Row="4"
Grid.Column="3"
......@@ -222,7 +222,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="播放" />
Text="{DynamicResource Play}" />
<fcommon:HotkeyBox
Grid.Row="5"
Grid.Column="1"
......@@ -237,7 +237,7 @@
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="停止" />
Text="{DynamicResource Stop}" />
<fcommon:HotkeyBox
Grid.Row="5"
Grid.Column="3"
......
......@@ -6,6 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.FGOUT.Module"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance Type=local:LanguagePanelViewModel}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
......@@ -29,7 +30,7 @@
VerticalAlignment="Center"
FontSize="20"
Foreground="White"
Text="语言" />
Text="{DynamicResource Language}" />
<Rectangle
Height="1"
VerticalAlignment="Bottom"
......@@ -48,22 +49,15 @@
Margin="0,20,0,0"
FontSize="18"
Foreground="White"
Text="语言选择" />
Text="{DynamicResource LanguageSelection}" />
<ComboBox
Grid.Column="1"
Width="150"
Height="40"
ItemsSource="{Binding Path=MattingImageItems, Mode=OneWay}"
SelectedValue="{Binding Path=SelectedMattiingImageItem, Mode=TwoWay}"
ItemsSource="{Binding Path=LanguageInfos, Mode=OneWay}"
SelectedIndex="{Binding SelectedLanguageInfoIndex, Mode=TwoWay}"
Style="{StaticResource ComboBoxStyle}" />
<!--<Button
Grid.Column="2"
Width="150"
Height="40"
Command="{Binding Path=OkCommand}"
Content="确定"
Style="{StaticResource ButtonStyle}" />-->
</Grid>
</StackPanel>
</Grid>
......
......@@ -51,7 +51,7 @@
Margin="0,0,0,0"
FontSize="24"
Foreground="White"
Text="系统设置" />
Text="{DynamicResource SystemSetting}" />
</StackPanel>
<StackPanel Grid.Row="1" Grid.RowSpan="2">
<!--<RadioButton
......@@ -83,7 +83,7 @@
x:Name="rbLanguage"
Height="50"
VerticalContentAlignment="Center"
Content="语言设置"
Content="{DynamicResource LanguageSetting}"
FontSize="22"
Foreground="White"
IsChecked="True"
......@@ -92,7 +92,7 @@
x:Name="rbHotkey"
Height="50"
VerticalContentAlignment="Center"
Content="快捷键设置"
Content="{DynamicResource HotkeySetting}"
FontSize="22"
Foreground="White"
Style="{StaticResource RadioButton_Setting}" />
......@@ -100,7 +100,7 @@
x:Name="rbAbout"
Height="50"
VerticalContentAlignment="Center"
Content="关于"
Content="{DynamicResource About}"
FontSize="22"
Foreground="White"
Style="{StaticResource RadioButton_Setting}" />
......@@ -141,14 +141,14 @@
Height="40"
Margin="0,0,40,0"
Command="{Binding Path=CancelCommand}"
Content="取消"
Content="{DynamicResource Cancel}"
Style="{StaticResource ButtonStyle}" />
<Button
Width="120"
Height="40"
Margin="0,0,40,0"
Command="{Binding Path=SaveCommand}"
Content="保存"
Content="{DynamicResource Save}"
IsDefault="True"
Style="{StaticResource ButtonStyle}" />
</StackPanel>
......
......@@ -238,16 +238,14 @@
Orientation="Horizontal">
<Button
Width="120"
Height="30"
Margin="0,0,30,0"
Command="{Binding Path=CancelCommand}"
Content="取消"
Content="{DynamicResource Cancel}"
Style="{StaticResource ButtonStyle}" />
<Button
Width="120"
Height="30"
Command="{Binding Path=SaveCommand}"
Content="发送"
Content="{DynamicResource Send}"
Style="{StaticResource ButtonStyle}" />
</StackPanel>
</Grid>
......
......@@ -65,11 +65,57 @@ namespace VIZ.FGOUT.Module
private void InitLanguage()
{
this._setLanguageConfig = ApplicationDomainEx.LiteDbContext.SetLanguageConfig.FindAll().FirstOrDefault();
if (_setLanguageConfig == null) return;
if (!_setLanguageConfig.IsChinese)
if (_setLanguageConfig == null)
{
LanguageInfos = new List<string>() { "中文", "英文" };
//_initItem = SelectedLanguageInfoItem = LanguageInfos.FirstOrDefault();
_initIndex = SelectedLanguageInfoIndex = 0;
}
//英文版
else if (!_setLanguageConfig.IsChinese)
{
LanguageInfos = new List<string>() { "Chinese","English"};
//_initItem = SelectedLanguageInfoItem = LanguageInfos.LastOrDefault();
_initIndex = SelectedLanguageInfoIndex = 1;
}
else
{
LanguageInfos = new List<string>() { "中文", "英文" };
// _initItem = SelectedLanguageInfoItem = LanguageInfos.FirstOrDefault();
_initIndex = SelectedLanguageInfoIndex = 0;
}
}
//页面初始化时进来的语言下标
private int _initIndex;
#endregion
#region 语言集合
private List<string> _languageInfos;
/// <summary>
/// GPU信息集合
/// </summary>
public List<string> LanguageInfos
{
get { return _languageInfos; }
set { _languageInfos = value; this.RaisePropertyChanged(nameof(LanguageInfos)); }
}
private string _selectedLanguageInfoItem;
public string SelectedLanguageInfoItem
{
get { return _selectedLanguageInfoItem; }
set { _selectedLanguageInfoItem = value; this.RaisePropertyChanged(nameof(SelectedLanguageInfoItem)); }
}
private int _selectedLanguageInfoIndex;
public int SelectedLanguageInfoIndex
{
get { return _selectedLanguageInfoIndex; }
set { _selectedLanguageInfoIndex = value; this.RaisePropertyChanged(nameof(SelectedLanguageInfoIndex)); }
}
#endregion
......@@ -80,8 +126,13 @@ namespace VIZ.FGOUT.Module
/// <returns>是否需要保存</returns>
public bool IsNeedSave()
{
//return false;
////return false;
//return true;
if (_initIndex != SelectedLanguageInfoIndex)
return true;
return false;
}
/// <summary>
......@@ -90,13 +141,21 @@ namespace VIZ.FGOUT.Module
/// <returns>是否成功保存</returns>
public bool Save()
{
var Culture = "en";
var culture = "en";
var isChese = false;
var index = SelectedLanguageInfoIndex;
if (index == 0)
{
culture ="zh-cn";
isChese = true;
}
List<ResourceDictionary> dictionaryList = new List<ResourceDictionary>();
foreach (ResourceDictionary dictionary in Application.Current.Resources.MergedDictionaries)
{
dictionaryList.Add(dictionary);
}
string requestedCulture = string.Format(@"/VIZ.FGOUT.Module.Resource;component/Resources/StringResource.{0}.xaml", Culture);
string requestedCulture = string.Format(@"/VIZ.FGOUT.Module.Resource;component/Resources/StringResource.{0}.xaml", culture);
ResourceDictionary resourceDictionary = dictionaryList.FirstOrDefault(d => d.Source.OriginalString.Equals(requestedCulture));
if (resourceDictionary == null)
{
......@@ -110,6 +169,15 @@ namespace VIZ.FGOUT.Module
Application.Current.Resources.MergedDictionaries.Add(resourceDictionary);
}
#region 更新语言到数据库
SetLanguageConfig setLanguageConfig = ApplicationDomainEx.LiteDbContext.SetLanguageConfig.FindAll().FirstOrDefault();
if (setLanguageConfig == null) setLanguageConfig = new SetLanguageConfig();
setLanguageConfig.IsChinese = isChese;
ApplicationDomainEx.LiteDbContext.SetLanguageConfig.Upsert(setLanguageConfig);
#endregion
return true;
}
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "AD8DCDD1D1700ACF66B2A8F3A75BA3E381AA43CBE60C69A6DC403FEB57941097"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "523A39F07867E4A285AEC3DC8B32F82F868A97DC0D35C2FD6B0AF65E1DE55D3C"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1407 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1408 "..\..\..\..\..\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 1422 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1423 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "AD8DCDD1D1700ACF66B2A8F3A75BA3E381AA43CBE60C69A6DC403FEB57941097"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "523A39F07867E4A285AEC3DC8B32F82F868A97DC0D35C2FD6B0AF65E1DE55D3C"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1407 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1408 "..\..\..\..\..\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 1422 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1423 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F062D90B148837AB6667D5262C07FC39A30EF037B533E1693A1B7557742A7F2D"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F4134FF5A74D489F66BED80B2650DC7605E0FDD14EC7869838CEABB01AD3765A"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F062D90B148837AB6667D5262C07FC39A30EF037B533E1693A1B7557742A7F2D"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F4134FF5A74D489F66BED80B2650DC7605E0FDD14EC7869838CEABB01AD3765A"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4E159E73191D48FECDE137EE654C2D1CE329280989828972780B908F12950A3C"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0D0DCC6E7FB98E947A3C9D0C2CE97BC24E410F355ED924910462401360E4186E"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4E159E73191D48FECDE137EE654C2D1CE329280989828972780B908F12950A3C"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0D0DCC6E7FB98E947A3C9D0C2CE97BC24E410F355ED924910462401360E4186E"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2E31E0B0E402C395908915FFF78F8690227170854231FC14BE5354DE3F37BE2B"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FF0AA13A5E7D46534A55575416E7126DD8E5DC77BB4D609EAB1299873DCD01CE"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2E31E0B0E402C395908915FFF78F8690227170854231FC14BE5354DE3F37BE2B"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FF0AA13A5E7D46534A55575416E7126DD8E5DC77BB4D609EAB1299873DCD01CE"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDIView\View\NDIView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "024E8EBC9F6EA75546E95DDB73958A56E28DCB79CC4FD50C8207ADCF6E2D9678"
#pragma checksum "..\..\..\..\..\NDIView\View\NDIView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "EEBC837C4CCAAE4CA4C4ECABC00103EAD1EB4736BC86711A45DD218E10DE67E7"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDIView\View\NDIView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "024E8EBC9F6EA75546E95DDB73958A56E28DCB79CC4FD50C8207ADCF6E2D9678"
#pragma checksum "..\..\..\..\..\NDIView\View\NDIView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "EEBC837C4CCAAE4CA4C4ECABC00103EAD1EB4736BC86711A45DD218E10DE67E7"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\AboutPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C0CDBB54D6DD671D57D68E3658DC8E899A60722C9C786E049CE5C9DA804C8E04"
#pragma checksum "..\..\..\..\..\SystemSetting\View\AboutPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "256835643A66BD7879522CD7C156393CBEF070965BD982E555F49BA4BAC8F0DD"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\AboutPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C0CDBB54D6DD671D57D68E3658DC8E899A60722C9C786E049CE5C9DA804C8E04"
#pragma checksum "..\..\..\..\..\SystemSetting\View\AboutPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "256835643A66BD7879522CD7C156393CBEF070965BD982E555F49BA4BAC8F0DD"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "24F88D3FCD4B81E63C2BDFE3A6BFF72D5E39EE2F4AC595F05411F2810FEFDC5E"
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0CFCB23CA897688F867B8297EEAE171B14537344F2603CC59CF2940578B4D461"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "24F88D3FCD4B81E63C2BDFE3A6BFF72D5E39EE2F4AC595F05411F2810FEFDC5E"
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0CFCB23CA897688F867B8297EEAE171B14537344F2603CC59CF2940578B4D461"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "91765E5DA7D45490DFD7B3BF055C4587E95504C478B8ECE52E1AED2B87F1AF03"
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "5AEF8EDB0A1DFCF84CAD07DCFDD7A4F20125AA514A901B119FC6C482CCCB546D"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "91765E5DA7D45490DFD7B3BF055C4587E95504C478B8ECE52E1AED2B87F1AF03"
#pragma checksum "..\..\..\..\..\SystemSetting\View\SystemSettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "5AEF8EDB0A1DFCF84CAD07DCFDD7A4F20125AA514A901B119FC6C482CCCB546D"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......

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;;
......
......@@ -36,5 +36,11 @@ namespace VIZ.FGOUT.Storage
/// </summary>
[Ini(Section = "Algorithm", DefaultValue = "3000", Type = typeof(int))]
public string ALGORITHM_ReconfirmAutoSend_TIME { get; set; }
/// <summary>
/// 算法程序启动是否隐藏控制台窗口 (True | Flase)
/// </summary>
[Ini(Section = "Algorithm", DefaultValue = "False", Type = typeof(bool))]
public string ALGORITHM_IS_HIDDEN_CONSOLE_WINDOW { get; set; }
}
}
......@@ -102,6 +102,8 @@ ALGORITHM_TARGET_BOX_LOST_FRAME=25
ALGORITHM_ClearTrackingBox_TIME=1000
;算法二次确认自动发送时间(单位:毫秒)
ALGORITHM_ReconfirmAutoSend_TIME=3000
;算法程序启动是否隐藏控制台窗口
ALGORITHM_IS_HIDDEN_CONSOLE_WINDOW=false
[Stream]
;音视频流的缓存时间(单位:秒)
STREAM_CACHEED_TIME=10
......
......@@ -102,6 +102,8 @@ ALGORITHM_TARGET_BOX_LOST_FRAME=25
ALGORITHM_ClearTrackingBox_TIME=1000
;算法二次确认自动发送时间(单位:毫秒)
ALGORITHM_ReconfirmAutoSend_TIME=3000
;算法程序启动是否隐藏控制台窗口
ALGORITHM_IS_HIDDEN_CONSOLE_WINDOW=false
[Stream]
;音视频流的缓存时间(单位:秒)
STREAM_CACHEED_TIME=10
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="clr-namespace:VIZ.Framework.Common">
<Style x:Key="VMessageBox_Button_Yes" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="140"></Setter>
<Setter Property="Height" Value="45"></Setter>
<Setter Property="Margin" Value="10,0,10,0"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Width" Value="140" />
<Setter Property="Height" Value="45" />
<Setter Property="Margin" Value="10,0,10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bd" CornerRadius="10" Background="#aa007cff">
<TextBlock Text="确定" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Foreground="White"></TextBlock>
<Border
x:Name="bd"
Background="#aa007cff"
CornerRadius="10">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="{DynamicResource Confirm}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#ff007cff"></Setter>
<Setter TargetName="bd" Property="Background" Value="#ff007cff" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......@@ -24,19 +33,27 @@
</Style>
<Style x:Key="VMessageBox_Button_Cancel" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="140"></Setter>
<Setter Property="Height" Value="45"></Setter>
<Setter Property="Margin" Value="10,0,10,0"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Width" Value="140" />
<Setter Property="Height" Value="45" />
<Setter Property="Margin" Value="10,0,10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bd" CornerRadius="10" Background="#aadcdcdc">
<TextBlock Text="取消" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Foreground="Black"></TextBlock>
<Border
x:Name="bd"
Background="#aadcdcdc"
CornerRadius="10">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Foreground="Black"
Text="{DynamicResource Cancel}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#ffdcdcdc"></Setter>
<Setter TargetName="bd" Property="Background" Value="#ffdcdcdc" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......@@ -45,35 +62,61 @@
</Style>
<Style TargetType="common:MessageBoxEx">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="400"></Setter>
<Setter Property="Height" Value="300"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Width" Value="400" />
<Setter Property="Height" Value="300" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="common:MessageBoxEx">
<Border Background="White" BorderBrush="#22000000" BorderThickness="1" CornerRadius="40">
<Border
Background="White"
BorderBrush="#22000000"
BorderThickness="1"
CornerRadius="40">
<Border.Effect>
<DropShadowEffect Opacity="0.36"/>
<DropShadowEffect Opacity="0.36" />
</Border.Effect>
<Grid Margin="30,20,30,20">
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="80" />
<RowDefinition Height="*" />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<common:DragWindowBar Grid.RowSpan="3" Background="Transparent"></common:DragWindowBar>
<TextBlock Text="{TemplateBinding Title}" Foreground="Black" FontSize="40" VerticalAlignment="Center" HorizontalAlignment="Left"
FontWeight="Black"></TextBlock>
<TextBlock Grid.Row="1" Text="{TemplateBinding Message}" Foreground="Black" FontSize="24" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"></TextBlock>
<StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
<Button x:Name="PART_CancelButton" Grid.Row="2" Style="{StaticResource VMessageBox_Button_Cancel}" Content="取消" Visibility="Hidden"></Button>
<Button x:Name="PART_YesButton" Grid.Row="2" Style="{StaticResource VMessageBox_Button_Yes}" Content="确定"></Button>
<common:DragWindowBar Grid.RowSpan="3" Background="Transparent" />
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="40"
FontWeight="Black"
Foreground="Black"
Text="{TemplateBinding Title}" />
<TextBlock
Grid.Row="1"
FontSize="24"
Foreground="Black"
Text="{TemplateBinding Message}"
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />
<StackPanel
Grid.Row="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="PART_CancelButton"
Content="{DynamicResource Cancel}"
Style="{StaticResource VMessageBox_Button_Cancel}"
Visibility="Hidden" />
<Button
x:Name="PART_YesButton"
Content="{DynamicResource Confirm}"
Style="{StaticResource VMessageBox_Button_Yes}" />
</StackPanel>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Buttons" Value="YES_CANCEL">
<Setter TargetName="PART_CancelButton" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="PART_CancelButton" Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......
<Window x:Class="VIZ.Framework.Common.ColorPickWindow"
<Window
x:Class="VIZ.Framework.Common.ColorPickWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VIZ.Framework.Common"
mc:Ignorable="d" WindowStartupLocation="CenterOwner" WindowStyle="SingleBorderWindow"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
x:Name="window" ResizeMode="NoResize"
Title="选择颜色" Height="360" Width="260">
x:Name="window"
Title="选择颜色"
Width="260"
Height="360"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="SingleBorderWindow"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="*" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<toolkit:ColorCanvas Margin="5" SelectedColor="{Binding ElementName=window,Path=SelectedColor,Mode=TwoWay}"></toolkit:ColorCanvas>
<toolkit:ColorCanvas Margin="5" SelectedColor="{Binding ElementName=window, Path=SelectedColor, Mode=TwoWay}" />
<Button Content="还原" Width="60" Height="30" Grid.Row="1" HorizontalAlignment="Left" Margin="5,0,0,0"
x:Name="btReset" Click="btReset_Click"></Button>
<Grid Grid.Row="1" Width="200" HorizontalAlignment="Right">
<Button
x:Name="btReset"
Grid.Row="1"
Width="60"
Height="30"
Margin="5,0,0,0"
HorizontalAlignment="Left"
Click="btReset_Click"
Content="还原" />
<Grid
Grid.Row="1"
Width="200"
HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Content="确定" Width="60" Height="30" Grid.Column="1"
x:Name="btEnter" Click="btEnter_Click"></Button>
<Button Content="取消" Width="60" Height="30" Grid.Column="2"
x:Name="btCancel" Click="btCancel_Click"></Button>
<Button
x:Name="btEnter"
Grid.Column="1"
Width="60"
Height="30"
Click="btEnter_Click"
Content="{DynamicResource Confirm}" />
<Button
x:Name="btCancel"
Grid.Column="2"
Width="60"
Height="30"
Click="btCancel_Click"
Content="{DynamicResource Cancel}" />
</Grid>
</Grid>
</Window>

//------------------------------------------------------------------------------
// <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);
}
}
}
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\MessageBoxExWindow.xaml;;
......
#pragma checksum "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C5F8149A98A63FEF332DDFD271180446C610072CF7D32D8C1DF5C1640DA1B491"
#pragma checksum "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F227736DDC518103DBD89754DA826257F6F28B18E52F44B6DDB8744F773C0293"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -67,7 +67,7 @@ namespace VIZ.Framework.Common {
#line hidden
#line 19 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 25 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btReset;
......@@ -75,7 +75,7 @@ namespace VIZ.Framework.Common {
#line hidden
#line 27 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 43 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btEnter;
......@@ -83,7 +83,7 @@ namespace VIZ.Framework.Common {
#line hidden
#line 29 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 50 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btCancel;
......@@ -126,7 +126,7 @@ namespace VIZ.Framework.Common {
case 2:
this.btReset = ((System.Windows.Controls.Button)(target));
#line 19 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 31 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
this.btReset.Click += new System.Windows.RoutedEventHandler(this.btReset_Click);
#line default
......@@ -135,7 +135,7 @@ namespace VIZ.Framework.Common {
case 3:
this.btEnter = ((System.Windows.Controls.Button)(target));
#line 27 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 47 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
this.btEnter.Click += new System.Windows.RoutedEventHandler(this.btEnter_Click);
#line default
......@@ -144,7 +144,7 @@ namespace VIZ.Framework.Common {
case 4:
this.btCancel = ((System.Windows.Controls.Button)(target));
#line 29 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 54 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
this.btCancel.Click += new System.Windows.RoutedEventHandler(this.btCancel_Click);
#line default
......
#pragma checksum "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C5F8149A98A63FEF332DDFD271180446C610072CF7D32D8C1DF5C1640DA1B491"
#pragma checksum "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F227736DDC518103DBD89754DA826257F6F28B18E52F44B6DDB8744F773C0293"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -67,7 +67,7 @@ namespace VIZ.Framework.Common {
#line hidden
#line 19 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 25 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btReset;
......@@ -75,7 +75,7 @@ namespace VIZ.Framework.Common {
#line hidden
#line 27 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 43 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btEnter;
......@@ -83,7 +83,7 @@ namespace VIZ.Framework.Common {
#line hidden
#line 29 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 50 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btCancel;
......@@ -126,7 +126,7 @@ namespace VIZ.Framework.Common {
case 2:
this.btReset = ((System.Windows.Controls.Button)(target));
#line 19 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 31 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
this.btReset.Click += new System.Windows.RoutedEventHandler(this.btReset_Click);
#line default
......@@ -135,7 +135,7 @@ namespace VIZ.Framework.Common {
case 3:
this.btEnter = ((System.Windows.Controls.Button)(target));
#line 27 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 47 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
this.btEnter.Click += new System.Windows.RoutedEventHandler(this.btEnter_Click);
#line default
......@@ -144,7 +144,7 @@ namespace VIZ.Framework.Common {
case 4:
this.btCancel = ((System.Windows.Controls.Button)(target));
#line 29 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
#line 54 "..\..\..\..\..\Widgets\ColorPickButton\ColorPickWindow.xaml"
this.btCancel.Click += new System.Windows.RoutedEventHandler(this.btCancel_Click);
#line default
......
......@@ -66,7 +66,7 @@ namespace VIZ.Framework.Connection
{
string msg = obj == null ? string.Empty : JsonConvert.SerializeObject(obj, JSON_SERIALIZER_SETTINGS);
SendString(manager, msg, Encoding.UTF8);
//log.Info("发送UDPJosn串:"+msg);
log.Info("发送UDPJosn串:"+msg);
}
/// <summary>
......@@ -77,7 +77,7 @@ namespace VIZ.Framework.Connection
public static void SendJsonString(this UdpEndpointManager manager, string msg)
{
SendString(manager, msg, Encoding.UTF8);
//log.Info("发送UDPJosn串:" + msg);
log.Info("发送UDPJosn串:" + msg);
}
}
}
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