Explorar el Código

选择颜色 时间

tags/录制修改前
zhangxueyang hace 4 años
padre
commit
e2a1e7b7ca

+ 17
- 12
Common/system/BlackboardNew.cs Ver fichero

@@ -230,22 +230,27 @@ namespace Common.system
230 230
         // 清空
231 231
         public void clear()
232 232
         {
233
-     
234
-            ZBBPage page = new ZBBPage();
235
-            page.lines.Add(new ZBBPageStep());
236
-            page.lines = new List<ZBBPageStep>();
237
-            page.lines_histoty = new List<ZBBPageStep>();
238
-            strokes_page_all.Add(page);
239 233
 
234
+            //ZBBPage page = new ZBBPage();
235
+            //page.lines.Add(new ZBBPageStep());
236
+            //page.lines = new List<ZBBPageStep>();
237
+            //page.lines_histoty = new List<ZBBPageStep>();
238
+            //strokes_page_all.Add(page);
240 239
 
241
-            //ZBBPage page = strokes_page_all[pagenum];
242
-            //    if (page != null)
240
+            strokes_page_all.Clear();
241
+            //for (int i=0;i< strokes_page_all.Count;i++)
243 242
             //{
244
-            //    m_canvas.Strokes.Clear();
245
-            //    page.lines_histoty.Clear();
246
-            //    page.lines.Clear();
247
-            //    page.lines.Add(new ZBBPageStep());
243
+            //    ZBBPage page = strokes_page_all[pagenum];
244
+            //    if (page != null)
245
+            //    {
246
+            //        m_canvas.Strokes.Clear();
247
+            //        page.lines_histoty.Clear();
248
+            //        page.lines.Clear();
249
+            //        page.lines.Add(new ZBBPageStep());
250
+            //    }
248 251
             //}
252
+
253
+          
249 254
         }
250 255
 
251 256
         public void changepage(int mpagenum)

BIN
XHWK.WKTool/Images/microLessonSystem_999.png Ver fichero


+ 21
- 8
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Ver fichero

@@ -103,7 +103,8 @@
103 103
                             <TextBlock Text="停止" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
104 104
                         </StackPanel>
105 105
                     </Button>
106
-                    <TextBlock x:Name="txbType" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
106
+                        <TextBlock x:Name="txbTime" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
107
+                        <TextBlock x:Name="txbType" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
107 108
                 </StackPanel>
108 109
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
109 110
                     <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click" Margin="0,0,30,0">
@@ -171,7 +172,7 @@
171 172
                                 </Border>
172 173
                             </Grid>
173 174
                             <!--导入图片-->
174
-                            <Image x:Name="imgDocumentation"/>
175
+                            <Image x:Name="imgDocumentation" Source="./Images/microLessonSystem_18.png"/>
175 176
                             <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
176 177
                             <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
177 178
                             <!--摄像头-->
@@ -319,12 +320,24 @@
319 320
             <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
320 321
                 <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
321 322
                     <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
322
-                    <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0"/>
323
-                    <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click"/>
324
-                    <Button Cursor="Hand" x:Name="btnGray" Background="#333333" Width="20" Height="20" Margin="5,2,0,0" Click="BtnGray_Click"/>
325
-                    <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,2,0,0" Click="BtnCyanBlue_Click"/>
326
-                    <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,2,0,0" Click="BtnYellow_Click"/>
327
-                    <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click"/>
323
+                    <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
324
+
325
+                    
326
+                        <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click">
327
+                            <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
328
+                        </Button>
329
+                        <Button Cursor="Hand" x:Name="btnGray" Background="#333333" Width="20" Height="20" Margin="5,2,0,0" Click="BtnGray_Click">
330
+                            <Image x:Name="imgGray" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
331
+                        </Button>
332
+                        <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,2,0,0" Click="BtnCyanBlue_Click">
333
+                            <Image x:Name="imgCyanBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
334
+                        </Button>
335
+                        <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,2,0,0" Click="BtnYellow_Click">
336
+                            <Image x:Name="imgYellow" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
337
+                        </Button>
338
+                        <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click">
339
+                            <Image x:Name="imgBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
340
+                        </Button>
328 341
                     <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
