Shunnet 2 vuotta sitten
vanhempi
commit
67182b6946

+ 1 - 1
src/YSAI.DAQ/YSAI.Controls/hamburgermenu/HamburgerMenuItem.xaml

@@ -30,7 +30,7 @@
                                             <ColumnDefinition/>
                                         </Grid.ColumnDefinitions>
                                         <Grid Grid.Column="1">
-                                            <TextBlock Text="{TemplateBinding Text}" Margin="5,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="15" Foreground="{TemplateBinding Foreground}" TextWrapping="Wrap"/>
+                                            <TextBlock Text="{TemplateBinding Text}" Margin="5,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Center"  FontSize="{DynamicResource AllContentFontSize}" Foreground="{TemplateBinding Foreground}" TextWrapping="Wrap"/>
                                         </Grid>
                                         <Grid Grid.Column="0">
                                             <Image Source="{TemplateBinding Icon}" Margin="15,10,10,10" Height="20"/>

+ 1 - 1
src/YSAI.DAQ/YSAI.Manage.Windows/MainWindow.xaml

@@ -8,7 +8,7 @@
         xmlns:hm="clr-namespace:YSAI.Controls.hamburgermenu;assembly=YSAI.Controls"
         xmlns:tc="clr-namespace:YSAI.Controls.transition;assembly=YSAI.Controls"
         Icon="YSAI_One.ico" 
-        FontFamily="{DynamicResource AllFontFamily}" WindowStartupLocation="CenterScreen" IsContentBackgroundPicture="True"
+        FontFamily="{DynamicResource AllFontFamily}" WindowStartupLocation="CenterScreen" IsContentBackgroundPicture="True" ResizeMode="CanResize"
         Title="采集库调试工具">
     <Window.DataContext>
         <local:MainWindowController/>

+ 1 - 1
src/YSAI.DAQ/YSAI.Manage.Windows/MainWindowController.cs

@@ -47,7 +47,7 @@ namespace YSAI.Manage.Windows
         /// </summary>
         private void WindowHelper_OnSkinSwitchEvent(object? sender, object e)
         {
-
+            
         }
 
 

+ 2 - 2
src/YSAI.DAQ/YSAI.Resources/style/Style_Button.xaml

@@ -57,7 +57,7 @@
         <Setter Property="VerticalAlignment" Value="Center"/>
     </Style>
     <Style x:Key="ButtonTextBlockStyle" TargetType="{x:Type TextBlock}">
-        <Setter Property="FontSize" Value="13"/>
+        <Setter Property="FontSize" Value="{DynamicResource AllContentFontSize}"/>
         <Setter Property="VerticalAlignment" Value="Center"/>
         <Setter Property="HorizontalAlignment" Value="Center"/>
         <Setter Property="Width" Value="auto"/>
@@ -124,7 +124,7 @@
         <Setter Property="Background" Value="White"/>
         <Setter Property="BorderBrush" Value="{DynamicResource Control.Border.Color}"/>
         <Setter Property="BorderThickness" Value="0,0,0,1"></Setter>
-        <Setter Property="FontSize" Value="13"/>
+        <Setter Property="FontSize" Value="{DynamicResource AllContentFontSize}"/>
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">

+ 8 - 1
src/YSAI.DAQ/YSAI.Tool.Windows/YSAI.Tool.Windows.csproj

@@ -6,13 +6,20 @@
     <UseWPF>true</UseWPF>
   </PropertyGroup>
 
+  <ItemGroup>
+    <Compile Remove="config\**" />
+    <EmbeddedResource Remove="config\**" />
+    <None Remove="config\**" />
+    <Page Remove="config\**" />
+  </ItemGroup>
+
   <ItemGroup>
     <ProjectReference Include="..\YSAI.Controls\YSAI.Controls.csproj" />
     <ProjectReference Include="..\YSAI.WindowMessage\YSAI.WindowMessage.csproj" />
   </ItemGroup>
 
   <ItemGroup>
-    <Folder Include="config\" />
+    <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1988-prerelease" />
   </ItemGroup>
 
 </Project>

+ 5 - 4
src/YSAI.DAQ/YSAI.Tool.Windows/aboutUs/AboutUsTool.xaml

@@ -1,10 +1,11 @@
 <UserControl x:Class="YSAI.Tool.Windows.aboutUs.AboutUsTool"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:YSAI.Tool.Windows.aboutUs" Height="500" Width="1500">
-    <Grid>
-        <WebBrowser Source="http://www.yuanshan-ai.com/list/45.html" Height="auto" Width="auto" />
-    </Grid>
+             xmlns:local="clr-namespace:YSAI.Tool.Windows.aboutUs">
+    <DockPanel>
+        <wv2:WebView2 Source="http://www.yuanshan-ai.com/list/45.html"/>
+    </DockPanel>
 </UserControl>

