Browse Source

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

tags/录制修改前
耀 4 years ago
parent
commit
abb2a7dbc1

+ 2
- 1
XHWK.WKTool/CountdownWindow.xaml View File

6
         xmlns:local="clr-namespace:XHWK.WKTool"
6
         xmlns:local="clr-namespace:XHWK.WKTool"
7
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
7
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
8
         mc:Ignorable="d"
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
     ShowInTaskbar="False"
10
     ShowInTaskbar="False"
11
     WindowStartupLocation="CenterOwner" WindowState="Maximized"
11
     WindowStartupLocation="CenterOwner" WindowState="Maximized"
12
     WindowStyle="None">
12
     WindowStyle="None">
22
                     Width="600"
22
                     Width="600"
23
                     Height="600"
23
                     Height="600"
24
                     Source=".\Images\countdown_3.png" />
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
     </Grid>
26
     </Grid>
26
 </Window>
27
 </Window>

+ 9
- 1
XHWK.WKTool/CountdownWindow.xaml.cs View File

23
         /// </summary>
23
         /// </summary>
24
         System.Timers.Timer timer;
24
         System.Timers.Timer timer;
25
         int ImgNum = 21;
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
             ImgNum = 21;
36
             ImgNum = 21;
29
             bool IsStart = true;
37
             bool IsStart = true;
30
             new Thread(new ThreadStart(new Action(() =>
38
             new Thread(new ThreadStart(new Action(() =>

+ 19
- 1
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs View File

201
         {
201
         {
202
             if (IsSuspend)
202
             if (IsSuspend)
203
             {
203
             {
204
-                Stack();
205
                 if (IsFirstRS)
204
                 if (IsFirstRS)
206
                 {
205
                 {
207
                     VideoInfo = new Model_Video();
206
                     VideoInfo = new Model_Video();
231
                 txbTime.Visibility = Visibility.Visible;
230
                 txbTime.Visibility = Visibility.Visible;
232
                 try
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
                     new Thread(new ThreadStart(new Action(() =>
245
                     new Thread(new ThreadStart(new Action(() =>
235
                     {
246
                     {
247
+                        Thread.Sleep(1000);
236
                         APP.FFmpeg.StartRecordingVideo(VideoSavePathName);
248
                         APP.FFmpeg.StartRecordingVideo(VideoSavePathName);
249
+
250
+                        Thread.Sleep(1800);
251
+                        Dispatcher.Invoke(() =>
252
+                        {
253
+                            Stack();
254
+                        });
237
                     }))).Start();
255
                     }))).Start();
238
                 }
256
                 }
239
                 catch (Exception ex)
257
                 catch (Exception ex)

+ 4
- 3
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

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

Loading…
Cancel
Save