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

合并

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

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

@@ -12,63 +12,62 @@
12 12
     <Window.Effect>
13 13
         <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14 14
     </Window.Effect>
15
-    <Viewbox>
16
-        <Grid Height="358" Width="471" Background="#FFFFFF">
17
-            <!--分5行-->
18
-            <Grid.RowDefinitions>
19
-                <RowDefinition Height="45"/>
20
-                <RowDefinition Height="70"/>
21
-                <RowDefinition Height="70"/>
22
-                <RowDefinition Height="50"/>
23
-                <RowDefinition Height="*"/>
24
-            </Grid.RowDefinitions>
25
-            <!--第一行 标题-->
26
-            <Border Grid.Row="0" Background="#2D8CF0">
27
-                <Grid>
28
-                    <TextBlock Text="登录星火微课系统" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
29
-                    <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click"/>
30
-                </Grid>
15
+
16
+    <Grid Background="#FFFFFF">
17
+        <!--分5行-->
18
+        <Grid.RowDefinitions>
19
+            <RowDefinition Height="45"/>
20
+            <RowDefinition Height="70"/>
21
+            <RowDefinition Height="70"/>
22
+            <RowDefinition Height="50"/>
23
+            <RowDefinition Height="*"/>
24
+        </Grid.RowDefinitions>
25
+        <!--第一行 标题-->
26
+        <Border Grid.Row="0" Background="#2D8CF0">
27
+            <Grid>
28
+                <TextBlock Text="登录星火微课系统" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
29
+                <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click"/>
30
+            </Grid>
31
+        </Border>
32
+        <!--第二行 登陆 账号-->
33
+        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
34
+            <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
35
+            <!--输入框-->
36
+            <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
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
+            </Border>
39
+        </StackPanel>
40
+        <!--第三行 密码-->
41
+        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
42
+            <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
43
+            <!--输入框-->
44
+            <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
45
+                <PasswordBox x:Name="pobPassword" FontSize="16" Foreground="#333333" PasswordChar="*" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
31 46
             </Border>
32
-            <!--第二行 登陆 账号-->
33
-            <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
34
-                <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
35
-                <!--输入框-->
36
-                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
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
-                </Border>
39
-            </StackPanel>
40
-            <!--第三行 密码-->
41
-            <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
42
-                <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
43
-                <!--输入框-->
44
-                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
45
-                    <PasswordBox x:Name="pobPassword" FontSize="16" Foreground="#333333" PasswordChar="*" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
46
-                </Border>
47
-            </StackPanel>
48
-            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20,10,0,0">
49
-                <Viewbox Height="23">
50
-                    <CheckBox   x:Name="ckSaveName" Click="CkSaveName_Click"/>
51
-                </Viewbox>
52
-                <TextBlock Text="记住账号" FontSize="18" Height="30" Padding="5,3,0,0"/>
53
-            </StackPanel>
47
+        </StackPanel>
48
+        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20,10,0,0">
49
+            <Viewbox Height="23">
50
+                <CheckBox   x:Name="ckSaveName" Click="CkSaveName_Click"/>
51
+            </Viewbox>
52
+            <TextBlock Text="记住账号" FontSize="18" Height="30" Padding="5,3,0,0" Margin="0,9,0,1"/>
53
+        </StackPanel>
54 54
 
55
-            <!--第五行 开始按钮-->
56
-            <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="登录" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="50" Margin="10,0,10,0" Click="BtnStart_Click">
57
-                <Button.Template>
58
-                    <ControlTemplate TargetType="{x:Type Button}">
59
-                        <Border
55
+        <!--第五行 开始按钮-->
56
+        <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="登录" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="50" Margin="10,0,10,0" Click="BtnStart_Click">
57
+            <Button.Template>
58
+                <ControlTemplate TargetType="{x:Type Button}">
59
+                    <Border
60 60
                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
61 61
                                 BorderThickness="1"
62 62
                                 CornerRadius="7">
63
-                            <Border.Background>#2D8CF0</Border.Background>
64
-                            <ContentPresenter
63
+                        <Border.Background>#2D8CF0</Border.Background>
64
+                        <ContentPresenter
65 65
                                     HorizontalAlignment="Center"
66 66
                                     VerticalAlignment="Center"
