Преглед на файлове

单选框样式优化,打印页面自适应优化。

tags/录制修改前
zhangxueyang преди 4 години
родител
ревизия
36ed5bef06

+ 1
- 1
XHWK.WKTool/App.config Целия файл

@@ -4,7 +4,7 @@
4 4
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
5 5
     </startup>
6 6
   <appSettings>
7
-    <!--0正式1测试-->
7
+    <!--0正式 1测试-->
8 8
     <add key="IsDebug" value="1"/>
9 9
     <!--图片压缩等级-->
10 10
     <add key="ImageCompressionLevel" value="30" />

+ 4
- 4
XHWK.WKTool/CreateAMicroLessonWindow.xaml Целия файл

@@ -27,21 +27,21 @@
27 27
             </Grid>
28 28
         </Border>
29 29
         <!--第二行 讲解名称-->
30
-        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,60,0,0" Grid.ColumnSpan="2">
30
+        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,60,0,1" Grid.ColumnSpan="2">
31 31
             <Label Content="*" FontSize="18" Padding="0,20,0,0" Foreground="#FF0000"/>
32 32
             <TextBlock Text="讲解名称" FontSize="18" Padding="2,15,10,0"/>
33 33
             <!--输入框-->
34 34
             <Border Background="#CDD6E0" Width="321" Height="43" CornerRadius="3">
35
-                <TextBox x:Name="txbExplainName" Text="微课1" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="319" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
35
+                <TextBox x:Name="txbExplainName" Text="微课1" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="319" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
36 36
             </Border>
37 37
         </StackPanel>
38 38
         <!--第三行 存放路径-->
39
-        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10,30,0,0" Grid.ColumnSpan="2">
39
+        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10,30,0,1" Grid.ColumnSpan="2">
40 40
             <Label Content="*" FontSize="18" Padding="0,20,0,0" Foreground="#FF0000"/>
41 41
             <TextBlock Text="存放路径" FontSize="18" Padding="2,15,10,0"/>
42 42
             <!--输入框-->
43 43
             <Border Background="#CDD6E0" Width="225" Height="43" CornerRadius="3">
44
-                <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="223" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
44
+                <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="223" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
45 45
             </Border>
46 46
             <!--浏览按钮-->
47 47
             <Button  Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">

Двоични данни
XHWK.WKTool/Images/rdo_no.png Целия файл


Двоични данни
XHWK.WKTool/Images/rdo_yes.png Целия файл


+ 3
- 3
XHWK.WKTool/LoginWindow.xaml Целия файл

@@ -33,12 +33,12 @@
33 33
         <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
34 34
             <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
35 35
             <!--输入框-->
36
-            <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
36
+            <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3" Margin="0,0,0,1">
37 37
                 <TextBox x:Name="txbAccountNumber" Text="" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
38 38
             </Border>
39 39
         </StackPanel>
40 40
         <!--第三行 密码-->
41
-        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
41
+        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,1">
42 42
             <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
43 43
             <!--输入框-->
44 44
             <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
@@ -49,7 +49,7 @@
49 49
             <Viewbox Height="23">
50 50
                 <CheckBox   x:Name="ckSaveName" Click="CkSaveName_Click"/>
51 51
             </Viewbox>
52
-            <TextBlock Text="记住账号" FontSize="18" Height="30" Padding="5,3,0,0" Margin="0,9,0,1"/>
52
+            <TextBlock Text="记住账号" FontSize="18" Height="30" Padding="5,3,0,0" Margin="0,0,0,1"/>
53 53
         </StackPanel>
54 54
 
55 55
         <!--第五行 开始按钮-->

+ 4
- 2
XHWK.WKTool/PrintWindow.xaml Целия файл

@@ -30,7 +30,8 @@
30 30
             </Setter>
31 31
         </Style>
32 32
     </Window.Resources>
33
-    <Grid>
33
+    <Viewbox>
34
+        <Grid x:Name="GridContent" Height="600" Width="900">
34 35
         <Grid.RowDefinitions>
35 36
             <RowDefinition Height="120"/>
36 37
             <RowDefinition Height="*"/>
@@ -56,7 +57,7 @@
56 57
                                 FontSize="14"
57 58
                                 SelectedValuePath="Key"
58 59
                                 />
59
-                <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0" Padding="0,5,0,0"/>
60
+                <TextBlock Text="份数:" FontSize="20" Margin="80,0,0,0" Padding="0,5,0,0" HorizontalAlignment="Right"/>
60 61
                 <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White"/>
61 62
                 <Grid>
62 63
                     <Grid.RowDefinitions>
@@ -133,4 +134,5 @@
133 134
             </Grid>
134 135
         </Views:ZJClippingBorder>
135 136
     </Grid>
137
+    </Viewbox>
136 138
 </Window>

+ 8
- 0
XHWK.WKTool/PrintWindow.xaml.cs Целия файл

@@ -42,6 +42,14 @@ namespace XHWK.WKTool
42 42
         public PrintWindow()