329 342
                     <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,10,0,0" IsChecked="True" Click="RbnFine_Click"/>
330 343
                     <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,10,0,0" Click="RbnIn_Click"/>

+ 44
- 2
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Ver fichero

@@ -201,6 +201,7 @@ namespace XHWK.WKTool
201 201
             }
202 202
 
203 203
             string time = string.Format("{0:D2}:{1:D2}",/* _timeSpan.Hours,*/ _timeSpan.Minutes, _timeSpan.Seconds);
204
+            txbTime.Text = time;
204 205
             //txbTime.Text = time;
205 206
         }
206 207
         /// <summary>
@@ -654,10 +655,14 @@ namespace XHWK.WKTool
654 655
         /// <param name="e"></param>
655 656
         private void BtnRed_Click(object sender, RoutedEventArgs e)
656 657
         {
657
-
658 658
             //设置 DrawingAttributes 的 Color 属性设置颜色  
659 659
             drawingAttributes.Color = Colors.Red;
660 660
             Color = Colors.Red;
661
+            imgRed.Visibility = Visibility.Visible;
662
+            imgGray.Visibility = Visibility.Collapsed;
663
+            imgCyanBlue.Visibility = Visibility.Collapsed;
664
+            imgYellow.Visibility = Visibility.Collapsed;
665
+            imgBlue.Visibility = Visibility.Collapsed;
661 666
         }
662 667
         /// <summary>
663 668
         /// 画笔颜色事件 黑色
@@ -668,6 +673,11 @@ namespace XHWK.WKTool
668 673
         {
669 674
             drawingAttributes.Color = Colors.Black;
670 675
             Color = Colors.Black;
676
+            imgRed.Visibility = Visibility.Collapsed;
677
+            imgGray.Visibility = Visibility.Visible;
678
+            imgCyanBlue.Visibility = Visibility.Collapsed;
679
+            imgYellow.Visibility = Visibility.Collapsed;
680
+            imgBlue.Visibility = Visibility.Collapsed;
671 681
         }
672 682
         /// <summary>
673 683
         /// 画笔颜色事件 青色
@@ -678,6 +688,11 @@ namespace XHWK.WKTool
678 688
         {
679 689
             drawingAttributes.Color = Colors.LimeGreen;
680 690
             Color = Colors.LimeGreen;
691
+            imgRed.Visibility = Visibility.Collapsed;
692
+            imgGray.Visibility = Visibility.Collapsed;
693
+            imgCyanBlue.Visibility = Visibility.Visible;
694
+            imgYellow.Visibility = Visibility.Collapsed;
695
+            imgBlue.Visibility = Visibility.Collapsed;
681 696
         }
682 697
         /// <summary>
683 698
         /// 画笔颜色事件 黄色
@@ -688,6 +703,11 @@ namespace XHWK.WKTool
688 703
         {
689 704
             drawingAttributes.Color = Colors.Gold;
690 705
             Color = Colors.Gold;
706
+            imgRed.Visibility = Visibility.Collapsed;
707
+            imgGray.Visibility = Visibility.Collapsed;
708
+            imgCyanBlue.Visibility = Visibility.Collapsed;
709
+            imgYellow.Visibility = Visibility.Visible;
710
+            imgBlue.Visibility = Visibility.Collapsed;
691 711
         }
692 712
         /// <summary>
693 713
         /// 画笔颜色事件 蓝色
@@ -698,6 +718,11 @@ namespace XHWK.WKTool
698 718
         {
699 719
             drawingAttributes.Color = Colors.DeepSkyBlue;
700 720
             Color = Colors.DeepSkyBlue;
721
+            imgRed.Visibility = Visibility.Collapsed;
722
+            imgGray.Visibility = Visibility.Collapsed;
723
+            imgCyanBlue.Visibility = Visibility.Collapsed;
724
+            imgYellow.Visibility = Visibility.Collapsed;
725
+            imgBlue.Visibility = Visibility.Visible;
701 726
         }
702 727
         /// <summary>
703 728
         /// 画笔粗细事件 细
@@ -1063,14 +1088,17 @@ namespace XHWK.WKTool
1063 1088
                             {
1064 1089
                                 APP.pageData.currpage = APP.pageData.pagenum + 1;
1065 1090
                                 APP.pageData.pagenum += num;
1091
+                                gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1066 1092
                             }