+ 3 - 0
src/YSAI.DAQ/YSAI.Window/Themes/Property/Black.xaml

@@ -119,6 +119,9 @@
     <Thickness x:Key="VerCodeMargin"  Left="-13" Top="-1" Right="0" Bottom="0" />
     <!--版本图标位置偏移-->
     <Thickness x:Key="VerImageMargin"  Left="4" Top="4" Right="0" Bottom="4" />
+    <!--所有内容的字体大小-->
+    <sys:Double x:Key="AllContentFontSize">13</sys:Double>
+
 
     <!--顶部的圆角控制-->
     <CornerRadius x:Key="TopCornerRadius"  TopLeft="5" TopRight="5" BottomLeft="0" BottomRight="0"/>

+ 4 - 1
src/YSAI.DAQ/YSAI.Window/Themes/Property/Blue.xaml

@@ -119,7 +119,10 @@
     <Thickness x:Key="VerCodeMargin"  Left="-13" Top="-1" Right="0" Bottom="0" />
     <!--版本图标位置偏移-->
     <Thickness x:Key="VerImageMargin"  Left="4" Top="4" Right="0" Bottom="4" />
-    
+    <!--所有内容的字体大小-->
+    <sys:Double x:Key="AllContentFontSize">13</sys:Double>
+
+
     <!--顶部的圆角控制-->
     <CornerRadius x:Key="TopCornerRadius"  TopLeft="5" TopRight="5" BottomLeft="0" BottomRight="0"/>
     <!--底部的圆角控制-->

+ 3 - 0
src/YSAI.DAQ/YSAI.Window/Themes/Property/Cyan.xaml

@@ -119,6 +119,9 @@
     <Thickness x:Key="VerCodeMargin"  Left="-13" Top="-1" Right="0" Bottom="0" />
     <!--版本图标位置偏移-->
     <Thickness x:Key="VerImageMargin"  Left="4" Top="4" Right="0" Bottom="4" />
+    <!--所有内容的字体大小-->
+    <sys:Double x:Key="AllContentFontSize">13</sys:Double>
+
 
     <!--顶部的圆角控制-->
     <CornerRadius x:Key="TopCornerRadius"  TopLeft="5" TopRight="5" BottomLeft="0" BottomRight="0"/>

+ 3 - 0
src/YSAI.DAQ/YSAI.Window/Themes/Property/White.xaml

@@ -119,6 +119,9 @@
     <Thickness x:Key="VerCodeMargin"  Left="-13" Top="-1" Right="0" Bottom="0" />
     <!--版本图标位置偏移-->
     <Thickness x:Key="VerImageMargin"  Left="4" Top="4" Right="0" Bottom="4" />
+    <!--所有内容的字体大小-->
+    <sys:Double x:Key="AllContentFontSize">13</sys:Double>
+
 
     <!--顶部的圆角控制-->
     <CornerRadius x:Key="TopCornerRadius"  TopLeft="5" TopRight="5" BottomLeft="0" BottomRight="0"/>

+ 0 - 35
src/YSAI.DAQ/YSAI.Window/Themes/Style/ResizeGripStyle.xaml

@@ -1,35 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <!--调整控制方式-->
-    <Style TargetType="{x:Type ResizeGrip}" x:Key="ResizeGripStyle">
-        <Setter Property="IsTabStop" Value="False"/>
-        <Setter Property="Margin" Value="0,0,4,4"/>
-        <Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
-        <Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
-        <Setter Property="MaxWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
-        <Setter Property="MaxHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
-        <Setter Property="Control.Template">
-            <Setter.Value>
-                <ControlTemplate TargetType="{x:Type ResizeGrip}">
-                    <Grid
-             Background="{TemplateBinding Panel.Background}"
-             SnapsToDevicePixels="True">
-                        <Path
-               Margin="0,0,2,2"
-               Data="M8,0L10,0 10,2 8,2z M4,4L6,4 6,6 4,6z M8,4L10,4 10,6 8,6z M0,8L2,8 2,10 0,10z M4,8L6,8 6,10 4,10z M8,8L10,8 10,10 8,10z"
-               HorizontalAlignment="Right"
-               Fill="#B1C9E8"
-               VerticalAlignment="Bottom"/>
-                        <Path
-               Margin="0,0,3,3"
-               Data="M8,0L10,0 10,2 8,2z M4,4L6,4 6,6 4,6z M8,4L10,4 10,6 8,6z M0,8L2,8 2,10 0,10z M4,8L6,8 6,10 4,10z M8,8L10,8 10,10 8,10z"
-               HorizontalAlignment="Right"
-               Fill="#455D80"
-               VerticalAlignment="Bottom"/>
-                    </Grid>
-                </ControlTemplate>
-            </Setter.Value>
-        </Setter>
-    </Style>
-
-</ResourceDictionary>

