Browse Source

画笔颜色 粗细 样式。

tags/录制修改前
zhangxueyang 4 years ago
parent
commit
af14813ae0

+ 20
- 20
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml View File

@@ -22,28 +22,28 @@
22 22
             <Grid Grid.Row="0" x:Name="gridToolbar" Visibility="Visible">
23 23
                 <Image Grid.Row="0"  Source="./Images/Toobar22.png" HorizontalAlignment="Right"/>
24 24
                 <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,5,10,0">
25
-                    <Button x:Name="btnToolbarDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnToolbarDown_Click">
25
+                    <Button  Cursor="Hand" x:Name="btnToolbarDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnToolbarDown_Click">
26 26
                         <Image Source="./Images/Toobar5.png"/>
27 27
                     </Button>
28
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
28
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
29 29
                         <Image Source="./Images/Toobar12.png"/>
30 30
                     </Button>
31
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
31
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
32 32
                         <Image Source="./Images/Toobar9.png"/>
33 33
                     </Button>
34
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
34
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
35 35
                         <Image Source="./Images/Toobar16.png"/>
36 36
                     </Button>
37
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
37
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
38 38
                         <Image Source="./Images/Toobar3.png"/>
39 39
                     </Button>
40
-                    <Button x:Name="btnColour" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnColour_Click">
40
+                    <Button  Cursor="Hand" x:Name="btnColour" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnColour_Click">
41 41
                         <Image Source="./Images/Toobar23.png"/>
42 42
                     </Button>
43
-                    <Button x:Name="btnThickness" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnThickness_Click">
43
+                    <Button  Cursor="Hand" x:Name="btnThickness" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnThickness_Click">
44 44
                         <Image Source="./Images/Toobar1.png"/>
45 45
                     </Button>
46
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
46
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
47 47
                         <Image Source="./Images/Toobar18.png"/>
48 48
                     </Button>
49 49
                 </StackPanel>
@@ -52,34 +52,34 @@
52 52
             <Grid Grid.Row="0" x:Name="gridColour" Visibility="Collapsed">
53 53
                 <Image Source="./Images/Toobar20.png" HorizontalAlignment="Right" Margin="0,200,62,0"/>
54 54
                 <StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,215,68,0">
55
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="15" Width="15" Margin="0,0,0,0"/>
56
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FF0000" Height="15" Width="15" Margin="0,8,0,0"/>
57
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#A7A9AC" Height="15" Width="15" Margin="0,8,0,0"/>
58
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#63D600" Height="15" Width="15" Margin="0,8,0,0"/>
59
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFBC00" Height="15" Width="15" Margin="0,8,0,0"/>
60
-                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#00B4FC" Height="15" Width="15" Margin="0,8,0,0"/>
55
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="15" Width="15" Margin="0,0,0,0"/>
56
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FF0000" Height="15" Width="15" Margin="0,8,0,0"/>
57
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#A7A9AC" Height="15" Width="15" Margin="0,8,0,0"/>
58
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#63D600" Height="15" Width="15" Margin="0,8,0,0"/>
59
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFBC00" Height="15" Width="15" Margin="0,8,0,0"/>
60
+                    <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#00B4FC" Height="15" Width="15" Margin="0,8,0,0"/>
61 61
                 </StackPanel>
62 62
             </Grid>
63 63
             <!--字体粗细-->
64 64
             <Grid Grid.Row="0" x:Name="gridThickness" Visibility="Collapsed">
65 65
                 <Image Grid.Row="0"  Source="./Images/Toobar21.png" HorizontalAlignment="Right" Margin="0,200,62,0"/>
66 66
             <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,260,62,0">
67
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="3" Width="20" Margin="0,0,0,0"/>
68
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="5" Width="20" Margin="0,10,0,0"/>
69
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="10" Width="20" Margin="0,10,0,0"/>
67
+                <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="3" Width="20" Margin="0,0,0,0"/>
68
+                <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="5" Width="20" Margin="0,10,0,0"/>
69
+                <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="10" Width="20" Margin="0,10,0,0"/>
70 70
             </StackPanel>