43 43
         {
44 44
             InitializeComponent();
45
+            double proportion = 1036.0 / 1290.0;
46
+          double  Widths = (PrimaryScreen.ScaleWorkingAreaSize.Height) / proportion - (BorderThickness.Left + BorderThickness.Right);
47
+          double  Heights = PrimaryScreen.ScaleWorkingAreaSize.Height - (BorderThickness.Top + BorderThickness.Bottom);
48
+            Width = Widths / 1.42;
49
+            Height = Heights / 1.71;
50
+            GridContent.Width = Width+5;
51
+            GridContent.Height = Height;
52
+            this.ResizeMode = ResizeMode.NoResize;
45 53
             string defa = string.Empty;
46 54
             List<string> defaList = LatticeFileHelper.GetPrinterList(out defa);
47 55
             if (defaList.Count > 0)

+ 40
- 18
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Целия файл

@@ -25,6 +25,26 @@
25 25
         </Border>
26 26
     </Grid>-->
27 27
     <Window.Resources>
28
+        <Style x:Key="radBase" TargetType="RadioButton">
29
+            <Setter Property="IsChecked" Value="False"/>
30
+            <Setter Property="Background" Value="Transparent"/>
31
+            <Setter Property="Foreground" Value="#555"/>
32
+            <Setter Property="Template">
33
+                <Setter.Value>
34
+                    <ControlTemplate TargetType="RadioButton">
35
+                        <DockPanel  Background="{TemplateBinding Background}" ToolTip="{TemplateBinding Content}" LastChildFill="False" Width="{TemplateBinding Width}">
36
+                            <Image Margin="2 0 0 0" DockPanel.Dock="Left" x:Name="_img"  Stretch="None" Source="./Images/rdo_no.png"/>
37
+                            <TextBlock DockPanel.Dock="Left" Margin="3 0 0 0" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}" />
38
+                        </DockPanel>
39
+                        <ControlTemplate.Triggers>
40
+                            <Trigger Property="IsChecked" Value="true">
41
+                                <Setter TargetName="_img" Property="Source" Value="./Images/rdo_yes.png"/>
42
+                            </Trigger>
43
+                        </ControlTemplate.Triggers>
44
+                    </ControlTemplate>
45
+                </Setter.Value>
46
+            </Setter>
47
+        </Style>
28 48
         <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
29 49
             <Setter Property="BorderThickness" Value="1"/>
30 50
             <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
@@ -378,7 +398,8 @@
378 398
             </StackPanel>
379 399
         </Grid>
380 400
         <!--设置-->
381
-        <Grid Grid.Row="1" x:Name="gridSetUp"  Background="#FFFFFF" Visibility="Collapsed" Width="1276">
401
+            <ScrollViewer x:Name="gridSetUp" Grid.Row="1" VerticalScrollBarVisibility="Auto" Visibility="Collapsed">
402
+        <Grid Grid.Row="1"   Background="#FFFFFF" >
382 403
             <Grid.RowDefinitions>
383 404
                 <RowDefinition Height="90"/>
384 405
                 <RowDefinition Height="70"/>
@@ -402,17 +423,17 @@
402 423
 
403 424
                 <TextBlock Grid.Row="1" Grid.Column="0" Text="视频格式" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right"/>
404 425
                 <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
405
-                    <RadioButton x:Name="rbnMP4" Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="0,2,0,0" IsChecked="True"/>
406
-                <RadioButton x:Name="rbnFLV" Cursor="Hand" Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
407
-                <RadioButton x:Name="rbnAVI" Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0" Visibility="Collapsed"/>
426
+                        <RadioButton x:Name="rbnMP4"  Cursor="Hand" Style="{StaticResource radBase}" Content=" MP4" FontSize="14" Foreground="#333333" VerticalAlignment="Top" IsChecked="True"/>
427
+                        <RadioButton x:Name="rbnFLV" Cursor="Hand" Style="{StaticResource radBase}" Content=" FLV" FontSize="14" Foreground="#333333"  VerticalAlignment="Top" Margin="20,0,0,0"/>
428
+                        <RadioButton x:Name="rbnAVI" Cursor="Hand" Style="{StaticResource radBase}" Content=" AVI" FontSize="14" Foreground="#333333" Margin="20,-26,0,0" Visibility="Collapsed"/>
408 429
             </StackPanel>
409 430
 
410 431
                 <TextBlock Grid.Row="2" Grid.Column="0" Text="摄像头位置" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right"/>
411 432
                 <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
412
-                    <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="0,2,0,0" IsChecked="True"/>
413
-                <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
414
-                <RadioButton Cursor="Hand" x:Name="rbnLeft" Content="左上" FontSize="14" Foreground="#333333" Margin="20,2,0,0" />
415
-                <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
433
+                        <RadioButton Cursor="Hand" x:Name="rbnRight" Style="{StaticResource radBase}" Content=" 右上" FontSize="14" Foreground="#333333"  VerticalAlignment="Top" Margin="0,0,0,0" IsChecked="True"/>
434
+                        <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Style="{StaticResource radBase}" Content=" 右下" FontSize="14" Foreground="#333333"  VerticalAlignment="Top" Margin="20,0,0,0"/>
435
+                        <RadioButton Cursor="Hand" x:Name="rbnLeft" Style="{StaticResource radBase}" Content=" 左上" FontSize="14" Foreground="#333333"  VerticalAlignment="Top" Margin="20,0,0,0" />
436
+                        <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Style="{StaticResource radBase}" Content=" 左下" FontSize="14" Foreground="#333333"  VerticalAlignment="Top" Margin="20,0,0,0"/>
416 437
             </StackPanel>