+ 0 - 25
src/YSAI.DAQ/YSAI.Window/Themes/Style/ThumbStyle.xaml

@@ -1,25 +0,0 @@
-<ResourceDictionary 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"
-                    mc:Ignorable="d">
-    <!--Simple Simple SliderThumb - Thumb 是 Slider 的可拖动部分-->
-    <Style x:Key="SimpleSliderThumb" d:IsControlPart="True" TargetType="{x:Type Thumb}">
-        <Setter Property="SnapsToDevicePixels" Value="true"/>
-        <Setter Property="Height" Value="14"/>
-        <Setter Property="Width" Value="14"/>
-        <Setter Property="Template">
-            <Setter.Value>
-                <ControlTemplate TargetType="{x:Type Thumb}">
-                    <Grid>
-                        <Rectangle StrokeThickness="0" Fill="#00000000"/>
-                    </Grid>
-                    <ControlTemplate.Triggers>
-                        <Trigger Property="IsMouseOver" Value="True"/>
-                        <Trigger Property="IsEnabled" Value="false"/>
-                    </ControlTemplate.Triggers>
-                </ControlTemplate>
-            </Setter.Value>
-        </Setter>
-    </Style>
-</ResourceDictionary>

+ 9 - 12
src/YSAI.DAQ/YSAI.Window/Themes/Style/WindowStyle.xaml

@@ -7,14 +7,14 @@
     <Style x:Key="StyleBase" TargetType="{x:Type sv:WindowBase}"  BasedOn="{StaticResource {x:Type Window}}">
         <Setter Property="Window.WindowStyle" Value="None"/>
         <Setter Property="AllowsTransparency" Value="True"/>
-        <Setter Property="MinHeight" Value="200"/>
-        <Setter Property="MinWidth" Value="200"/>
-        <Setter Property="IsTabStop" Value="False" />
+        <Setter Property="MinHeight" Value="300"/>
+        <Setter Property="MinWidth" Value="300"/>
+        <!--解决字体模糊-->
         <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
         <Setter Property="FontFamily" Value="{DynamicResource AllFontFamily}"/>
         <Setter Property="WindowChrome.WindowChrome">
             <Setter.Value>
-                <WindowChrome CornerRadius="{DynamicResource WindowCornerRadius}" CaptionHeight="{DynamicResource TitleHeight}" GlassFrameThickness="0" ResizeBorderThickness="10"  UseAeroCaptionButtons="False" NonClientFrameEdges="None"/>
+                <WindowChrome CornerRadius="{DynamicResource WindowCornerRadius}" CaptionHeight="{DynamicResource TitleHeight}" GlassFrameThickness="10" ResizeBorderThickness="10"  UseAeroCaptionButtons="False" NonClientFrameEdges="None"/>
             </Setter.Value>
         </Setter>
         <Setter Property="Template">
@@ -32,7 +32,7 @@
                                 <RowDefinition Height="auto"/>
                             </Grid.RowDefinitions>
                             <!--标题-->
-                            <Border  Height="{DynamicResource TitleHeight}" Name="PART_Caption" Grid.Row="0" CornerRadius="{DynamicResource TopCornerRadius}" Background="{DynamicResource CaptionActiveBackgroundBrush}">
+                            <Border Height="{DynamicResource TitleHeight}" Name="PART_Caption" Grid.Row="0" CornerRadius="{DynamicResource TopCornerRadius}" Background="{DynamicResource CaptionActiveBackgroundBrush}">
                                 <Border.Effect>
                                     <DropShadowEffect BlurRadius="{DynamicResource Title.DropShadowEffect.BlurRadius}" ShadowDepth="{DynamicResource Title.DropShadowEffect.ShadowDepth}" Opacity="{DynamicResource Title.DropShadowEffect.Opacity}" />
                                 </Border.Effect>
@@ -88,18 +88,15 @@
                                         </StackPanel>
                                     </Button>
                                     <!--窗体移动工具-->
-                                    <Border Name="WindowMoveGripper" CornerRadius="{DynamicResource TopCornerRadius}" Grid.Column="0" Grid.ColumnSpan="2"  Margin="3,3,0,0">
+                                    <Border Name="WindowMoveGripper" CornerRadius="{DynamicResource TopCornerRadius}" Grid.Column="0" Grid.ColumnSpan="2"  Margin="3,3,0,0" >
                                         <Rectangle  IsHitTestVisible="False" Focusable="False" Fill="Transparent"/>
                                     </Border>
                                 </Grid>
                             </Border>
                             <!--内容-->
