Bladeren bron

BUG修改

tags/录制修改前
zhangxueyang 4 jaren geleden
bovenliggende
commit
a5a32634bf

+ 5
- 1
Common/system/CameraHelper.cs Bestand weergeven

@@ -115,8 +115,12 @@ namespace Common.system
115 115
                     }
116 116
 
117 117
                     string fullPath = Path.Combine(filePath, fileName + "-cap.jpg");
118
-                    bitmap.Save(fullPath, ImageFormat.Jpeg);
118
+
119
+                    System.Drawing.Bitmap objNewPic = new System.Drawing.Bitmap(bitmap, 172, 124);//图片保存的大小尺寸  
120
+                    objNewPic.Save(fullPath, ImageFormat.Jpeg);
121
+                    //bitmap.Save(fullPath, ImageFormat.Jpeg);
119 122
                     bitmap.Dispose();
123
+                    objNewPic.Dispose();
120 124
                     return fullPath;
121 125
                 }
122 126
                 return null;

+ 1
- 1
XHWK.WKTool/CountdownWindow.xaml Bestand weergeven

@@ -23,6 +23,6 @@
23 23
                     Width="600"
24 24
                     Height="600"
25 25
                     Source=".\Images\countdown3_1.png" />
26
-        <Label x:Name="lblShortcut" Content="开始/暂停:Ctrl+F5     停止:Ctrl+S" Height="77" Margin="0,750,0,0" Width="682" Foreground="#FF5B5151" FontSize="36" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
26
+        <Label x:Name="lblShortcut" Content="开始/暂停:Ctrl+F5     停止:Ctrl+S" Height="77" Margin="0,750,0,0" Width="682" Foreground="#FF5B5151" FontSize="36" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Visibility="Collapsed"/>
27 27
     </Grid>
28 28
 </Window>

+ 3
- 3
XHWK.WKTool/MessageWindow.xaml Bestand weergeven

@@ -25,11 +25,11 @@
25 25
             <TextBlock x:Name="tbkContent" Margin="20,5,20,0" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="15" Foreground="#FF919191" Grid.Row="1" HorizontalAlignment="Center" Text=""/>
26 26
         </Grid>
27 27
         <Grid Grid.Row="2" Margin="0,0,0,0">
28
-            <Border x:Name="borOk" Background="#EE3A52" CornerRadius="6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,30,20">
29
-                <Button x:Name="BtnOK" Width="104" Height="42" Content="确定" FontSize="18"  Background="#00000000"  BorderBrush="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Foreground="White"  Cursor="Hand" Click="BtnOK_Click"/>
28
+            <Border x:Name="borOk" Background="#2D8CF0" CornerRadius="6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,30,20">
29
+                <Button x:Name="BtnOK" Width="104" Height="42" Content="确定" FontSize="17"  Background="#00000000"  BorderBrush="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Foreground="White"  Cursor="Hand" Click="BtnOK_Click"/>
30 30
             </Border>
31 31
             <Border x:Name="borCancel" Background="#E5E5E5" CornerRadius="6"  HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,150,20">
32
-                <Button x:Name="BtnCancel" Width="104" Height="42" Content="取消" FontSize="18" Background="#00000000" BorderBrush="{x:Null}"  Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"  Cursor="Hand" Click="BtnCancel_Click"/>
32
+                <Button x:Name="BtnCancel" Width="104" Height="42" Content="取消" FontSize="17" Background="#00000000" BorderBrush="{x:Null}"  Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"  Cursor="Hand" Click="BtnCancel_Click"/>
33 33
             </Border>
34 34
         </Grid>
35 35
 

+ 27
- 13
XHWK.WKTool/PrintWindow.xaml Bestand weergeven

@@ -12,6 +12,24 @@
12 12
     <Window.Effect>
13 13
         <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14 14
     </Window.Effect>