1067 1093
                             if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1068 1094
                             {
1069
-                                imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1095
+
1070 1096
                                 imgCanvas.Source = null;
1071 1097
                                 ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1072 1098
                                 ImgScreenshotTwo.Visibility = Visibility.Visible;
1073 1099
                                 btnScreenshot.IsEnabled = false;
1100
+                                imgDocumentation.Visibility = Visibility.Visible;
1101
+                                imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1074 1102
                             }
1075 1103
                             else
1076 1104
                             {
@@ -1197,6 +1225,7 @@ namespace XHWK.WKTool
1197 1225
                         t.Start();
1198 1226
                     }
1199 1227
                     t.Interval = new TimeSpan(0, 0, 0, 1);
1228
+                    txbTime.Visibility = Visibility.Visible;
1200 1229
                     Stack(); 
1201 1230
                     #endregion
1202 1231
 
@@ -1297,6 +1326,7 @@ namespace XHWK.WKTool
1297 1326
                 ImgStop.Visibility = Visibility.Collapsed;
1298 1327
                 ImgStopTwo.Visibility = Visibility.Visible;
1299 1328
                 TxbRecordingWord.Text = "暂停";
1329
+                Stack();
1300 1330
                 #region 2秒内不可点击
1301 1331
                 new Thread(new ThreadStart(new Action(() =>
1302 1332
                 {
@@ -1339,6 +1369,7 @@ namespace XHWK.WKTool
1339 1369
                 ImgStop.Visibility = Visibility.Visible;
1340 1370
                 ImgStopTwo.Visibility = Visibility.Collapsed;
1341 1371
                 TxbRecordingWord.Text = "继续";
1372
+                TimeOut();
1342 1373
                 #region 2秒内不可点击
1343 1374
                 new Thread(new ThreadStart(new Action(() =>
1344 1375
                 {
@@ -1440,6 +1471,7 @@ namespace XHWK.WKTool
1440 1471
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
1441 1472
                 ImgStop.Visibility = Visibility.Visible;
1442 1473
                 ImgStopTwo.Visibility = Visibility.Collapsed;
1474
+                TimeOut();
1443 1475
                 txbType.Text = "保存中";
1444 1476
                 #region 2秒内不可点击
1445 1477
                 new Thread(new ThreadStart(new Action(() =>
@@ -1453,6 +1485,13 @@ namespace XHWK.WKTool
1453 1485
                 #endregion
1454 1486
                 try
1455 1487
                 {
1488
+                    #region 清空画板数据
1489
+                    APP.pageData.currpage = 0;
1490
+                    APP.pageData.pagenum = 0;
1491
+                    myblackboard.clear();
1492
+                    APP.PageDrawList.Clear();
1493
+                    #endregion
1494
+
1456 1495
                     //缩略图
1457 1496
                     string ThumbnailPath = FileToolsCommon.GetDirectoryName(VideoSavePathName) + "ThumbnailPath/";
1458 1497
                     FileToolsCommon.CreateDirectory(ThumbnailPath);
@@ -1502,6 +1541,9 @@ namespace XHWK.WKTool
1502 1541
                             BtnRecord.IsEnabled = true;
1503 1542
                             btnStop.IsEnabled = true;
1504 1543
                             TxbRecordingWord.Text = "录制";
1544
+                            End();
1545
+                            txbTime.Text = "";
1546
+                            txbTime.Visibility = Visibility.Hidden;
1505 1547
                             txbType.Text = "";
1506 1548
                         });
1507 1549
                         FileToolsCommon.DeleteFile(ThumbnailPathName);

+ 3
- 0
XHWK.WKTool/XHWK.WKTool.csproj Ver fichero

@@ -1525,5 +1525,8 @@
1525 1525
   <ItemGroup>
1526 1526
     <Resource Include="Images\img_load.gif" />
1527 1527
   </ItemGroup>
1528
+  <ItemGroup>
1529
+    <Resource Include="Images\microLessonSystem_999.png" />
1530
+  </ItemGroup>
1528 1531
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1529 1532
 </Project>

Loading…
Cancelar
Guardar