From d0ded5cd9bf5070a120bad58b5be21fe2ac6a4ff Mon Sep 17 00:00:00 2001
From: C3032 <C3032@BC3032>
Date: 星期六, 20 十二月 2025 16:41:09 +0800
Subject: [PATCH] test
---
IDViewer_2D/DownloadData.xaml | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 216 insertions(+), 0 deletions(-)
diff --git a/IDViewer_2D/DownloadData.xaml b/IDViewer_2D/DownloadData.xaml
new file mode 100644
index 0000000..3e3e675
--- /dev/null
+++ b/IDViewer_2D/DownloadData.xaml
@@ -0,0 +1,216 @@
+锘�<Window x:Class="SmartScanner.DownloadData"
+ 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:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:SmartScanner"
+ xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
+ xmlns:Properties="clr-namespace:SmartScanner.Properties"
+ mc:Ignorable="d"
+ Width="490" Height="320"
+ Title="鍥惧儚璁剧疆">
+
+ <Grid Background="#3C3C3C">
+ <Grid.Resources>
+ <Style x:Key="TextBoxStyle" TargetType="TextBox">
+ <Style.Setters>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="HorizontalContentAlignment" Value="Right"/>
+ <Setter Property="Background" Value="#6C6C6C"/>
+ <Setter Property="BorderBrush" Value="#1F0000"/>
+ <Setter Property="Foreground" Value="White"/>
+ <Setter Property="BorderThickness" Value="1"/>
+ </Style.Setters>
+ </Style>
+ <Style TargetType="RadioButton" x:Key="RadioButtonStyle">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="RadioButton">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CheckStates">
+ <VisualState x:Name="Checked">
+ <Storyboard>
+ <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="contentPresenter">
+ <EasingColorKeyFrame KeyTime="0" Value="White"/>
+ </ColorAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unchecked"/>
+ <VisualState x:Name="Indeterminate"/>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ <Ellipse Width="{Binding ActualHeight, ElementName=contentPresenter}" Height="{Binding ActualHeight, ElementName=contentPresenter}" Fill="{TemplateBinding Background}"/>
+ <ContentPresenter x:Name="contentPresenter" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ <Style x:Key="BtnLabelStyle">
+ <Style.Triggers>
+ <Trigger Property="Button.IsFocused" Value="False">
+ <Setter Property="Button.Background" Value="Transparent"/>
+ <Setter Property="Button.BorderThickness" Value="0"/>
+ </Trigger>
+ <Trigger Property="Button.IsFocused" Value="True">
+ <Setter Property="Button.Background" Value="#4D0000"/>
+ <Setter Property="Button.BorderThickness" Value="0"/>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ <Style x:Key="LabelStyle">
+ <Style.Triggers>
+ <Trigger Property="Label.IsFocused" Value="False">
+ <Setter Property="Label.Background" Value="Transparent"/>
+ <Setter Property="Label.Foreground" Value="White"/>
+ </Trigger>
+ <Trigger Property="Label.IsFocused" Value="True">
+ <Setter Property="Label.Background" Value="#FFBEE6FD"/>
+ <Setter Property="Label.Foreground" Value="#4F4F4F"/>
+ </Trigger>
+ <Trigger Property="Label.IsMouseOver" Value="True">
+ <Setter Property="Label.Background" Value="#FFBEE6FD"/>
+ <Setter Property="Label.Foreground" Value="#4F4F4F"/>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ <Style x:Key="FocusVisual">
+ <Setter Property="Control.Template">
+ <Setter.Value>
+ <ControlTemplate>
+ <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ <!--鎸夐挳闈欐�佹椂鑳屾櫙棰滆壊-->
+ <SolidColorBrush x:Key="Button.Static.Background" Color="#4F4F4F"/>
+ <!--鎸夐挳闈欐�佹椂杈规棰滆壊-->
+ <SolidColorBrush x:Key="Button.Static.Border" Color="#2F0000"/>
+ <!--鎸夐挳闈欐�佹椂鏂囧瓧棰滆壊-->
+ <SolidColorBrush x:Key="Button.Static.Foreground" Color="White"/>
+ <!--榧犳爣绉诲叆鏃惰儗鏅鑹�-->
+ <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#4D0000"/>
+ <!--榧犳爣绉诲叆鏃惰竟妗嗛鑹�-->
+ <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#2F0000"/>
+ <!--榧犳爣鎸変笅鏃惰儗鏅鑹�-->
+ <SolidColorBrush x:Key="Button.Pressed.Background" Color="#4D0000"/>
+ <!--榧犳爣鎸変笅鏃惰竟妗嗛鑹�-->
+ <SolidColorBrush x:Key="Button.Pressed.Border" Color="#2F0000"/>
+ <!--鎸夐挳涓嶄娇鐢ㄦ椂鑳屾櫙棰滆壊-->
+ <SolidColorBrush x:Key="Button.Disabled.Background" Color="Gray"/>
+ <!--鎸夐挳涓嶄娇鐢ㄦ椂杈规棰滆壊-->
+ <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
+ <!--鎸夐挳涓嶄娇鐢ㄦ椂鏂囧瓧棰滆壊-->
+ <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="White"/>
+ <Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
+ <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
+ <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
+ <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
+ <Setter Property="Foreground" Value="{StaticResource Button.Static.Foreground}"/>
+ <Setter Property="BorderThickness" Value="1"/>
+ <!--杈规瀹藉害锛岃缃负0 鍗筹細鏃犺竟妗�-->
+ <Setter Property="HorizontalContentAlignment" Value="Center"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="Padding" Value="1"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Border x:Name="border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
+ <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Border>
+ <!--瑙﹀彂鍣細鏍规嵁渚濊禆灞炴�х殑鍊煎幓鎺у埗鎺т欢鐨勭姸鎬�-->
+ <ControlTemplate.Triggers>
+ <!--榛樿灞炴��-->
+ <Trigger Property="IsDefaulted" Value="true">
+ <!--<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>-->
+ <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Static.Background}"/>
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Static.Border}"/>
+ <Setter Property="TextElement.Foreground" TargetName="border" Value="{StaticResource Button.Static.Foreground}"/>
+ </Trigger>
+ <!--榧犳爣绉诲叆灞炴��-->
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
+ </Trigger>
+ <!--榧犳爣鎸変笅灞炴��-->
+ <Trigger Property="IsPressed" Value="true">
+ <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
+ </Trigger>
+ <!--鎸夐挳鍙敤鐘舵�佸睘鎬�-->
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
+ <!--<Setter Property="Foreground" TargetName="border" Value="{StaticResource Button.Disabled.Foreground}"/>-->
+ <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Grid.Resources>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="70"/>
+ <RowDefinition Height="160"/>
+ <RowDefinition Height="40"/>
+ </Grid.RowDefinitions>
+ <StackPanel Grid.Row="0">
+ <Label Content="璺緞閫夋嫨:" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Foreground="White" Height="35"/>
+ <StackPanel Orientation="Horizontal" Height="35">
+ <TextBox Name="SetDataSavingRoad" Text="{Binding Source={x:Static Properties:Settings.Default}, Path=DataSavingRoad, Mode=TwoWay}" Style="{StaticResource TextBoxStyle}"
+ HorizontalContentAlignment="Left" Height="30" FontSize="14" ToolTip="鏂囦欢瀛樺偍璺緞" Width="400" Margin="10,0,0,0" MouseDoubleClick="SetDataSavingRoad_MouseDoubleClick"/>
+ <Button Name="SelectFilePath" Content="娴忚鈥�" Width="50" Height="30" Click="SelectFilePath_Click" Style="{DynamicResource ButtonStyle}"/>
+ </StackPanel>
+ </StackPanel>
+ <StackPanel Grid.Row="1">
+ <StackPanel Orientation="Horizontal" Height="35">
+ <Label Content="淇濆瓨璁剧疆:" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Foreground="White" Width="100"/>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="35">
+ <CheckBox Name="ImageDeleteCheck" Content="瀹氭湡娓呭浘" IsChecked="{Binding Source={x:Static Properties:Settings.Default}, Path=ImageDeleteEnabled, Mode=TwoWay}" Unchecked="ImageDeleteCheck_Unchecked" Checked="ImageDeleteCheck_Checked" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Foreground="White" Width="130" Margin="20,0,0,0"/>
+ <toolkit:IntegerUpDown x:Name="Data_deleteImage" FormatString="N" Increment="1" Maximum="200000"
+ Value="{Binding Source={x:Static Properties:Settings.Default}, Path=DeleteImageDays, Mode=TwoWay}"
+ LostFocus="Data_deleteImage_LostFocus" Width="100" Height="25"/>
+ <Label Content="澶�" Foreground="White" VerticalAlignment="Center"/>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="35">
+ <StackPanel Orientation="Horizontal" Width="300">
+ <CheckBox Name="ImageSaveCheck" Content="鍚敤鍥惧儚淇濆瓨" IsChecked="{Binding Source={x:Static Properties:Settings.Default}, Path=ImageSaveEnabled, Mode=TwoWay}"
+ Unchecked="ImageSaveCheck_Unchecked" Checked="ImageSaveCheck_Checked"
+ HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Foreground="White" Width="130" Margin="20,0,0,0"/>
+ <Label Content="淇濆瓨鏍煎紡" Foreground="White" VerticalAlignment="Center"/>
+ <ComboBox Name="ImageFormat" SelectedIndex="{Binding Source={x:Static Properties:Settings.Default}, Path=ImageFormatSelect, Mode=TwoWay}"
+ Height="25" SelectionChanged="ImageFormat_SelectionChanged" LostFocus="ImageFormat_LostFocus">
+ <ComboBoxItem Content=".BMP"/>
+ <ComboBoxItem Content=".JPG"/>
+ <ComboBoxItem Content=".PNG"/>
+ </ComboBox>
+ </StackPanel>
+ <StackPanel x:Name="CompressionVisible" Orientation="Horizontal" Visibility="Visible">
+ <Label Content="鍘嬬缉姣旂巼" Foreground="White" VerticalAlignment="Center"/>
+ <toolkit:IntegerUpDown x:Name="ImageCompressionRatio" FormatString="N" Increment="1" Maximum="10" Minimum="0" UpdateValueOnEnterKey="True"
+ Value="{Binding Source={x:Static Properties:Settings.Default}, Path=CompressionRatio, Mode=TwoWay}"
+ Watermark="鍙栧�糩0-10]" Width="85" Height="25" LostFocus="ImageCompressionRatio_LostFocus"/>
+ </StackPanel>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Height="35">
+ <CheckBox Name="MemoryAlarmCheck" Content="瀛樺偍绌洪棿棰勮" IsChecked="{Binding Source={x:Static Properties:Settings.Default}, Path=MemoryAlarmEnabled, Mode=TwoWay}"
+ Unchecked="MemoryAlarmCheck_Unchecked" Checked="MemoryAlarmCheck_Checked" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Foreground="White" Width="130" Margin="20,0,0,0"/>
+ <toolkit:IntegerUpDown x:Name="MemoryAlarm" FormatString="N" Maximum="90" Minimum="10" UpdateValueOnEnterKey="True"
+ Value="{Binding Source={x:Static Properties:Settings.Default}, Path=MemoryAlarmSetting, Mode=TwoWay}"
+ Width="100" Height="25" LostFocus="MemoryAlarm_LostFocus"/>
+ <Label Content="%" Foreground="White" VerticalAlignment="Center"/>
+ </StackPanel>
+ </StackPanel>
+ <StackPanel Grid.Row="2">
+ <Button Content="纭畾" Width="300" Height="30" Name="Confirm_Btn" Click="Confirm_Btn_Click" Margin="5" Style="{DynamicResource ButtonStyle}"/>
+ </StackPanel>
+ </Grid>
+</Window>
--
Gitblit v1.9.3