15
+    <Window.Resources>
16
+        <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
17
+            <Setter Property="BorderThickness" Value="1"/>
18
+            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
19
+            <Setter Property="HorizontalContentAlignment" Value="Center"/>
20
+            <Setter Property="VerticalContentAlignment" Value="Center"/>
21
+            <Setter Property="Padding" Value="1"/>
22
+            <Setter Property="Template">
23
+                <Setter.Value>
24
+                    <ControlTemplate TargetType="{x:Type Button}">
25
+                        <Border x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
26
+                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
27
+                        </Border>
28
+                    </ControlTemplate>
29
+                </Setter.Value>
30
+            </Setter>
31
+        </Style>
32
+    </Window.Resources>
15 33
     <Grid>
16 34
         <Grid.RowDefinitions>
17 35
             <RowDefinition Height="120"/>
@@ -20,37 +38,33 @@
20 38
         </Grid.RowDefinitions>
21 39
         <Grid Grid.Row="0" Background="#E6EAF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
22 40
             <Grid.RowDefinitions>
23
-                <RowDefinition Height="auto"/>
41
+                <RowDefinition Height="50"/>
42
+                <RowDefinition Height="50"/>
24 43
                 <RowDefinition Height="*"/>
25
-                <RowDefinition Height="70"/>
26 44
             </Grid.RowDefinitions>
27
-            <!--<TextBlock Grid.Row="0" Text="打印预览" Background="#2E8CF0" Foreground="#FFFFFF" Width="50" HorizontalAlignment="Left" Margin="10,5,0,0"/>-->
28
-            <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,10,0,0">
29
-                <TextBlock  Text="打印机:" Width="210" FontSize="20"/>
30
-            </StackPanel>
31
-
32
-            <Button Grid.Row="2" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,20,0" Click="BtnClose_Click">
45
+            <Button Cursor="Hand" Grid.Row="0" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,10,0" Click="BtnClose_Click" Style="{StaticResource NoMouseOverButtonStyle}">
33 46
 
34 47
             </Button>
35
-            <StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0" Height="40">
48
+            <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0" Height="40">
49
+                <TextBlock  Text="打印机:"  FontSize="20" Padding="0,5,0,0"/>
36 50
                 <ComboBox Cursor="Hand" Width="210"
37 51
                                 x:Name="cmbClass"
38
-                                Padding="10,0,10,0"
52
+                                Padding="30,0,10,0"
39 53
                                 VerticalContentAlignment="Center"
40 54
                                 BorderThickness="0"
41 55
                                 DisplayMemberPath="Value"
42 56
                                 FontSize="14"
43 57
                                 SelectedValuePath="Key"
44 58
                                 />
45
-                <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0" Padding="0,10,0,0"/>
59
+                <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0" Padding="0,5,0,0"/>
46 60
                 <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White"/>
47 61
                 <Grid>
48 62
                     <Grid.RowDefinitions>
49 63
                         <RowDefinition Height="auto"/>
50 64
                         <RowDefinition Height="auto"/>
51 65
                     </Grid.RowDefinitions>
52
-                    <Button Grid.Row="0" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
53
-                    <Button Grid.Row="1" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
66
+                    <Button Cursor="Hand" Grid.Row="0" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
67
+                    <Button Cursor="Hand" Grid.Row="1" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
54 68
                 </Grid>
55 69
                 <!--<TextBlock Text="点型:" FontSize="20"  Margin="120,10,0,0"/>
56 70
                 <RadioButton x:Name="rbnSquarePoint" Content="方点" FontSize="16"  Margin="0,15,0,0" IsChecked="True"/>

+ 3
- 3
XHWK.WKTool/PrintWindow.xaml.cs Bestand weergeven

@@ -95,16 +95,16 @@ namespace XHWK.WKTool
95 95
                 //}
96 96
                 if (printResult == 0)// 0为成功
97 97
                 {
98
-                    MessageWindow.Show("打印成功", "", MessageBoxButton.OKCancel);
98
+                    MessageWindow.Show("打印成功");
99 99
                 }