67 67
                                     Content="{TemplateBinding ContentControl.Content}" />
68
-                        </Border>
69
-                    </ControlTemplate>
70
-                </Button.Template>
71
-            </Button>
72
-        </Grid>
73
-    </Viewbox>
68
+                    </Border>
69
+                </ControlTemplate>
70
+            </Button.Template>
71
+        </Button>
72
+    </Grid>
74 73
 </Window>

+ 45
- 46
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs Целия файл

@@ -350,13 +350,35 @@ namespace XHWK.WKTool
350 350
                 btnBlackPenTwo.IsEnabled = true;//红笔可点击
351 351
                 txbTime.Visibility = Visibility.Visible;//时间显示
352 352
                 imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
353
+
353 354
                 btnReturn.IsEnabled = false;//返回主界面可点击
354 355
 
355 356
 
356 357
 
357 358
                 //borOne.Background = new SolidColorBrush(Colors.LightBlue);
359
+
360
+                //btnReturn.IsEnabled = false;//返回主界面可点击
361
+
358 362
                 try
359 363
                 {
364
+                    #region 4秒内不可点击
365
+                    new Thread(new ThreadStart(new Action(() =>
366
+                    {
367
+                        Dispatcher.Invoke(() =>
368
+                        {
369
+                            ImgEndRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar15.png"));
370
+                            BtnRecordingScreen.IsEnabled = false;
371
+                            BtnStopRecordingScreen.IsEnabled = false;
372
+                        });
373
+                        Thread.Sleep(4000);
374
+                        Dispatcher.Invoke(() =>
375
+                        {
376
+                            ImgEndRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar14.png"));
377
+                            BtnRecordingScreen.IsEnabled = true;
378
+                            BtnStopRecordingScreen.IsEnabled = true;
379
+                        });
380
+                    }))).Start();
381
+                    #endregion
360 382
                     new Thread(new ThreadStart(new Action(() =>
361 383
                     {
362 384
                         if (IsFirstRS)
@@ -386,7 +408,6 @@ namespace XHWK.WKTool
386 408
                 TimeOut();
387 409
                 IsSuspend = true;
388 410
                 ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar26.png"));//大圆圈三角形
389
-                ImgEndRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar15.png"));
390 411
                 BtnStopRecordingScreen.IsEnabled = false; //停止录制按钮不点击
391 412
                 imgBlackPenOne.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
392 413
                 btnBlackPenOne.IsEnabled = false;//蓝笔不可点击
@@ -394,12 +415,13 @@ namespace XHWK.WKTool
394 415
                 btnBlackPenTwo.IsEnabled = false;//红笔不可点击
395 416
                 txbTime.Visibility = Visibility.Hidden;//时间不显示
396 417
                 imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar29.png"));
397
-                btnReturn.IsEnabled = true;//返回主界面可点击
418
+                //btnReturn.IsEnabled = true;//返回主界面可点击
398 419
                 #region 2秒内不可点击
399 420
                 new Thread(new ThreadStart(new Action(() =>
400 421
                 {
401 422
                     Dispatcher.Invoke(() =>
402 423
                     {
424
+                        ImgEndRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar15.png"));
403 425
                         BtnRecordingScreen.IsEnabled = false;
404 426
                         BtnStopRecordingScreen.IsEnabled = false;
405 427
                     });
@@ -927,60 +949,36 @@ namespace XHWK.WKTool
927 949
         /// <param name="e"></param>
928 950
         private void BtnReturn_Click(object sender, RoutedEventArgs e)
929 951
         {
930
-            MessageBoxResult br=MessageWindow.Show("退出将不保存当前录屏!", "提示", MessageBoxButton.OKCancel);
931
-            if(br==MessageBoxResult.Cancel)
932
-            {
933
-                return;
934
-            }
935
-            k_hook.Stop();
936
-            IsSuspend = true;
937
-            txbTime.Text = "00:00";
938
-
939
-            txbTime.Visibility = Visibility.Hidden;
940
-            End();
941
-            if (APP.W_PracticeWindow != null)
952
+            if (!IsFirstRS)
942 953
             {
943
-                if (APP.W_PracticeWindow.Visibility == Visibility.Visible)
954
+                MessageBoxResult br = MessageWindow.Show("退出将不保存当前录屏!", "提示", MessageBoxButton.OKCancel);
955
+                if (br == MessageBoxResult.Cancel)
944 956
                 {
945
-                    APP.W_PracticeWindow.Hide();
957
+                    return;
946 958
                 }
947
-            }
948
-            if (gridToolbar.Visibility == Visibility.Visible)
949
-            {
950
-                gridToolbar.Visibility = Visibility.Hidden;
951
-                gridColour.Visibility = Visibility.Hidden;
952
-                gridThickness.Visibility = Visibility.Hidden;
953
-            }
954
-            if (APP.W_XHMicroLessonSystemWindow == null)
955
-            {
956
-                MessageBoxResult dr = MessageWindow.Show("返回主界面视频不保存,是否返回?", "提示", MessageBoxButton.OKCancel);
957
-                if (dr == MessageBoxResult.OK)
958
-                {
959
-                    IsSuspend = true;
960
-                    txbTime.Text = "00:00";
959
+                k_hook.Stop();
960
+                IsSuspend = true;
961
+                txbTime.Text = "00:00";
961 962
 
962
-                    txbTime.Visibility = Visibility.Hidden;
963
-                    End();
964
-                    if (APP.W_XHMicroLessonSystemWindow == null)
963
+                txbTime.Visibility = Visibility.Hidden;
964
+                End();
965
+                if (APP.W_PracticeWindow != null)
966
+                {
967
+                    if (APP.W_PracticeWindow.Visibility == Visibility.Visible)
965 968
                     {
966
-                        APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
969
+                        APP.W_PracticeWindow.Hide();
967 970
                     }
968
-                    APP.W_XHMicroLessonSystemWindow.Show();
969
-                    Hide();
970 971
                 }
971
-            }
972
-            else
973
-            {
972
+                if (gridToolbar.Visibility == Visibility.Visible)
973
+                {
974
+                    gridToolbar.Visibility = Visibility.Hidden;
975
+                    gridColour.Visibility = Visibility.Hidden;
976
+                    gridThickness.Visibility = Visibility.Hidden;
977
+                }
974 978
                 if (APP.W_XHMicroLessonSystemWindow == null)
975 979
                 {
976 980
                     APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
977 981
                 }
978
-                APP.W_XHMicroLessonSystemWindow.Show();
979
-                Hide();
980
-            }
981
-            APP.W_XHMicroLessonSystemWindow.Show();
982
-            if (!IsFirstRS)
983
-            {
984 982
                 try
985 983
                 {
986 984
                     try
@@ -996,7 +994,7 @@ namespace XHWK.WKTool
996 994
                     {
997 995
                         VideoInfo = null;
998 996
                         FileToolsCommon.DeleteDirectory(APP.WKData.WkPath + "temprs/");
999
-                        
997
+
1000 998
                     }))).Start();
1001 999
                 }
1002 1000
                 catch (Exception ex)
@@ -1004,6 +1002,7 @@ namespace XHWK.WKTool
1004 1002
                     LogHelper.WriteErrLog("【录屏返回】(BtnStopRecordingScreen_Click)" + ex.Message, ex);
1005 1003
                 }
1006 1004
             }
1005
+            APP.W_XHMicroLessonSystemWindow.Show();
1007 1006
             Hide();
1008 1007
         }
1009 1008
     }

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

@@ -261,8 +261,8 @@
261 261
                     </Button>-->
262 262
                 <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnUpload_Click">
263 263
                     <StackPanel Orientation="Vertical">
264
-                        <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_22.png" Visibility="Collapsed"/>
265
-                        <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_1.png" Visibility="Visible"/>
264
+                        <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_22.png" Visibility="Visible"/>
265
+                        <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_1.png" Visibility="Collapsed"/>
266 266
                         <TextBlock Text="我的" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
267 267
                     </StackPanel>
268 268
                 </Button>

+ 28
- 22
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Целия файл

@@ -423,11 +423,15 @@ namespace XHWK.WKTool
423 423
         {
424 424
             if (IsFirstR)
425 425
             {
426
-                APP.Killffmpeg();
427
-                APP.SaveWkData();
428
-                APP.SaveDraw();
429
-                Thread.Sleep(100);
430
-                System.Environment.Exit(0);
426
+                MessageBoxResult br= MessageWindow.Show("确定退出系统?","退出",MessageBoxButton.OKCancel);
427
+                if (br == MessageBoxResult.OK)
428
+                {
429
+                    APP.Killffmpeg();
430
+                    APP.SaveWkData();
431
+                    APP.SaveDraw();
432
+                    Thread.Sleep(100);
433
+                    System.Environment.Exit(0);
434
+                }
431 435
             }
432 436
             else
433 437
             {
@@ -1821,6 +1825,11 @@ namespace XHWK.WKTool
1821 1825
                     }
1822 1826
                     #endregion
1823 1827
                 }
1828
+                //翻转
1829
+                if(model_VideoList.Count>1)
1830
+                {
1831
+                    model_VideoList.Reverse();
1832
+                }
1824 1833
             }
1825 1834
             catch (Exception ex)
1826 1835
             {
@@ -2645,22 +2654,27 @@ namespace XHWK.WKTool
2645 2654
                 IsSuspendR = false;
2646 2655
                 //BtnRecording.Content = "暂停录制";
2647 2656
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_23.png"));
2648
-                ImgStop.Visibility = Visibility.Collapsed;
2649
-                ImgStopTwo.Visibility = Visibility.Visible;
2650 2657
                 TxbRecordingWord.Text = "暂停";
2651
-                #region 2秒内不可点击
2658
+                #region 4秒内不可点击
2652 2659
                 new Thread(new ThreadStart(new Action(() =>
2653 2660
                 {
2654 2661
                     Dispatcher.Invoke(() =>
2655 2662
                     {
2656 2663
                         BtnRecord.IsEnabled = false;
2657 2664
                         btnStop.IsEnabled = false;
2665
+                        ImgStop.Visibility = Visibility.Visible;
2666
+                        ImgStopTwo.Visibility = Visibility.Collapsed;
2658 2667
                     });
2659
-                    Thread.Sleep(2000);
2668
+                }))).Start();
2669
+                new Thread(new ThreadStart(new Action(() =>
2670
+                {
2671
+                    Thread.Sleep(4000);
2660 2672
                     Dispatcher.Invoke(() =>
2661 2673
                     {
2662 2674
                         BtnRecord.IsEnabled = true;
2663 2675
                         btnStop.IsEnabled = true;
2676
+                        ImgStop.Visibility = Visibility.Collapsed;
2677
+                        ImgStopTwo.Visibility = Visibility.Visible;
2664 2678
                     });
2665 2679
                 }))).Start();
2666 2680
                 #endregion
@@ -2963,8 +2977,11 @@ namespace XHWK.WKTool
2963 2977
                         if (ThuRes)
2964 2978
                         {
2965 2979
                             Bitmap bmp = ImageHelper.ReadBitmapFile(ThumbnailPathName);
2966
-                            imgW = bmp.Width + (bmp.Width % 2 > 0 ? 1 : 0);
2967
-                            imgH = bmp.Height + (bmp.Height % 2 > 0 ? 1 : 0);
2980
+                            if (bmp != null)
2981
+                            {
2982
+                                imgW = bmp.Width + (bmp.Width % 2 > 0 ? 1 : 0);
2983
+                                imgH = bmp.Height + (bmp.Height % 2 > 0 ? 1 : 0);
2984
+                            }
2968 2985
                         }
2969 2986
 
2970 2987
                         APP.FFmpeg.VideoTranscode(VideoSynthesisPathName, VideoSavePathName, imgW, imgH);
@@ -4528,16 +4545,5 @@ namespace XHWK.WKTool
4528 4545
         {
4529 4546
             HideAngleBorder();
4530 4547
         }
4531
-
4532
-        private void Button_Click_1(object sender, RoutedEventArgs e)
4533
-        {
4534
-            Thread.Sleep(2000);
4535
-        }
4536
-
4537
-        private void Button_Click_2(object sender, RoutedEventArgs e)
4538
-        {
4539
-            
4540
-            MessageWindow.Show("A:"+ActualWidth*(PrimaryScreen.DpiX / 96f)+"x" +ActualHeight * (PrimaryScreen.DpiY / 96f) + "  wh:"+Width+"x"+Height);
4541
-        }
4542 4548
     }
4543 4549
 }

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