417 438
             <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0" Visibility="Collapsed">
418 439
                 <TextBlock Text="视频声音" FontSize="16" Foreground="#2D8CF0" Width="80"/>
@@ -481,7 +502,7 @@
481 502
                     <TextBlock  FontSize="14" Foreground="#333333" Text="开始/暂停:Ctrl+F5     停止:Ctrl+S     退出讲评:鼠标右键" Margin="30,30,0,0"/>
482 503
                 </StackPanel>
483 504
                 <!--第四行 开始按钮-->
484
-            <Button Cursor="Hand" Grid.Row="10" Grid.ColumnSpan="2" x:Name="btnSave" Content="保存" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="115" Height="45" Margin="10,0,10,0" Click="BtnSave_Click">
505
+            <Button Cursor="Hand" Grid.Row="10" Grid.ColumnSpan="2" x:Name="btnSave" Content="保存" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="115" Height="45" Margin="10,10,10,10" Click="BtnSave_Click">
485 506
                 <Button.Template>
486 507
                     <ControlTemplate TargetType="{x:Type Button}">
487 508
                         <Border
@@ -498,7 +519,8 @@
498 519
                 </Button.Template>
499 520
             </Button>
500 521
         </Grid>
501
-        <!--上传-->
522
+            </ScrollViewer>
523
+            <!--上传-->
502 524
         <Grid Grid.Row="1" x:Name="gridUpload" Visibility="Hidden">
503 525
             <Border Background="#EFF1F8">
504 526
                 <Grid Background="#FFFFFF" Margin="0,0,0,0">
@@ -601,7 +623,7 @@
601 623
             </Border>
602 624
         </Grid>
603 625
         <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
604
-            <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
626
+            <StackPanel Orientation="Horizontal" Margin="0,5,0,5">
605 627
                 <TextBlock Text="颜色:" FontSize="14" Padding="10,5,0,0"/>
606 628
                 <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
607 629
 
@@ -638,16 +660,16 @@
638 660
                 </Button>
639 661
                     </Border>
640 662
                     <TextBlock Text="粗细:" FontSize="14" Padding="15,0,0,0" Margin="5,5,0,0"/>
641
-                    <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,7,0,0" IsChecked="True" Click="RbnFine_Click"/>
642
-                <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,7,0,0" Click="RbnIn_Click"/>
643
-                <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,7,0,0" Click="RbnCrude_Click"/>
663
+                    <RadioButton Cursor="Hand" x:Name="rbnFine" Content=" 细" Style="{StaticResource radBase}" FontSize="14" Margin="0,4,0,0" IsChecked="True" Click="RbnFine_Click"/>
664
+                    <RadioButton Cursor="Hand" x:Name="rbnIn" Content=" 中" Style="{StaticResource radBase}" FontSize="14" Margin="5,4,0,0" Click="RbnIn_Click"/>
665
+                    <RadioButton Cursor="Hand" x:Name="rbnCrude" Content=" 粗" Style="{StaticResource radBase}" FontSize="14" Margin="5,4,0,0" Click="RbnCrude_Click"/>
644 666
                 <StackPanel Orientation="Horizontal">
645
-                    <TextBlock Text="摄像头:" FontSize="14" Padding="15,6,0,0"/>
646
-                    <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,7,0,0" Click="RbnOpen_Click"/>
647
-                    <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,7,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
667
+                    <TextBlock Text="摄像头:" FontSize="14" Padding="20,6,0,0"/>
668
+                        <RadioButton Cursor="Hand" x:Name="rbnOpen" Content=" 开" Style="{StaticResource radBase}" FontSize="14" Margin="0,4,0,0" Click="RbnOpen_Click"/>
669
+                        <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content=" 关" Style="{StaticResource radBase}" FontSize="14" Margin="5,4,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
648 670
                 </StackPanel>
649 671
             </StackPanel>
650
-            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
672
+            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,10,5">
651 673
                 <TextBlock Text="智能笔状态:" FontSize="14" Padding="0,4,0,0"/>
652 674
                 <TextBlock x:Name="txbNotConnected" Text="未连接" FontSize="14" Padding="0,4,5,0"/>
653 675
             </StackPanel>

+ 4
- 0
XHWK.WKTool/XHWK.WKTool.csproj Целия файл

@@ -1595,5 +1595,9 @@
1595 1595
   <ItemGroup>
1596 1596
     <Resource Include="Images\rollCall_1.png" />
1597 1597
   </ItemGroup>
1598
+  <ItemGroup>
1599
+    <Resource Include="Images\rdo_no.png" />
1600
+    <Resource Include="Images\rdo_yes.png" />
1601
+  </ItemGroup>
1598 1602
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1599 1603
 </Project>

Loading…
Отказ
Запис