100 100
                 else
101 101
                 {
102
-                    MessageWindow.Show(standardError, "", MessageBoxButton.OKCancel);
102
+                    MessageWindow.Show(standardError);
103 103
                 }
104 104
             }
105 105
             else
106 106
             {
107
-                MessageWindow.Show(msg, "", MessageBoxButton.OKCancel);
107
+                MessageWindow.Show(msg);
108 108
             }
109 109
         }
110 110
         /// <summary>

+ 24
- 6
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs Bestand weergeven

@@ -341,8 +341,8 @@ namespace XHWK.WKTool
341 341
                 btnBlackPenOne.IsEnabled = true;//蓝笔可点击
342 342
                 imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar28.png"));
343 343
                 btnBlackPenTwo.IsEnabled = true;//红笔可点击
344
-                imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
345
-                btnReturn.IsEnabled = false;//返回主界面不可点击
344
+                imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar29.png"));
345
+                btnReturn.IsEnabled = true;//返回主界面可点击
346 346
                 txbTime.Visibility = Visibility.Visible;//时间显示
347 347
                 try
348 348
                 {
@@ -378,6 +378,8 @@ namespace XHWK.WKTool
378 378
                 imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
379 379
                 btnBlackPenTwo.IsEnabled = false;//红笔不可点击
380 380
                 txbTime.Visibility = Visibility.Hidden;//时间不显示
381
+                imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
382
+                btnReturn.IsEnabled = false;//返回主界面可点击
381 383
                 #region 2秒内不可点击
382 384
                 new Thread(new ThreadStart(new Action(() =>
383 385
                 {
@@ -876,12 +878,28 @@ namespace XHWK.WKTool
876 878
         /// <param name="e"></param>
877 879
         private void BtnReturn_Click(object sender, RoutedEventArgs e)
878 880
         {
879
-            if (APP.W_XHMicroLessonSystemWindow == null)
881
+            if (!txbTime.Text.Equals("00:00"))
880 882
             {
881
-                APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
883
+                MessageBoxResult dr = MessageWindow.Show("返回主界面视频不保存,是否返回?", "提示", MessageBoxButton.YesNo);
884
+                if (dr == MessageBoxResult.OK)
885
+                {
886
+                    if (APP.W_XHMicroLessonSystemWindow == null)
887
+                    {
888
+                        APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
889
+                    }
890
+                    APP.W_XHMicroLessonSystemWindow.Show();
891
+                    Hide();
892
+                }
893
+            }
894
+            else
895
+            {
896
+                if (APP.W_XHMicroLessonSystemWindow == null)
897
+                {
898
+                    APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
899
+                }
900
+                APP.W_XHMicroLessonSystemWindow.Show();
901
+                Hide();
882 902
             }
883
-            APP.W_XHMicroLessonSystemWindow.Show();
884
-            Hide();
885 903
         }
886 904
     }
887 905
 }

+ 102
- 57
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Bestand weergeven

@@ -25,6 +25,22 @@
25 25
         </Border>
26 26
     </Grid>-->
27 27
     <Window.Resources>
28
+        <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
29
+            <Setter Property="BorderThickness" Value="1"/>
30
+            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
31
+            <Setter Property="HorizontalContentAlignment" Value="Center"/>
32
+            <Setter Property="VerticalContentAlignment" Value="Center"/>
33
+            <Setter Property="Padding" Value="1"/>
34
+            <Setter Property="Template">
35
+                <Setter.Value>
36
+                    <ControlTemplate TargetType="{x:Type Button}">
37
+                        <Border x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
38
+                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
39
+                        </Border>
40
+                    </ControlTemplate>
41
+                </Setter.Value>
42
+            </Setter>
43
+        </Style>
28 44
         <!--  ListBox容器样式  -->
29 45
         <Style x:Key="ListBoxItemContainerStyle" TargetType="{x:Type ListBoxItem}">
30 46
             <Setter Property="HorizontalContentAlignment" Value="Stretch" />
@@ -69,8 +85,8 @@
69 85
                                 Cursor="Hand"
70 86
                         BorderThickness="0" Click="BtnModify_Click">
71 87
                             <Grid>
72
-                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Visi}"/>
73
-                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Coll}"/>
88
+                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Height="20"/>
89
+                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Height="20"/>
74 90
                             </Grid>
75 91
                         </Button>
76 92
                     </StackPanel>
@@ -105,8 +121,8 @@
105 121
                                 Cursor="Hand"
106 122
                         BorderThickness="0" Click="BtnPlay_Click">
107 123
                             <Grid>
108
-                                <Image Source="./Images/fileDirectory1.png" Margin="10" Height="20" Visibility="{Binding Visi}"/>
109
-                                <Image Source="./Images/fileDirectory2.png" Margin="10"  Height="20" Visibility="{Binding Coll}"/>
124
+                                <Image Source="./Images/fileDirectory1.png" Margin="10" Height="20"/>
125
+                                <Image Source="./Images/fileDirectory2.png" Margin="10"  Height="20"/>
110 126
                             </Grid>
111 127
                         </Button>
112 128
                         <Button x:Name="btnUpload" Background="Transparent"
@@ -121,8 +137,8 @@
121 137
                                 Cursor="Hand"
122 138
                         BorderThickness="0" Click="BtnDelete_Click">
123 139
                             <Grid>
124
-                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Visi}"/>
125
-                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Coll}"/>
140
+                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Height="20"/>
141
+                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Height="20"/>
126 142
                             </Grid>