71 71
             </Grid>
72 72
             
73 73
                 <Image Grid.Row="1"  Source="./Images/Toobar0.png"/>
74 74
             <TextBlock Grid.Row="1" Text="01:35" FontSize="23" Foreground="#FFFFFF" Margin="30,50,0,0"/>
75 75
             <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,15,0">
76
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0">
76
+                <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0">
77 77
                     <Image Source="./Images/Toobar25.png"/>
78 78
                 </Button>
79
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0">
79
+                <Button  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0">
80 80
                     <Image Source="./Images/Toobar14.png"/>
81 81
                 </Button>
82
-                <Button x:Name="btnBrush" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnBrush_Click">
82
+                <Button  Cursor="Hand" x:Name="btnBrush" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnBrush_Click">
83 83
                     <Image Source="./Images/Toobar8.png"/>
84 84
                 </Button>
85 85
             </StackPanel>

+ 2
- 0
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs View File

@@ -31,6 +31,8 @@ namespace XHWK.WKTool
31 31
         private void BtnToolbarDown_Click(object sender, RoutedEventArgs e)
32 32
         {
33 33
             gridToolbar.Visibility = Visibility.Hidden;
34
+            gridColour.Visibility = Visibility.Hidden;
35
+            gridThickness.Visibility = Visibility.Hidden;
34 36
         }
35 37
         /// <summary>
36 38
         /// 画笔点击事件

+ 41
- 43
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

@@ -8,7 +8,7 @@
8 8
         xmlns:local="clr-namespace:XHWK.WKTool"
9 9
         mc:Ignorable="d"
10 10
         Title="XHMicroLessonSystemWindow" Height="930" Width="1162.5" WindowStartupLocation="CenterOwner"
11
-    WindowStyle="None" Background="#EFF1F8"  AllowsTransparency="True"
11
+    WindowStyle="None" Background="#EFF1F8"  
12 12
     ShowInTaskbar="False">
13 13
     <Viewbox>
14 14
         <Grid Height="930" Width="1162.5">
@@ -29,53 +29,53 @@
29 29
                     <TextBlock Text="星火微课系统" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
30 30
                 </StackPanel>
31 31
                 <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
32
-                    <Button x:Name="btnLoginType" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0">
32
+                    <Button Cursor="Hand" x:Name="btnLoginType" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0">
33 33
                         <StackPanel Orientation="Horizontal">
34 34
                             <Image Source="./Images/microLessonSystem_9.png"/>
35 35
                             <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
36 36
                         </StackPanel>
37 37
                     </Button>
38
-                    <Button x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
38
+                    <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
39 39
                         <Image Source="./Images/microLessonSystem_19.png"/>
40 40
                     </Button>
41
-                    <Button x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
41
+                    <!--<Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
42 42
                         <Image Source="./Images/microLessonSystem_8.png"/>
43
-                    </Button>
44
-                    <Button x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click">
43
+                    </Button>-->
44
+                    <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click">
45 45
                         <Image Source="./Images/microLessonSystem_10.png"/>
46 46
                     </Button>
47 47
                 </StackPanel>
48 48
                 <!--第二行-->
49 49
                 <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,10,0,0">
50
-                    <Button x:Name="btnScreenRecording" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnScreenRecording_Click">
50
+                    <Button Cursor="Hand" x:Name="btnScreenRecording" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnScreenRecording_Click">
51 51
                         <StackPanel Orientation="Vertical">
52 52
                             <Image x:Name="ImgScreenRecording" Source="./Images/microLessonSystem_2.png"/>
53 53
                             <Image x:Name="ImgScreenRecordingTwo" Source="./Images/microLessonSystem_3.png" Visibility="Collapsed"/>
54 54
                             <TextBlock Text="录屏" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
55 55
                         </StackPanel>
56 56
                     </Button>
57
-                    <Button x:Name="btnScreenshot" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0">
57
+                    <Button Cursor="Hand" x:Name="btnScreenshot" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0">
58 58
                         <StackPanel Orientation="Vertical">
