소스 검색

zhao:1修改录像倒计时 2修改录像计时 3倒计时页增加快捷键说明

tags/录制修改前
耀 4 년 전
부모
커밋
abb2a7dbc1

+ 2
- 1
XHWK.WKTool/CountdownWindow.xaml 파일 보기

@@ -6,7 +6,7 @@
6 6
         xmlns:local="clr-namespace:XHWK.WKTool"
7 7
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
8 8
         mc:Ignorable="d"
9
-        Title="CountdownWindow" Height="450" Width="800"  AllowsTransparency="True"
9
+        Title="CountdownWindow" Height="904.335" Width="1235.26"  AllowsTransparency="True"
10 10
     ShowInTaskbar="False"
11 11
     WindowStartupLocation="CenterOwner" WindowState="Maximized"
12 12
     WindowStyle="None">
@@ -22,5 +22,6 @@
22 22
                     Width="600"
23 23
                     Height="600"
24 24
                     Source=".\Images\countdown_3.png" />
25
+        <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"/>
25 26
     </Grid>
26 27
 </Window>

+ 9
- 1
XHWK.WKTool/CountdownWindow.xaml.cs 파일 보기

@@ -23,8 +23,16 @@ namespace XHWK.WKTool
23 23
         /// </summary>
24 24
         System.Timers.Timer timer;
25 25
         int ImgNum = 21;
26
-        public void Initialize(int changeTime=2100)
26
+        public void Initialize(bool ShowlblShortcut=false, int changeTime=2100)
27 27
         {
28
+            if (ShowlblShortcut)
29
+            {
30
+                lblShortcut.Visibility = Visibility.Visible;
31
+            }
32
+            else
33
+            {
34
+                lblShortcut.Visibility = Visibility.Hidden;
35
+            }
28 36
             ImgNum = 21;
29 37
             bool IsStart = true;
30 38
             new Thread(new ThreadStart(new Action(() =>

+ 19
- 1
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs 파일 보기

@@ -201,7 +201,6 @@ namespace XHWK.WKTool
201 201
         {
202 202
             if (IsSuspend)
203 203
             {
204
-                Stack();
205 204
                 if (IsFirstRS)
206 205
                 {
207 206
                     VideoInfo = new Model_Video();
@@ -231,9 +230,28 @@ namespace XHWK.WKTool
231 230
                 txbTime.Visibility = Visibility.Visible;
232 231
                 try
233 232
                 {
233
+                    if (APP.W_CountdownWindow == null)
234
+                    {
235
+                        APP.W_CountdownWindow = new CountdownWindow();
236
+                        APP.W_CountdownWindow.Initialize(true, 1800);
237
+                        //APP.W_CountdownWindow.Topmost = true;
238
+                    }
239
+                    else
240
+                    {
241
+                        APP.W_CountdownWindow.Initialize(true, 1800);
242
+                        //APP.W_CountdownWindow.Topmost = true;
243
+                    }
244
+                    APP.W_CountdownWindow.Show();
234 245
                     new Thread(new ThreadStart(new Action(() =>
235 246
                     {
247
+                        Thread.Sleep(1000);
236 248
                         APP.FFmpeg.StartRecordingVideo(VideoSavePathName);
249
+
250
+                        Thread.Sleep(1800);
251
+                        Dispatcher.Invoke(() =>
252
+                        {
253
+                            Stack();
254
+                        });
237 255
                     }))).Start();
238 256
                 }
239 257
                 catch (Exception ex)

+ 4
- 3
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs 파일 보기

@@ -1226,7 +1226,6 @@ namespace XHWK.WKTool
1226 1226
                     }
1227 1227
                     t.Interval = new TimeSpan(0, 0, 0, 1);
1228 1228
                     txbTime.Visibility = Visibility.Visible;
1229
-                    Stack(); 
1230 1229
                     #endregion
1231 1230
 
1232 1231
                     VideoInfo = new Model_Video();
@@ -1298,6 +1297,7 @@ namespace XHWK.WKTool
1298 1297
 
1299 1298
                     btnLoginType.IsEnabled = false;
1300 1299
                     #endregion
1300
+
1301 1301
                     #region 录像倒计时
1302 1302
                     if (APP.W_CountdownWindow == null)
1303 1303
                     {
@@ -1327,7 +1327,6 @@ namespace XHWK.WKTool
1327 1327
                 ImgStop.Visibility = Visibility.Collapsed;
1328 1328
                 ImgStopTwo.Visibility = Visibility.Visible;
1329 1329
                 TxbRecordingWord.Text = "暂停";
1330
-                Stack();
1331 1330
                 #region 2秒内不可点击
1332 1331
                 new Thread(new ThreadStart(new Action(() =>
1333 1332
                 {
@@ -1346,13 +1345,15 @@ namespace XHWK.WKTool
1346 1345
                 #endregion
1347 1346
                 try
1348 1347
                 {
1349
-                    APP.FFmpeg.StartRecordingAudio(AudioPathName);
1350 1348
                     new Thread(new ThreadStart(new Action(() =>
1351 1349
                     {
1350
+                        Thread.Sleep(1000);
1351
+                        APP.FFmpeg.StartRecordingAudio(AudioPathName);
1352 1352
                         Thread.Sleep(1000);
1353 1353
                         Dispatcher.Invoke(() =>
1354 1354
                         {
1355 1355
                             IsStartCount = true;
1356
+                            Stack();
1356 1357
                             //timer.Start();
1357 1358
                         });
1358 1359
                     }))).Start();

Loading…
취소
저장