127 143
                         </Button>
128 144
                     </StackPanel>
@@ -294,7 +310,7 @@
294 310
                             </Grid>
295 311
                         </Border>
296 312
                     </Grid>
297
-                    <Image x:Name="imgDocumentation" Visibility="Visible"/>
313
+                    <Image x:Name="imgDocumentation" Visibility="Visible" VerticalAlignment="Top"/>
298 314
 
299 315
                     <!--导入图片-->
300 316
                     <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
@@ -366,7 +382,7 @@
366 382
                 <RowDefinition Height="90"/>
367 383
                 <RowDefinition Height="70"/>
368 384
                 <RowDefinition Height="50"/>
369
-                <RowDefinition Height="70"/>
385
+                <RowDefinition Height="60"/>
370 386
                 <RowDefinition Height="70"/>
371 387
                 <RowDefinition Height="70"/>
372 388
                 <RowDefinition Height="70"/>
@@ -375,19 +391,24 @@
375 391
                 <RowDefinition Height="70"/>
376 392
                 <RowDefinition Height="*"/>
377 393
             </Grid.RowDefinitions>
378
-            <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
379
-                <TextBlock Text="   点阵笔" FontSize="16" Foreground="#2D8CF0" Width="80"/>
380
-                <TextBlock x:Name="txbNotConnecteds"  Text="未连接" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
381
-            </StackPanel>
382
-            <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
383
-                <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0" Width="80"/>
384
-                <RadioButton x:Name="rbnMP4" Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
394
+                <Grid.ColumnDefinitions>
395
+                    <ColumnDefinition Width="100"/>
396
+                    <ColumnDefinition Width="*"/>
397
+                </Grid.ColumnDefinitions>
398
+
399
+                <TextBlock Grid.Row="0" Grid.Column="0" Text="智能笔" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right" Margin="0,30,0,0"/>
400
+                <TextBlock Grid.Row="0" Grid.Column="1" x:Name="txbNotConnecteds"  Text="未连接" FontSize="14" Foreground="#333333" Margin="30,30,0,0"/>
401
+
402
+                <TextBlock Grid.Row="1" Grid.Column="0" Text="视频格式" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right"/>
403
+                <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
404
+                    <RadioButton x:Name="rbnMP4" Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="0,2,0,0" IsChecked="True"/>
385 405
                 <RadioButton x:Name="rbnFLV" Cursor="Hand" Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