-                            <AdornerDecorator KeyboardNavigation.IsTabStop="False"  Grid.Row="1">
-                                <Border Name="PART_ClientArea">
-                                    <ContentPresenter KeyboardNavigation.TabNavigation="Cycle" Content="{TemplateBinding Content}" />
-                                </Border>
-                            </AdornerDecorator>
-
+                            <Border Name="PART_ClientArea" Grid.Row="1">
+                                <ContentPresenter KeyboardNavigation.TabNavigation="Cycle" Content="{TemplateBinding Content}" />
+                            </Border>
                             <!--版本-->
                             <Border Grid.Row="2" Height="{DynamicResource VerHeight}" VerticalAlignment="Bottom" CornerRadius="{DynamicResource DownCornerRadius}"   Background="{DynamicResource VerBackgroundBrush}" Name="PART_Ver">
                                 <Border.Effect>

+ 0 - 2
src/YSAI.DAQ/YSAI.Window/Themes/WindowTemplate_Black.xaml

@@ -5,8 +5,6 @@
         <ResourceDictionary Source="pack://application:,,,/YSAI.Resources;component/svg/WindowSvg.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Property/Black.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ButtonStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ResizeGripStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ThumbStyle.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/WindowStyle.xaml"/>
     </ResourceDictionary.MergedDictionaries>
     <Style x:Key="{x:Type sv:WindowBase}" TargetType="{x:Type sv:WindowBase}" BasedOn="{StaticResource StyleBase}"/>

+ 0 - 2
src/YSAI.DAQ/YSAI.Window/Themes/WindowTemplate_Blue.xaml

@@ -5,8 +5,6 @@
         <ResourceDictionary Source="pack://application:,,,/YSAI.Resources;component/svg/WindowSvg.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Property/Blue.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ButtonStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ResizeGripStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ThumbStyle.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/WindowStyle.xaml"/>
     </ResourceDictionary.MergedDictionaries>
     <Style x:Key="{x:Type sv:WindowBase}" TargetType="{x:Type sv:WindowBase}" BasedOn="{StaticResource StyleBase}"/>

+ 0 - 2
src/YSAI.DAQ/YSAI.Window/Themes/WindowTemplate_Cyan.xaml

@@ -5,8 +5,6 @@
         <ResourceDictionary Source="pack://application:,,,/YSAI.Resources;component/svg/WindowSvg.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Property/Cyan.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ButtonStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ResizeGripStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ThumbStyle.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/WindowStyle.xaml"/>
     </ResourceDictionary.MergedDictionaries>
     <Style x:Key="{x:Type sv:WindowBase}" TargetType="{x:Type sv:WindowBase}" BasedOn="{StaticResource StyleBase}"/>

+ 0 - 2
src/YSAI.DAQ/YSAI.Window/Themes/WindowTemplate_White.xaml

@@ -5,8 +5,6 @@
         <ResourceDictionary Source="pack://application:,,,/YSAI.Resources;component/svg/WindowSvg.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Property/White.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ButtonStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ResizeGripStyle.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/ThumbStyle.xaml"/>
         <ResourceDictionary Source="pack://application:,,,/YSAI.Window;component/Themes/Style/WindowStyle.xaml"/>
     </ResourceDictionary.MergedDictionaries>
     <Style x:Key="{x:Type sv:WindowBase}" TargetType="{x:Type sv:WindowBase}" BasedOn="{StaticResource StyleBase}"/>

+ 1 - 1
src/YSAI.DAQ/YSAI.WindowMessage/Window.xaml

@@ -26,7 +26,7 @@
                 <ColumnDefinition Width="auto"/>
             </Grid.ColumnDefinitions>
             <Image Grid.Column="0" Source="{Binding IconImage}" Width="32" VerticalAlignment="{Binding ImageVerticalAlignment}"/>
-            <Label Grid.Column="1" VerticalContentAlignment="Center"  FontSize="13"  HorizontalContentAlignment="Center" Content="{Binding Content_Info}" Name="ContentControl" Foreground="{DynamicResource Font.Content.Foreground}"/>
+            <Label Grid.Column="1" VerticalContentAlignment="Center"  FontSize="{DynamicResource AllContentFontSize}" HorizontalContentAlignment="Center" Content="{Binding Content_Info}" Name="ContentControl" Foreground="{DynamicResource Font.Content.Foreground}"/>
         </Grid>
         <Border Grid.Row="2" BorderThickness="0,1,0,0"  Height="45" CornerRadius="{DynamicResource DownCornerRadius}" VerticalAlignment="Bottom"  Background="{DynamicResource VerBackgroundBrush}">
             <Border.Effect>