Browse Source

Merge remote-tracking branch 'origin/zhangxueyang' into zyy

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

+ 2
- 2
XHWK.WKTool/App.config View File

34
     <!--上传每片大小 Mb-->
34
     <!--上传每片大小 Mb-->
35
     <add key="UploadSliceLen" value="1" />
35
     <add key="UploadSliceLen" value="1" />
36
     <!--版本号-->
36
     <!--版本号-->
37
-    <add key="VersionCode" value="29" />
38
-    <add key="VersionName" value="1.2.8" />
37
+    <add key="VersionCode" value="30" />
38
+    <add key="VersionName" value="1.2.9" />
39
     <add key="ClientSettingsProvider.ServiceUri" value="" />
39
     <add key="ClientSettingsProvider.ServiceUri" value="" />
40
   </appSettings>
40
   </appSettings>
41
   <system.web>
41
   <system.web>

+ 2
- 2
XHWK.WKTool/Properties/AssemblyInfo.cs View File

49
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
49
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
50
 //通过使用 "*",如下所示:
50
 //通过使用 "*",如下所示:
51
 // [assembly: AssemblyVersion("1.0.*")]
51
 // [assembly: AssemblyVersion("1.0.*")]
52
-[assembly: AssemblyVersion("1.2.8.0")]
53
-[assembly: AssemblyFileVersion("1.2.8.0")]
52
+[assembly: AssemblyVersion("1.2.9.0")]
53
+[assembly: AssemblyFileVersion("1.2.9.0")]

+ 1
- 1
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

255
                     <TextBlock x:Name="txbTime" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
255
                     <TextBlock x:Name="txbTime" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
256
                 </StackPanel>
256
                 </StackPanel>
257
                 <StackPanel Grid.Row="1" HorizontalAlignment="Center">
257
                 <StackPanel Grid.Row="1" HorizontalAlignment="Center">
258
-                    <TextBlock x:Name="txbType" Text="" FontSize="20" Foreground="#FFFFFF" Margin="0,25,0,0"/>
258
+                    <TextBlock x:Name="txbType" Text="" FontSize="20" Foreground="#FFFFFF" Margin="60,25,0,0"/>
259
                 </StackPanel>
259
                 </StackPanel>
260
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,5">
260
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,5">
261
                     <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click" Margin="0,0,30,0">
261
                     <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click" Margin="0,0,30,0">

+ 45
- 9
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

346
         /// <param name="e"></param>
346
         /// <param name="e"></param>
347
         private void RbnOpen_Click(object sender, RoutedEventArgs e)
347
         private void RbnOpen_Click(object sender, RoutedEventArgs e)
348
         {
348
         {
349
-            //UCCamera win = new UCCamera();
350
-            ////win.Topmost = true;
351
-            //win.ShowDialog();
349
+            if (!IsRbnOpen)
350
+            {
351
+                #region 防止连击
352
+                if (IsPressButton)
353
+                {
354
+                    return;
355
+                }
356
+                else
357
+                {
358
+                    IsPressButton = true;
359
+                    new Thread(new ThreadStart(new Action(() =>
360
+                    {
361
+                        //Dispatcher.Invoke(new Action(() => { rbnTurnOff.IsEnabled = false; }));
352
 
362
 
363
+                        Thread.Sleep(500);
364
+                        //Dispatcher.Invoke(new Action(() => { rbnTurnOff.IsEnabled = true; }));
353
 
365
 
366
+                        IsPressButton = false;
367
+                    }))).Start();
368
+                }
369
+                #endregion
354
 
370
 
355
-            //wfhCamera.Visibility = Visibility.Visible;
356
-            //CameraHelper.IsDisplay = true;
357
-            //CameraHelper.SourcePlayer = player;
358
-            CameraHelper.UpdateCameraDevices();
371
+                CameraHelper.UpdateCameraDevices();
359
             if (CameraHelper.CameraDevices.Count > 0)
372
             if (CameraHelper.CameraDevices.Count > 0)
360
             {
373
             {
361
                 CameraHelper.SetCameraDevice(0);
374
                 CameraHelper.SetCameraDevice(0);
362
                 RbnOpen = new List<string>();
375
                 RbnOpen = new List<string>();
363
-                times = new System.Timers.Timer(100)//初始值为300
376
+                times = new System.Timers.Timer(200)//初始值为300
364
                 {
377
                 {
365
                     AutoReset = true//设置是否执行System.Timers.Timer.Elapsed事件
378
                     AutoReset = true//设置是否执行System.Timers.Timer.Elapsed事件
366
                 };//设置执行一次(false)还是一直执行(true)
379
                 };//设置执行一次(false)还是一直执行(true)
372
                 string imgPath = FileToolsCommon.GetFileAbsolutePath("Temp/imgplayer");
385
                 string imgPath = FileToolsCommon.GetFileAbsolutePath("Temp/imgplayer");
373
                 FileToolsCommon.CreateDirectory(imgPath);
386
                 FileToolsCommon.CreateDirectory(imgPath);
374
             }
387
             }
388
+            }
375
         }
389
         }
376
 
390
 
377
         private int I = 9999;
391
         private int I = 9999;
451
         /// <param name="e"></param>
465
         /// <param name="e"></param>
452
         private void RbnTurnOff_Click(object sender, RoutedEventArgs e)
466
         private void RbnTurnOff_Click(object sender, RoutedEventArgs e)
453
         {
467
         {
454
-            IsRbnOpen = false;
468
+            if(IsRbnOpen)
469
+            {
470
+                #region 防止连击
471
+                if (IsPressButton)
472
+                {
473
+                    return;
474
+                }
475
+                else
476
+                {
477
+                    IsPressButton = true;
478
+                    new Thread(new ThreadStart(new Action(() =>
479
+                    {
480
+                        //Dispatcher.Invoke(new Action(() => { rbnOpen.IsEnabled = false; }));
481
+
482
+                        Thread.Sleep(500);
483
+                        //Dispatcher.Invoke(new Action(() => { rbnOpen.IsEnabled = true; }));
484
+
485
+                        IsPressButton = false;
486
+                    }))).Start();
487
+                }
488
+                #endregion
489
+                IsRbnOpen = false;
455
             imgPlayerRight.Visibility = Visibility.Collapsed;
490
             imgPlayerRight.Visibility = Visibility.Collapsed;
456
             imgPlayerLeft.Visibility = Visibility.Collapsed;
491
             imgPlayerLeft.Visibility = Visibility.Collapsed;
457
             imgPlayerRightUnder.Visibility = Visibility.Collapsed;
492
             imgPlayerRightUnder.Visibility = Visibility.Collapsed;
458
             imgPlayerLeftUnder.Visibility = Visibility.Collapsed;
493
             imgPlayerLeftUnder.Visibility = Visibility.Collapsed;
459
             CameraHelper.CloseDevice();
494
             CameraHelper.CloseDevice();
460
             I = 9999;
495
             I = 9999;
496
+            }
461
         }
497
         }
462
         #endregion
498
         #endregion
463
         #endregion
499
         #endregion

Loading…
Cancel
Save