386
-                <RadioButton x:Name="rbnAVI" Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
406
+                <RadioButton x:Name="rbnAVI" Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0" Visibility="Collapsed"/>
387 407
             </StackPanel>
388
-            <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
389
-                <TextBlock Text="头像位置" FontSize="16" Foreground="#2D8CF0" Width="80"/>
390
-                <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
408
+
409
+                <TextBlock Grid.Row="2" Grid.Column="0" Text="摄像头位置" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right"/>
410
+                <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
411
+                    <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="0,2,0,0" IsChecked="True"/>
391 412
                 <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
392 413
                 <RadioButton Cursor="Hand" x:Name="rbnLeft" Content="左上" FontSize="14" Foreground="#333333" Margin="20,2,0,0" />
393 414
                 <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
@@ -400,28 +421,29 @@
400 421
 
401 422
 
402 423
             <!--接口地址-->
403
-            <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="30,0,0,0">
404
-                <TextBlock Text="接口地址" FontSize="16" Foreground="#2D8CF0" Width="80" Padding="0,25,0,0" Margin="10,0,0,0"/>
405
-                <TextBlock Text="http://" FontSize="16" Padding="0,25,5,0"/>
424
+                <TextBlock Grid.Row="3" Grid.Column="0" Text="接口地址" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right" Padding="0,20,0,0"/>
425
+                <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal" Margin="30,0,0,0">
426
+                    <TextBlock Text="http://" FontSize="16" Padding="0,20,5,0"/>
406 427
                 <TextBox x:Name="txbInterfaceAddress" FontSize="16" Width="467" Height="41"  VerticalContentAlignment="Center" Padding="5,0,0,0"/>
407 428
             </StackPanel>
429
+            
408 430
             <!--上传地址-->
409
-            <StackPanel Grid.Row="4" Orientation="Horizontal" Margin="30,20,0,0">
410
-                <TextBlock Text="上传地址" FontSize="16" Foreground="#2D8CF0" Width="80" Padding="0,10,0,0" Margin="10,5,0,0"/>
411
-                <TextBlock Text="http://" FontSize="16" Padding="0,15,5,0"/>
431
+                <TextBlock Grid.Row="4" Grid.Column="0" Text="上传地址" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right" Padding="0,35,0,0"/>
432
+                <StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal" Margin="30,20,0,0">
433
+                    <TextBlock Text="http://" FontSize="16" Padding="0,15,5,0"/>
412 434
                 <TextBox x:Name="txbImageUploadAddress" FontSize="16" Width="467" Height="41"  VerticalContentAlignment="Center" Padding="5,0,0,0"/>
413 435
             </StackPanel>
436
+            
414 437
             <!--下载地址-->
415
-            <StackPanel Grid.Row="5" Orientation="Horizontal" Margin="30,20,0,0">
416
-                <TextBlock Text="下载地址" FontSize="16" Foreground="#2D8CF0" Width="80" Padding="0,15,0,0" Margin="10,0,0,0"/>
417
-                <TextBlock Text="http://" FontSize="16" Padding="0,15,5,0"/>
438
+                <TextBlock Grid.Row="5" Grid.Column="0" Text="下载地址" FontSize="16" Foreground="#333333" FontWeight="Black" HorizontalAlignment="Right" Padding="0,35,0,0"/>
439
+                <StackPanel Grid.Row="5" Grid.Column="1" Orientation="Horizontal" Margin="30,20,0,0">
440
+                    <TextBlock Text="http://" FontSize="16" Padding="0,15,5,0"/>
418 441
                 <TextBox x:Name="txbPictureShowsAddress" FontSize="16" Width="467" Height="41"  VerticalContentAlignment="Center" Padding="5,0,0,0"/>
419 442
             </StackPanel>
420 443
 