59 59
                             <Image x:Name="ImgScreenshot" Source="./Images/microLessonSystem_12.png"/>
60 60
                             <Image x:Name="ImgScreenshotTwo" Source="./Images/microLessonSystem_11.png" Visibility="Collapsed"/>
61 61
                             <TextBlock Text="截图" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
62 62
                         </StackPanel>
63 63
                     </Button>
64
-                    <Button x:Name="btnImport" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
64
+                    <Button Cursor="Hand" x:Name="btnImport" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
65 65
                         <StackPanel Orientation="Vertical">
66 66
                             <Image x:Name="ImgImport" Source="./Images/microLessonSystem_6.png"/>
67 67
                             <Image x:Name="ImgImportTwo" Source="./Images/microLessonSystem_7.png" Visibility="Collapsed"/>
68 68
                             <TextBlock Text="导入" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
69 69
                         </StackPanel>
70 70
                     </Button>
71
-                    <Button x:Name="btnRecord" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="60,0,30,0">
71
+                    <Button Cursor="Hand" x:Name="btnRecord" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="60,0,30,0">
72 72
                         <StackPanel Orientation="Vertical">
73 73
                             <Image x:Name="ImgRecord" Source="./Images/microLessonSystem_14.png"/>
74 74
                             <Image x:Name="ImgRecordTwo" Source="./Images/microLessonSystem_13.png" Visibility="Collapsed"/>
75 75
                             <TextBlock Text="录制" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
76 76
                         </StackPanel>
77 77
                     </Button>
78
-                    <Button x:Name="btnStop" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
78
+                    <Button Cursor="Hand" x:Name="btnStop" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
79 79
                         <StackPanel Orientation="Vertical">
80 80
                             <Image x:Name="ImgStop" Source="./Images/microLessonSystem_21.png"/>
81 81
                             <Image x:Name="ImgStopTwo" Source="./Images/microLessonSystem_20.png" Visibility="Collapsed"/>
@@ -84,35 +84,35 @@
84 84
                     </Button>
85 85
                 </StackPanel>
86 86
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
87
-                    <Button x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
87
+                    <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
88 88
                         <StackPanel Orientation="Vertical">
89 89
                             <Image x:Name="ImgAdd" Source="./Images/microLessonSystem_25.png"/>
90 90
                             <Image x:Name="ImgAddTwo" Source="./Images/microLessonSystem_24.png" Visibility="Collapsed"/>
91 91
                             <TextBlock Text="增加" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
92 92
                         </StackPanel>
93 93
                     </Button>
94
-                    <Button x:Name="btnPrint" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0">
94
+                    <Button Cursor="Hand" x:Name="btnPrint" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0">
95 95
                         <StackPanel Orientation="Vertical">
96 96
                             <Image x:Name="ImgPrint" Source="./Images/microLessonSystem_4.png"/>
97 97
                             <Image x:Name="ImgPrintTwo" Source="./Images/microLessonSystem_5.png" Visibility="Collapsed"/>
98 98
                             <TextBlock Text="打印" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
99 99
                         </StackPanel>
100 100
                     </Button>
101
-                    <Button x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click">
101
+                    <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click">
102 102
                         <StackPanel Orientation="Vertical">
103 103
                             <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_16.png"/>
104 104
                             <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_15.png" Visibility="Collapsed"/>
105 105
                             <TextBlock Text="上传" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
106 106
                         </StackPanel>
107 107
                     </Button>
108
-                    <Button x:Name="btnMyMine" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0">
108
+                    <Button Cursor="Hand" x:Name="btnMyMine" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0">
109 109
                         <StackPanel Orientation="Vertical">
110 110
                             <Image x:Name="ImgMyMine" Source="./Images/microLessonSystem_1.png"/>
111 111
                             <Image x:Name="ImgMyMineTwo" Source="./Images/microLessonSystem_22.png" Visibility="Collapsed"/>
112 112
                             <TextBlock Text="我的" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
113 113
                         </StackPanel>
114 114
                     </Button>
115
-                    <Button x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnSetUp_Click">
115
+                    <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnSetUp_Click">
116 116
                         <StackPanel Orientation="Vertical">