421
-
422
-            <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,20,0,0">
423
-                <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Width="80"  Foreground="#2D8CF0" Padding="10,18,10,0" />
424
-                <Border Background="#CDD6E0" Width="522" Height="43" CornerRadius="3" Margin="10,0,0,0">
444
+                <TextBlock Grid.Row="6" Grid.Column="0" x:Name="txbFilePath" Text="文件路径" FontSize="16" HorizontalAlignment="Right" Foreground="#333333" FontWeight="Black" Padding="0,35,0,0" />
445
+                <StackPanel Grid.Row="6" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,20,0,0">
446
+                    <Border Background="#CDD6E0" Width="522" Height="43" CornerRadius="3" Margin="0,0,0,0">
425 447
                     <Label x:Name="txbStoragePath" Background="#FFFFFF" Content="D:\" FontSize="16" Foreground="#333333" Padding="10,12,2,2" Width="520" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
426 448
                 </Border>
427 449
                 <!--浏览按钮-->
@@ -442,16 +464,23 @@
442 464
                     </Button.Template>
443 465
                 </Button>
444 466
             </StackPanel>
445
-            <StackPanel Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
446
-                <TextBlock Text="    版本号" FontSize="16" Width="80" Foreground="#2D8CF0"/>
447
-                <TextBlock x:Name="txbv" Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
467
+
468
+                <TextBlock Grid.Row="7" Grid.Column="0" Text="版本号" FontSize="16" HorizontalAlignment="Right" Foreground="#333333" FontWeight="Black" Margin="0,30,0,0"/>
469
+                <StackPanel Grid.Row="7" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
470
+                    <TextBlock x:Name="txbv" Text="V0.0.0" FontSize="16" Foreground="#333333"/>
448 471
             </StackPanel>
449
-            <StackPanel Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
450
-                <TextBlock Text="版权所有" FontSize="16" Width="80" Foreground="#2D8CF0"/>
451
-                <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
472
+
473
+                <TextBlock Grid.Row="8" Grid.Column="0" Text="版权所有" FontSize="16" HorizontalAlignment="Right" Foreground="#333333" FontWeight="Black" Margin="0,30,0,0"/>
474
+                <StackPanel Grid.Row="8" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
475
+                    <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333"/>
452 476
             </StackPanel>
453
-            <!--第四行 开始按钮-->
454
-            <Button Cursor="Hand" Grid.Row="9" 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">
477
+
478
+                <TextBlock Grid.Row="9" Grid.Column="0" Text="录屏快捷键" FontSize="16" HorizontalAlignment="Right" Foreground="#333333" FontWeight="Black" Margin="0,30,0,0"/>
479
+                <StackPanel Grid.Row="9" Grid.Column="1">
480
+                    <TextBlock  FontSize="14" Foreground="#333333" Text="开始/暂停:Ctrl+F5     停止:Ctrl+S     退出讲评:鼠标右键" Margin="30,30,0,0"/>
481
+                </StackPanel>
482
+                <!--第四行 开始按钮-->
483
+            <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">
455 484
                 <Button.Template>
456 485
                     <ControlTemplate TargetType="{x:Type Button}">
457 486
                         <Border
@@ -572,38 +601,54 @@
572 601
         </Grid>
573 602
         <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
574 603
             <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
575
-                <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
604
+                <TextBlock Text="颜色:" FontSize="14" Padding="10,5,0,0"/>
576 605
                 <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
577 606
 
578
-
579
-                <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click">
607
+                    <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
608
+                        <Button Cursor="Hand" x:Name="btnRed" Width="20" Height="20" Background="#FF0000" Margin="1,1,1,1" HorizontalAlignment="Center"  Click="BtnRed_Click" Style="{StaticResource NoMouseOverButtonStyle}">
580 609
                     <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
581 610
                 </Button>