117 117
                             <Image x:Name="ImgSetUp" Source="./Images/microLessonSystem_18.png"/>
118 118
                             <Image x:Name="ImgSetUpTwo" Source="./Images/microLessonSystem_17.png" Visibility="Collapsed"/>
@@ -123,11 +123,9 @@
123 123
             </Grid>
124 124
             <!--主内容-->
125 125
             <Grid Grid.Row="1" x:Name="gridMain"  Margin="20,0,20,0" Background="#FFFFFF" Height="793.700787401575" Width="1142.51968503937" Visibility="Visible">
126
-
127
-            </Grid>
128
-            <!--摄像头-->
129
-            <Grid Grid.Row="1" x:Name="gridCamera" Background="#FFFFFF" Margin="20,0,20,0" Visibility="Hidden">
130
-                <wfi:WindowsFormsHost Grid.Row="0" Grid.Column="0" Height="124" Width="172" HorizontalAlignment="Right" Margin="10,10,10,10" VerticalAlignment="Top">
126
+                <InkCanvas x:Name="blackboard_canvas" Background="#FFFFFF" />
127
+                <!--摄像头-->
128
+                <wfi:WindowsFormsHost Grid.Row="0" Grid.Column="0" x:Name="wfhCamera" Height="124" Width="172" HorizontalAlignment="Right" Margin="10,10,10,10" VerticalAlignment="Top">
131 129
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
132 130
                 </wfi:WindowsFormsHost>
133 131
             </Grid>
@@ -149,21 +147,21 @@
149 147
                 </StackPanel>
150 148
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
151 149
                     <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0"/>
152
-                    <RadioButton Content="MP4" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
153
-                    <RadioButton Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
154
-                    <RadioButton Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
150
+                    <RadioButton Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
151
+                    <RadioButton Cursor="Hand" Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
152
+                    <RadioButton Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
155 153
                 </StackPanel>
156 154
                 <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left">
157 155
                     <TextBlock Text="头像位置" FontSize="16" Foreground="#2D8CF0"/>
158
-                    <RadioButton Content="左上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
159
-                    <RadioButton Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
160
-                    <RadioButton Content="右上" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
161
-                    <RadioButton Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
156
+                    <RadioButton Cursor="Hand" Content="左上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
157
+                    <RadioButton Cursor="Hand" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
158
+                    <RadioButton Cursor="Hand" Content="右上" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
159
+                    <RadioButton Cursor="Hand" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
162 160
                 </StackPanel>
163 161
                 <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left">
164 162
                     <TextBlock Text="视频声音" FontSize="16" Foreground="#2D8CF0"/>
165
-                    <RadioButton Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
166
-                    <RadioButton Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
163
+                    <RadioButton Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
164
+                    <RadioButton Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
167 165
                 </StackPanel>
168 166
                 <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left">
169 167
                     <TextBlock Text="文件路径" FontSize="16" Foreground="#2D8CF0" Padding="2,36,10,0"/>
@@ -172,7 +170,7 @@
172 170
                         <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="523" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
173 171
                     </Border>
174 172
                     <!--浏览按钮-->
175
-                    <Button x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="btnBrowse_Click">
173
+                    <Button Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="btnBrowse_Click">
176 174
                         <Button.Template>
177 175
                             <ControlTemplate TargetType="{x:Type Button}">
178 176
                                 <Border
@@ -198,7 +196,7 @@
198 196
                     <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
199 197
                 </StackPanel>
200 198
                 <!--第四行 开始按钮-->
201
-                <Button Grid.Row="7" x:Name="btnSave" Content="保存" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="115" Height="45" Margin="10,0,10,0" Click="BtnSave_Click">
199
+                <Button Cursor="Hand" Grid.Row="7" x:Name="btnSave" Content="保存" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="115" Height="45" Margin="10,0,10,0" Click="BtnSave_Click">
202 200
                     <Button.Template>
203 201
                         <ControlTemplate TargetType="{x:Type Button}">
204 202
                             <Border
@@ -218,20 +216,20 @@
218 216
             <Grid Grid.Row="2">