582
-                <Button Cursor="Hand" x:Name="btnGray" Background="#333333" Width="20" Height="20" Margin="5,2,0,0" Click="BtnGray_Click">
611
+                    </Border>
612
+                    <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
613
+                        <Button Cursor="Hand" x:Name="btnGray" Background="#333333" Width="20" Height="20" Margin="1,1,1,1" Click="BtnGray_Click" Style="{StaticResource NoMouseOverButtonStyle}">
583 614
                     <Image x:Name="imgGray" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
584 615
                 </Button>
585
-                <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,2,0,0" Click="BtnCyanBlue_Click">
616
+                    </Border>
617
+                    <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
618
+
619
+
620
+                        <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="1,1,1,1" Click="BtnCyanBlue_Click" Style="{StaticResource NoMouseOverButtonStyle}">
586 621
                     <Image x:Name="imgCyanBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
587 622
                 </Button>
588
-                <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,2,0,0" Click="BtnYellow_Click">
623
+                    </Border>
624
+                    <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
625
+
626
+
627
+                        <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="1,1,1,1" Click="BtnYellow_Click" Style="{StaticResource NoMouseOverButtonStyle}">
628
+                   
589 629
                     <Image x:Name="imgYellow" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
590 630
                 </Button>
591
-                <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click">
631
+                    </Border>
632
+                    <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
633
+
634
+
635
+                        <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="1,1,1,1" Click="BtnBlue_Click" Style="{StaticResource NoMouseOverButtonStyle}">
592 636
                     <Image x:Name="imgBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
593 637
                 </Button>
594
-                <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
595
-                <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,10,0,0" IsChecked="True" Click="RbnFine_Click"/>
596
-                <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,10,0,0" Click="RbnIn_Click"/>
597
-                <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,10,0,0" Click="RbnCrude_Click"/>
638
+                    </Border>
639
+                    <TextBlock Text="粗细:" FontSize="14" Padding="15,0,0,0" Margin="5,5,0,0"/>
640
+                    <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,7,0,0" IsChecked="True" Click="RbnFine_Click"/>
641
+                <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,7,0,0" Click="RbnIn_Click"/>
642
+                <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,7,0,0" Click="RbnCrude_Click"/>
598 643
                 <StackPanel Orientation="Horizontal">
599
-                    <TextBlock Text="摄像头:" FontSize="14" Padding="15,10,0,0"/>
600
-                    <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,10,0,0" Click="RbnOpen_Click"/>
601
-                    <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,10,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
644
+                    <TextBlock Text="摄像头:" FontSize="14" Padding="15,6,0,0"/>
645
+                    <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,7,0,0" Click="RbnOpen_Click"/>
646
+                    <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,7,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
602 647
                 </StackPanel>
603 648
             </StackPanel>
604
-            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,10,0">
605
-                <TextBlock Text="智能笔状态:" FontSize="14" Padding="0,5,0,0"/>
606
-                <TextBlock x:Name="txbNotConnected" Text="未连接" FontSize="14" Padding="0,5,5,0"/>
649
+            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
650
+                <TextBlock Text="智能笔状态:" FontSize="14" Padding="0,4,0,0"/>
651
+                <TextBlock x:Name="txbNotConnected" Text="未连接" FontSize="14" Padding="0,4,5,0"/>
607 652
             </StackPanel>
608 653
         </Grid>
609 654
 

+ 35
- 32
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Bestand weergeven