219 217
                 <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
220 218
                     <TextBlock Text="颜色:" FontSize="14" Padding="5,5,0,0"/>
221
-                    <Button x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20"/>
222
-                    <Button x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,0,0,0"/>
223
-                    <Button x:Name="btnGray" Background="#A7A9AC" Width="20" Height="20" Margin="5,0,0,0"/>
224
-                    <Button x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,0,0,0"/>
225
-                    <Button x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,0,0,0"/>
226
-                    <Button x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,0,0,0"/>
219
+                    <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click"/>
220
+                    <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,0,0,0" Click="BtnRed_Click"/>
221
+                    <Button Cursor="Hand" x:Name="btnGray" Background="#A7A9AC" Width="20" Height="20" Margin="5,0,0,0" Click="BtnGray_Click"/>
222
+                    <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,0,0,0" Click="BtnCyanBlue_Click"/>
223
+                    <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,0,0,0" Click="BtnYellow_Click"/>
224
+                    <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,0,0,0" Click="BtnBlue_Click"/>
227 225
                     <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,0,0,0"/>
228
-                    <RadioButton x:Name="rbnFine" Content="细" FontSize="14" Margin="0,5,0,0" IsChecked="True"/>
229
-                    <RadioButton x:Name="rbnIn" Content="中" FontSize="14" Margin="5,5,0,0"/>
230
-                    <RadioButton x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,5,0,0"/>
226
+                    <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,5,0,0" IsChecked="True" Click="RbnFine_Click"/>
227
+                    <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,5,0,0" Click="RbnIn_Click"/>
228
+                    <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,5,0,0" Click="RbnCrude_Click"/>
231 229
                     <StackPanel Orientation="Horizontal">
232 230
                         <TextBlock Text="摄像头:" FontSize="14" Padding="15,5,0,0"/>
233
-                        <RadioButton x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,5,0,0" Click="RbnOpen_Click"/>
234
-                        <RadioButton x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,5,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
231
+                        <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,5,0,0" Click="RbnOpen_Click"/>
232
+                        <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,5,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
235 233
                     </StackPanel>
236 234
                 </StackPanel>
237 235
                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,5,0">

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

@@ -9,6 +9,7 @@ using System.Windows.Controls;
9 9
 using System.Windows.Data;
10 10
 using System.Windows.Documents;
11 11
 using System.Windows.Forms;
12
+using System.Windows.Ink;
12 13
 using System.Windows.Input;
13 14
 using System.Windows.Media;
14 15
 using System.Windows.Media.Imaging;
@@ -37,13 +38,19 @@ namespace XHWK.WKTool
37 38
         public XHMicroLessonSystemWindow()
38 39
         {
39 40
             InitializeComponent();
41
+            Initialize();
40 42
         }
41 43
         /// <summary>
42 44
         /// 初始化
43 45
         /// </summary>
44 46
         public void Initialize()
45 47
         {
46
-
48
+            //创建 DrawingAttributes 类的一个实例  
49
+            drawingAttributes = new DrawingAttributes();
50
+            //将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用  
51
+            //InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型  
52
+            blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
53
+            drawingAttributes.FitToCurve = true;
47 54
         } 
48 55
         #endregion
49 56
 
@@ -70,7 +77,7 @@ namespace XHWK.WKTool
70 77
 
71 78
 
72 79
 
73
-            gridCamera.Visibility = Visibility.Visible;
80
+            wfhCamera.Visibility = Visibility.Visible;
74 81
             CameraHelper.IsDisplay = true;
75 82
             CameraHelper.SourcePlayer = player;
76 83
             CameraHelper.UpdateCameraDevices();
@@ -86,7 +93,7 @@ namespace XHWK.WKTool
86 93
         /// <param name="e"></param>
87 94
         private void RbnTurnOff_Click(object sender, RoutedEventArgs e)
88 95
         {
89
-            gridCamera.Visibility = Visibility.Hidden;
96
+            wfhCamera.Visibility = Visibility.Hidden;
90 97
             CameraHelper.CloseDevice();
91 98
         }