@@ -312,7 +312,7 @@ namespace XHWK.WKTool
312 312
             {
313 313
                 CameraHelper.SetCameraDevice(0);
314 314
                 RbnOpen = new List<string>();
315
-                times = new System.Timers.Timer(300)
315
+                times = new System.Timers.Timer(100)//初始值为300
316 316
                 {
317 317
                     AutoReset = true//设置是否执行System.Timers.Timer.Elapsed事件
318 318
                 };//设置执行一次(false)还是一直执行(true)
@@ -1550,43 +1550,46 @@ namespace XHWK.WKTool
1550 1550
         /// <param name="e"></param>
1551 1551
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
1552 1552
         {
1553
-
1554
-            pageData.menuList[Subscript].IsEnabled = false;
1555
-            List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnDelete");
1556
-            for (int i = 0; i < buttons.Count; i++)
1553
+            MessageBoxResult dr = MessageWindow.Show("确定删除该视频?", "提示", MessageBoxButton.OKCancel);
1554
+            if (dr == MessageBoxResult.OK)
1557 1555
             {
1558
-                if (buttons[i] == sender)
1556
+                pageData.menuList[Subscript].IsEnabled = false;
1557
+                List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnDelete");
1558
+                for (int i = 0; i < buttons.Count; i++)
1559 1559
                 {
1560
-
1561
-                    //if (APP.W_PromptWindow == null)
1562
-                    //{
1563
-                    //    APP.W_PromptWindow = new PromptWindow();
1564
-                    //    APP.W_PromptWindow.Owner = this;
1565
-                    //}
1566
-                    //APP.W_PromptWindow.Initialize(pageData.menuList[i].VideoName);
1567
-                    //APP.W_PromptWindow.ShowDialog();
1568
-
1569
-                    foreach (Model_WKData wKData in APP.WKDataList)
1560
+                    if (buttons[i] == sender)
1570 1561
                     {
1571
-                        if (wKData.VideoList == null)
1572
-                        {
1573
-                            continue;
1574
-                        }
1575 1562
 
1576
-                        if (wKData.VideoList.Exists(x => x.FileGuid == pageData.menuList[i].FileGuid))
1563
+                        //if (APP.W_PromptWindow == null)
1564
+                        //{
1565
+                        //    APP.W_PromptWindow = new PromptWindow();
1566
+                        //    APP.W_PromptWindow.Owner = this;
1567
+                        //}
1568
+                        //APP.W_PromptWindow.Initialize(pageData.menuList[i].VideoName);
1569
+                        //APP.W_PromptWindow.ShowDialog();
1570
+
1571
+                        foreach (Model_WKData wKData in APP.WKDataList)
1577 1572
                         {
1578
-                            try
1573
+                            if (wKData.VideoList == null)
1579 1574
                             {
1580
-                                FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).VideoPath);
1581
-                                FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).ThumbnailPath);
1582
-                                wKData.VideoList.Remove(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid));
1583
-                                InitializeUpload();
1584
-                                return;
1575
+                                continue;
1585 1576
                             }
1586
-                            catch (Exception ex)
1577
+
1578
+                            if (wKData.VideoList.Exists(x => x.FileGuid == pageData.menuList[i].FileGuid))
1587 1579
                             {
1588
-                                System.Windows.MessageBox.Show("无法删除视频!" + ex.Message);
1589
-                                return;
1580
+                                try
1581
+                                {
1582
+                                    FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).VideoPath);
1583
+                                    FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).ThumbnailPath);
1584
+                                    wKData.VideoList.Remove(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid));
1585
+                                    InitializeUpload();
1586
+                                    return;
1587
+                                }
1588
+                                catch (Exception ex)
1589
+                                {
1590
+                                    System.Windows.MessageBox.Show("无法删除视频!" + ex.Message);
1591
+                                    return;
1592
+                                }
1590 1593
                             }
1591 1594
                         }
1592 1595
                     }
@@ -2346,8 +2349,8 @@ namespace XHWK.WKTool
2346 2349
                 //暂停
2347 2350
                 IsSuspendR = true;
2348 2351
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
2349
-                ImgStop.Visibility = Visibility.Visible;
2350
-                ImgStopTwo.Visibility = Visibility.Collapsed;
2352
+                ImgStop.Visibility = Visibility.Collapsed;
2353
+                ImgStopTwo.Visibility = Visibility.Visible;
2351 2354
                 TxbRecordingWord.Text = "继续";
2352 2355
                 //TimeOut();
2353 2356
                 #region 2秒内不可点击

Laden…
Annuleren
Opslaan