92 99
         #endregion
@@ -163,5 +170,99 @@ namespace XHWK.WKTool
163 170
                 }
164 171
             }
165 172
         }
173
+        /// <summary>
174
+        /// 画笔颜色事件 白色
175
+        /// </summary>
176
+        /// <param name="sender"></param>
177
+        /// <param name="e"></param>
178
+        private void BtnWhite_Click(object sender, RoutedEventArgs e)
179
+        {
180
+            //创建 DrawingAttributes 类的一个实例  
181
+            drawingAttributes = new DrawingAttributes();
182
+            //将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用  
183
+            //InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型  
184
+            blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
185
+            //设置 DrawingAttributes 的 Color 属性设置颜色  
186
+            drawingAttributes.Color = Colors.White;
187
+        }
188
+        //声明一个 DrawingAttributes 类型的变量  
189
+        DrawingAttributes drawingAttributes;
190
+        /// <summary>
191
+        /// 画笔颜色事件 红色
192
+        /// </summary>
193
+        /// <param name="sender"></param>
194
+        /// <param name="e"></param>
195
+        private void BtnRed_Click(object sender, RoutedEventArgs e)
196
+        {
197
+        
198
+            //设置 DrawingAttributes 的 Color 属性设置颜色  
199
+            drawingAttributes.Color = Colors.Red;
200
+        }
201
+        /// <summary>
202
+        /// 画笔颜色事件 灰色
203
+        /// </summary>
204
+        /// <param name="sender"></param>
205
+        /// <param name="e"></param>
206
+        private void BtnGray_Click(object sender, RoutedEventArgs e)
207
+        {
208
+            drawingAttributes.Color = Colors.Gray;
209
+        }
210
+        /// <summary>
211
+        /// 画笔颜色事件 青色
212
+        /// </summary>
213
+        /// <param name="sender"></param>
214
+        /// <param name="e"></param>
215
+        private void BtnCyanBlue_Click(object sender, RoutedEventArgs e)
216
+        {
217
+            drawingAttributes.Color = Colors.LimeGreen;
218
+        }
219
+        /// <summary>
220
+        /// 画笔颜色事件 黄色
221
+        /// </summary>
222
+        /// <param name="sender"></param>
223
+        /// <param name="e"></param>
224
+        private void BtnYellow_Click(object sender, RoutedEventArgs e)
225
+        {
226
+            drawingAttributes.Color = Colors.Gold;
227
+        }
228
+        /// <summary>
229
+        /// 画笔颜色事件 蓝色
230
+        /// </summary>
231
+        /// <param name="sender"></param>
232
+        /// <param name="e"></param>
233
+        private void BtnBlue_Click(object sender, RoutedEventArgs e)
234
+        {
235
+            drawingAttributes.Color = Colors.DeepSkyBlue;
236
+        }
237
+        /// <summary>
238
+        /// 画笔粗细 细
239
+        /// </summary>
240
+        /// <param name="sender"></param>
241
+        /// <param name="e"></param>
242
+        private void RbnFine_Click(object sender, RoutedEventArgs e)
243
+        {
244
+            drawingAttributes.Width = 1;
245
+            drawingAttributes.Height = 1;
246
+        }
247
+        /// <summary>
248
+        /// 画笔粗细 中
249
+        /// </summary>
250
+        /// <param name="sender"></param>
251
+        /// <param name="e"></param>
252
+        private void RbnIn_Click(object sender, RoutedEventArgs e)
253
+        {
254
+            drawingAttributes.Width = 3;
255
+            drawingAttributes.Height = 3;
256
+        }
257
+        /// <summary>
258
+        /// 画笔粗细 粗
259
+        /// </summary>
260
+        /// <param name="sender"></param>
261
+        /// <param name="e"></param>
262
+        private void RbnCrude_Click(object sender, RoutedEventArgs e)
263
+        {
264
+            drawingAttributes.Width = 5;
265
+            drawingAttributes.Height = 5;
266
+        }
166 267
     }
167 268
 }

Loading…
Cancel
Save