ソースを参照

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

tags/录制修改前
zhangxueyang 4年前
コミット
b93340a8d8
3個のファイルの変更481行の追加284行の削除
  1. 6
    6
      Common/system/FFMpeg.cs
  2. 276
    267
      XHWK.WKTool/XHMicroLessonSystemWindow.xaml
  3. 199
    11
      XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs

+ 6
- 6
Common/system/FFMpeg.cs ファイルの表示

@@ -62,7 +62,7 @@ namespace Common.system
62 62
             myProcess.StartInfo.FileName = FileToolsCommon.GetFileAbsolutePath(@"/ffmpeg/bin/ffmpeg.exe");   //ffmpeg.exe的绝对路径
63 63
             switch (Extension.ToUpper())
64 64
             {
65
-                case "MP4":
65
+                case ".MP4":
66 66
                     if (string.IsNullOrWhiteSpace(MicrophoneName))
67 67
                     {
68 68
                         myProcess.StartInfo.Arguments = "-f dshow -i video=\"screen-capture-recorder\" -f dshow -i audio=\"virtual-audio-capturer\" -vcodec libx264 -acodec libmp3lame -r 15 -crf 22 -f avi " + PathName;  //ffmpeg的参数
@@ -73,8 +73,8 @@ namespace Common.system
73 73
                             MicrophoneName + "\" -filter_complex amix=inputs=2:duration=first:dropout_transition=2 -f dshow -i video=\"screen-capture-recorder\" -pix_fmt yuv420p -vcodec h264 -preset:v ultrafast -tune:v zerolatency -acodec aac -ar 44100 -ac 2 " + PathName;  //ffmpeg的参数
74 74
                     }
75 75
                     break;
76
-                case "AVI":
77
-                case "FLV":
76
+                case ".AVI":
77
+                case ".FLV":
78 78
                     if (string.IsNullOrWhiteSpace(MicrophoneName))
79 79
                     {
80 80
                         myProcess.StartInfo.Arguments = "-f dshow -i video=\"screen-capture-recorder\" -f dshow -i audio=\"virtual-audio-capturer\" -vcodec libx264 -acodec libmp3lame -r 15 -crf 22 -f " + Extension.ToLower() + " " + PathName;  //ffmpeg的参数
@@ -255,19 +255,19 @@ namespace Common.system
255 255
             this.myProcess.StartInfo.FileName = FileToolsCommon.GetFileAbsolutePath(@"/ffmpeg/bin/ffmpeg.exe");   //ffmpeg.exe的绝对路径
256 256
             switch (Extension.ToUpper())
257 257
             {
258
-                case "MP4":
258
+                case ".MP4":
259 259
                     myProcess.StartInfo.Arguments = @"-y -r " + Frequency + " -i " +
260 260
                         ImageListPath + @"%d.png -i " +
261 261
                         Mp3Path + @" -s " + VideoWidth + "x" + VideoHeight + " -vcodec mpeg4 " +
262 262
                         VideoSavePath;
263 263
                     break;
264
-                case "AVI":
264
+                case ".AVI":
265 265
                     myProcess.StartInfo.Arguments = @"-y -r " + Frequency + " -i " +
266 266
                         ImageListPath + @"%d.png -i " +
267 267
                         Mp3Path + @" -s " + VideoWidth + "x" + VideoHeight + " -f AVI " +
268 268
                         VideoSavePath;
269 269
                     break;
270
-                case "FLV":
270
+                case ".FLV":
271 271
                     myProcess.StartInfo.Arguments = @"-y -r " + Frequency + " -i " +
272 272
                         ImageListPath + @"%d.png -i " +
273 273
                         Mp3Path + @" -s " + VideoWidth + "x" + VideoHeight + " -f FLV " +

+ 276
- 267
XHWK.WKTool/XHMicroLessonSystemWindow.xaml ファイルの表示

@@ -9,8 +9,7 @@
9 9
         xmlns:local="clr-namespace:XHWK.WKTool"
10 10
         mc:Ignorable="d"
11 11
         Title="星火微课系统" Height="1040" Width="1276" WindowStartupLocation="CenterScreen"
12
-    WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True" ResizeMode="CanMinimize" 
13
-     BorderThickness="7">
12
+    WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True" ResizeMode="CanMinimize" BorderThickness="7">
14 13
     <Window.Effect>
15 14
         <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
16 15
     </Window.Effect>
@@ -144,118 +143,118 @@
144 143
         <Border Background="#cdcdcd" Height="1040" Width="1280">
145 144
             <Grid x:Name="GridContent" Height="1036" Width="1276">
146 145
 
147
-            <!--分3行-->
148
-            <Grid.RowDefinitions>
149
-                <RowDefinition Height="106"/>
150
-                <RowDefinition Height="*"/>
151
-                <RowDefinition Height="40"/>
152
-            </Grid.RowDefinitions>
153
-            <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0">
146
+                <!--分3行-->
154 147
                 <Grid.RowDefinitions>
155
-                    <RowDefinition Height="auto"/>
156
-                    <RowDefinition Height="auto"/>
148
+                    <RowDefinition Height="106"/>
149
+                    <RowDefinition Height="*"/>
150
+                    <RowDefinition Height="40"/>
157 151
                 </Grid.RowDefinitions>
158
-                <!--第一行-->
159
-                <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10,2,10,0">
160
-                    <Image Source="./Images/microLessonSystem_0.png"/>
161
-                    <TextBlock Text="星火微课系统" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
162
-                </StackPanel>
163
-                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,2,10,0">
164
-                    <Button Cursor="Hand" x:Name="btnLoginType" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnLoginType_Click">
165
-                        <StackPanel Orientation="Horizontal">
166
-                            <Image Source="./Images/microLessonSystem_9.png"/>
167
-                            <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
168
-                        </StackPanel>
169
-                    </Button>
170
-                    <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnShrink_Click" Margin="8,0,8,0">
171
-                        <Image Source="./Images/microLessonSystem_19.png"/>
172
-                    </Button>
173
-                    <!--<Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
152
+                <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0">
153
+                    <Grid.RowDefinitions>
154
+                        <RowDefinition Height="auto"/>
155
+                        <RowDefinition Height="auto"/>
156
+                    </Grid.RowDefinitions>
157
+                    <!--第一行-->
158
+                    <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10,2,10,0">
159
+                        <Image Source="./Images/microLessonSystem_0.png"/>
160
+                        <TextBlock Text="星火微课系统" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
161
+                    </StackPanel>
162
+                    <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,2,10,0">
163
+                        <Button Cursor="Hand" x:Name="btnLoginType" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnLoginType_Click">
164
+                            <StackPanel Orientation="Horizontal">
165
+                                <Image Source="./Images/microLessonSystem_9.png"/>
166
+                                <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
167
+                            </StackPanel>
168
+                        </Button>
169
+                        <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnShrink_Click" Margin="8,0,8,0">
170
+                            <Image Source="./Images/microLessonSystem_19.png"/>
171
+                        </Button>
172
+                        <!--<Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
174 173
                         <Image Source="./Images/microLessonSystem_8.png"/>
175 174
                     </Button>-->
176
-                    <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click" >
177
-                        <Image Source="./Images/microLessonSystem_10.png"/>
178
-                    </Button>
179
-                </StackPanel>
180
-                <!--第二行-->
181
-                <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,6,0,0">
182
-                    <Button Cursor="Hand" x:Name="btnScreenRecording" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnScreenRecording_Click" Margin="30,0,0,0">
183
-                        <StackPanel Orientation="Vertical">
184
-                            <Image x:Name="ImgScreenRecording" Source="./Images/microLessonSystem_2.png"/>
185
-                            <Image x:Name="ImgScreenRecordingTwo" Source="./Images/microLessonSystem_3.png" Visibility="Collapsed"/>
186
-                            <TextBlock x:Name="TxbRecordScreenWord" Text="录屏" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
187
-                        </StackPanel>
188
-                    </Button>
189
-                    <Button Cursor="Hand" x:Name="btnScreenshot" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,0,0" Click="BtnScreenshot_Click">
190
-                        <StackPanel Orientation="Vertical">
191
-                            <Image x:Name="ImgScreenshot" Source="./Images/microLessonSystem_12.png"/>
192
-                            <Image x:Name="ImgScreenshotTwo" Source="./Images/microLessonSystem_11.png" Visibility="Collapsed"/>
193
-                            <TextBlock Text="截图" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
194
-                        </StackPanel>
195
-                    </Button>
196
-                    <Button Cursor="Hand" x:Name="btnImport" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnImport_Click" Margin="30,0,0,0">
197
-                        <StackPanel Orientation="Vertical">
198
-                            <Image x:Name="ImgImport" Source="./Images/microLessonSystem_6.png"/>
199
-                            <Image x:Name="ImgImportTwo" Source="./Images/microLessonSystem_7.png" Visibility="Collapsed"/>
200
-                            <TextBlock Text="导入" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
201
-                        </StackPanel>
202
-                    </Button>
203
-                    <Button Cursor="Hand" x:Name="BtnRecord" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="100,0,0,0" Click="BtnRecord_Click">
204
-                        <StackPanel Orientation="Vertical">
205
-                            <Image x:Name="ImgRecord" Source="./Images/microLessonSystem_14.png"/>
206
-                            <Image x:Name="ImgRecordTwo" Source="./Images/microLessonSystem_13.png" Visibility="Collapsed"/>
207
-                            <TextBlock x:Name="TxbRecordingWord" Text="录制" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
208
-                        </StackPanel>
209
-                    </Button>
210
-                    <Button Cursor="Hand" x:Name="btnStop" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnStop_Click" Margin="30,0,0,0">
211
-                        <StackPanel Orientation="Vertical">
212
-                            <Image x:Name="ImgStop" Source="./Images/microLessonSystem_21.png"/>
213
-                            <Image x:Name="ImgStopTwo" Source="./Images/microLessonSystem_20.png" Visibility="Collapsed"/>
214
-                            <TextBlock Text="停止" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
215
-                        </StackPanel>
216
-                    </Button>
175
+                        <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click" >
176
+                            <Image Source="./Images/microLessonSystem_10.png"/>
177
+                        </Button>
178
+                    </StackPanel>
179
+                    <!--第二行-->
180
+                    <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,6,0,0">
181
+                        <Button Cursor="Hand" x:Name="btnScreenRecording" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnScreenRecording_Click" Margin="30,0,0,0">
182
+                            <StackPanel Orientation="Vertical">
183
+                                <Image x:Name="ImgScreenRecording" Source="./Images/microLessonSystem_2.png"/>
184
+                                <Image x:Name="ImgScreenRecordingTwo" Source="./Images/microLessonSystem_3.png" Visibility="Collapsed"/>
185
+                                <TextBlock x:Name="TxbRecordScreenWord" Text="录屏" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
186
+                            </StackPanel>
187
+                        </Button>
188
+                        <Button Cursor="Hand" x:Name="btnScreenshot" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,0,0" Click="BtnScreenshot_Click">
189
+                            <StackPanel Orientation="Vertical">
190
+                                <Image x:Name="ImgScreenshot" Source="./Images/microLessonSystem_12.png"/>
191
+                                <Image x:Name="ImgScreenshotTwo" Source="./Images/microLessonSystem_11.png" Visibility="Collapsed"/>
192
+                                <TextBlock Text="截图" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
193
+                            </StackPanel>
194
+                        </Button>
195
+                        <Button Cursor="Hand" x:Name="btnImport" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnImport_Click" Margin="30,0,0,0">
196
+                            <StackPanel Orientation="Vertical">
197
+                                <Image x:Name="ImgImport" Source="./Images/microLessonSystem_6.png"/>
198
+                                <Image x:Name="ImgImportTwo" Source="./Images/microLessonSystem_7.png" Visibility="Collapsed"/>
199
+                                <TextBlock Text="导入" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
200
+                            </StackPanel>
201
+                        </Button>
202
+                        <Button Cursor="Hand" x:Name="BtnRecord" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="100,0,0,0" Click="BtnRecord_Click">
203
+                            <StackPanel Orientation="Vertical">
204
+                                <Image x:Name="ImgRecord" Source="./Images/microLessonSystem_14.png"/>
205
+                                <Image x:Name="ImgRecordTwo" Source="./Images/microLessonSystem_13.png" Visibility="Collapsed"/>
206
+                                <TextBlock x:Name="TxbRecordingWord" Text="录制" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
207
+                            </StackPanel>
208
+                        </Button>
209
+                        <Button Cursor="Hand" x:Name="btnStop" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnStop_Click" Margin="30,0,0,0">
210
+                            <StackPanel Orientation="Vertical">
211
+                                <Image x:Name="ImgStop" Source="./Images/microLessonSystem_21.png"/>
212
+                                <Image x:Name="ImgStopTwo" Source="./Images/microLessonSystem_20.png" Visibility="Collapsed"/>
213
+                                <TextBlock Text="停止" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
214
+                            </StackPanel>
215
+                        </Button>
217 216
                         <TextBlock x:Name="txbTime" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
218 217
                         <TextBlock x:Name="txbType" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
219
-                </StackPanel>
220
-                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
221
-                    <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click" Margin="0,0,30,0">
222
-                        <StackPanel Orientation="Vertical">
223
-                            <Image x:Name="ImgAdd" Source="./Images/microLessonSystem_25.png" Visibility="Visible"/>
224
-                            <Image x:Name="ImgAddTwo" Source="./Images/microLessonSystem_24.png" Visibility="Collapsed"/>
225
-                            <TextBlock Text="增加" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
226
-                        </StackPanel>
227
-                    </Button>
228
-                    <Button Cursor="Hand" x:Name="btnPrint" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnPrint_Click">
229
-                        <StackPanel Orientation="Vertical">
230
-                            <Image x:Name="ImgPrint" Source="./Images/microLessonSystem_4.png" Visibility="Collapsed"/>
231
-                            <Image x:Name="ImgPrintTwo" Source="./Images/microLessonSystem_5.png" Visibility="Visible"/>
232
-                            <TextBlock Text="打印" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
233
-                        </StackPanel>
234
-                    </Button>
235
-                    <!--<Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click" Margin="0,0,30,0">
218
+                    </StackPanel>
219
+                    <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
220
+                        <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click" Margin="0,0,30,0">
221
+                            <StackPanel Orientation="Vertical">
222
+                                <Image x:Name="ImgAdd" Source="./Images/microLessonSystem_25.png" Visibility="Visible"/>
223
+                                <Image x:Name="ImgAddTwo" Source="./Images/microLessonSystem_24.png" Visibility="Collapsed"/>
224
+                                <TextBlock Text="增加" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
225
+                            </StackPanel>
226
+                        </Button>
227
+                        <Button Cursor="Hand" x:Name="btnPrint" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnPrint_Click">
228
+                            <StackPanel Orientation="Vertical">
229
+                                <Image x:Name="ImgPrint" Source="./Images/microLessonSystem_4.png" Visibility="Collapsed"/>
230
+                                <Image x:Name="ImgPrintTwo" Source="./Images/microLessonSystem_5.png" Visibility="Visible"/>
231
+                                <TextBlock Text="打印" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
232
+                            </StackPanel>
233
+                        </Button>
234
+                        <!--<Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click" Margin="0,0,30,0">
236 235
                         <StackPanel Orientation="Vertical">
237 236
                             <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_15.png" Visibility="Collapsed"/>
238 237
                             <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_16.png" Visibility="Visible"/>
239 238
                             <TextBlock Text="上传" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
240 239
                         </StackPanel>
241 240
                     </Button>-->
242
-                    <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnUpload_Click">
243
-                        <StackPanel Orientation="Vertical">
244
-                            <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_22.png" Visibility="Collapsed"/>
245
-                            <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_1.png" Visibility="Visible"/>
246
-                            <TextBlock Text="我的" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
247
-                        </StackPanel>
248
-                    </Button>
249
-                    <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnSetUp_Click">
250
-                        <StackPanel Orientation="Vertical">
251
-                            <Image x:Name="ImgSetUp" Source="./Images/microLessonSystem_18.png" Visibility="Visible"/>
252
-                            <Image x:Name="ImgSetUpTwo" Source="./Images/microLessonSystem_17.png" Visibility="Collapsed"/>
253
-                            <TextBlock Text="设置" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
254
-                        </StackPanel>
255
-                    </Button>
256
-                </StackPanel>
257
-            </Grid>
258
-            <!--主内容-->
241
+                        <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnUpload_Click">
242
+                            <StackPanel Orientation="Vertical">
243
+                                <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_22.png" Visibility="Collapsed"/>
244
+                                <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_1.png" Visibility="Visible"/>
245
+                                <TextBlock Text="我的" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
246
+                            </StackPanel>
247
+                        </Button>
248
+                        <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnSetUp_Click">
249
+                            <StackPanel Orientation="Vertical">
250
+                                <Image x:Name="ImgSetUp" Source="./Images/microLessonSystem_18.png" Visibility="Visible"/>
251
+                                <Image x:Name="ImgSetUpTwo" Source="./Images/microLessonSystem_17.png" Visibility="Collapsed"/>
252
+                                <TextBlock Text="设置" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
253
+                            </StackPanel>
254
+                        </Button>
255
+                    </StackPanel>
256
+                </Grid>
257
+                <!--主内容-->
259 258
                 <Grid Grid.Row="1" x:Name="GridMain" Width="1276" Visibility="Visible">
260 259
                     <ScrollViewer x:Name="scroMain" VerticalScrollBarVisibility="Visible">
261 260
                         <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Visibility="Visible" Height="1780">
@@ -269,23 +268,33 @@
269 268
                                             </TransformGroup>
270 269
                                         </Grid.Resources>
271 270
 
272
-                                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
271
+                                        <!--<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
273 272
                   Margin="0,0,0,0" Focusable="False" x:Name="BackFrame">
274 273
                                             <ContentControl  MouseLeftButtonDown="IMG1_MouseLeftButtonDown"   
275 274
                              MouseLeftButtonUp="IMG1_MouseLeftButtonUp"
276 275
                              MouseMove="IMG1_MouseMove"
277 276
                              MouseWheel="IMG1_MouseWheel" >
278
-                                                <Image Name="imgCanvas" Width="635" Height="auto" VerticalAlignment="Top" HorizontalAlignment="Left" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}" MouseRightButtonDown="imgCanvas_MouseRightButtonDown">
279
-                                                </Image>
280 277
                                             </ContentControl>
281
-                                        </ScrollViewer>
278
+                                        </ScrollViewer>-->
279
+                                        <!--图片表框 -->
280
+                                        <Rectangle x:Name="RectImgBorder" Cursor="SizeAll" Fill="#00000000" HorizontalAlignment="Left" Stroke="#2D8CF0" VerticalAlignment="Top" Width="300" Height="300" Visibility="Hidden" Margin="373,175,0,0" StrokeThickness="4" StrokeDashArray="4 4" SnapsToDevicePixels="True"/>
281
+                                        <Image Name="imgCanvas" Height="0" VerticalAlignment="Top" HorizontalAlignment="Left" Stretch="Fill" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}" MouseRightButtonDown="imgCanvas_MouseRightButtonDown" Focusable="True" MouseMove="imgCanvas_MouseMove" MouseUp="imgCanvas_MouseUp"/>
282
+                                        <!--四个点 -->
283
+                                        <Canvas>
284
+                                            <Thumb x:Name="RectLeftUp" Cursor="SizeNWSE"  HorizontalAlignment="Left" Height="20"  VerticalAlignment="Top" Width="20" Visibility="Hidden" Canvas.Left="314" Canvas.Top="157" Background="White" BorderBrush="#2D8CF0" BorderThickness="2"  DragDelta="RectRightUp_DragDelta" DragStarted="RectRightUp_DragStarted" DragCompleted="RectRightUp_DragCompleted"/>
285
+                                            <Thumb x:Name="RectRightUp" Cursor="SizeNESW"  HorizontalAlignment="Left" Height="20"  VerticalAlignment="Top" Width="20" Visibility="Hidden" Canvas.Left="775" Canvas.Top="157" Background="White" BorderBrush="#2D8CF0" BorderThickness="2" DragDelta="RectRightUp_DragDelta" DragStarted="RectRightUp_DragStarted" DragCompleted="RectRightUp_DragCompleted"/>
286
+                                            <Thumb x:Name="RectLeftDown" Cursor="SizeNESW"  HorizontalAlignment="Left" Height="20"  VerticalAlignment="Top" Width="20" Visibility="Hidden" Canvas.Left="314" Canvas.Top="508" Background="White" BorderBrush="#2D8CF0" BorderThickness="2" DragDelta="RectRightUp_DragDelta" DragStarted="RectRightUp_DragStarted" DragCompleted="RectRightUp_DragCompleted"/>
287
+                                            <Thumb x:Name="RectRightDown" Cursor="SizeNWSE"  HorizontalAlignment="Left" Height="20"  VerticalAlignment="Top" Width="20" Visibility="Hidden" Canvas.Left="775" Canvas.Top="508" Background="White" BorderBrush="#2D8CF0" BorderThickness="2" DragDelta="RectRightUp_DragDelta" DragStarted="RectRightUp_DragStarted" DragCompleted="RectRightUp_DragCompleted"/>
288
+                                        </Canvas>
282 289
                                     </Grid>
283 290
                                 </Border>
284 291
                             </Grid>
285 292
                             <!--导入图片-->
286
-                            <Image x:Name="imgDocumentation" Visibility="Visible"/>
287 293
                             <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
288 294
                             <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
295
+                            
296
+                            <Image x:Name="imgDocumentation" Visibility="Visible" Width="0" Height="0" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="472,246,0,0" />
297
+
289 298
                             <!--摄像头-->
290 299
                             <!--<wfi:WindowsFormsHost Grid.Row="0" Grid.Column="1" x:Name="wfhCamera" Height="124" Width="172" HorizontalAlignment="Right" Margin="0,10,30.10,0" VerticalAlignment="Top">
291 300
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
@@ -309,90 +318,116 @@
309 318
                 <Grid Grid.Row="1" x:Name="gridPage" Visibility="Collapsed">
310 319
                     <StackPanel Grid.Row="0" Orientation="Horizontal" Background="Transparent" Width="180" HorizontalAlignment="Center"
311 320
             Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
312
-                    <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
321
+                        <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
313 322
                     x:Name="last_button"
314 323
                     Width="60" Height="20"
315 324
                     Click="last_button_Click">
316
-                        <Button.Content>
325
+                            <Button.Content>
317 326
                             <StackPanel>
318 327
                                 <Image Width="16" Height="12" Source=".\Images\class_p1.png" />
319 328
                             </StackPanel>
320
-                        </Button.Content>
321
-                    </Button>
322
-                    <Grid Width="60"  Background="Transparent">
323
-                        <Grid.RowDefinitions>
324
-                            <RowDefinition Height="311*"/>
325
-                            <RowDefinition Height="483*"/>
326
-                        </Grid.RowDefinitions>
327
-                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-12,0,0" Grid.Row="1"  Background="Transparent">
328
-                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
329
-                                <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15"/>
330
-                                <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
329
+                            </Button.Content>
330
+                        </Button>
331
+                        <Grid Width="60"  Background="Transparent">
332
+                            <Grid.RowDefinitions>
333
+                                <RowDefinition Height="311*"/>
334
+                                <RowDefinition Height="483*"/>
335
+                            </Grid.RowDefinitions>
336
+                            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-12,0,0" Grid.Row="1"  Background="Transparent">
337
+                                <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
338
+                                    <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15"/>
339
+                                    <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
331 340
                                     <TextBlock Text="{Binding pagenum}" TextAlignment="Center" FontSize="15"/>
341
+                                </StackPanel>
332 342
                             </StackPanel>
333
-                        </StackPanel>
334
-                    </Grid>
335
-                    <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
343
+                        </Grid>
344
+                        <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
336 345
                     x:Name="next_btn"  Background="Transparent"
337 346
                     Width="60" Height="20"
338 347
                     Click="next_btn_Click">
339
-                        <Button.Content>
340
-                            <StackPanel>
341
-                                <Image Width="16" Height="12" Source=".\Images\class_p2.png" />
342
-                            </StackPanel>
343
-                        </Button.Content>
344
-                    </Button>
345
-                </StackPanel>
346
-            </Grid>
347
-            <!--设置-->
348
-            <Grid Grid.Row="1" x:Name="gridSetUp"  Background="#FFFFFF" Visibility="Collapsed" Width="1276">
349
-                <Grid.RowDefinitions>
350
-                    <RowDefinition Height="90"/>
351
-                    <RowDefinition Height="70"/>
352
-                    <RowDefinition Height="50"/>
353
-                    <RowDefinition Height="70"/>
354
-                    <RowDefinition Height="70"/>
355
-                    <RowDefinition Height="70"/>
356
-                    <RowDefinition Height="70"/>
357
-                    <RowDefinition Height="*"/>
358
-                </Grid.RowDefinitions>
359
-                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
360
-                    <TextBlock Text="   点阵笔" FontSize="16" Foreground="#2D8CF0" Width="80"/>
361
-                    <TextBlock x:Name="txbNotConnecteds"  Text="未连接" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
362
-                </StackPanel>
363
-                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
364
-                    <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0" Width="80"/>
365
-                    <RadioButton x:Name="rbnMP4" Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
366
-                    <RadioButton x:Name="rbnFLV" Cursor="Hand" Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
367
-                    <RadioButton x:Name="rbnAVI" Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
368
-                </StackPanel>
369
-                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
370
-                    <TextBlock Text="头像位置" FontSize="16" Foreground="#2D8CF0" Width="80"/>
371
-                    <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
372
-                    <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
373
-                    <RadioButton Cursor="Hand" x:Name="rbnLeft" Content="左上" FontSize="14" Foreground="#333333" Margin="20,2,0,0" />
374
-                    <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
375
-                </StackPanel>
376
-                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0" Visibility="Collapsed">
377
-                    <TextBlock Text="视频声音" FontSize="16" Foreground="#2D8CF0" Width="80"/>
378
-                    <RadioButton x:Name="rbnY" Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
379
-                    <RadioButton x:Name="rbnN" Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
380
-                </StackPanel>
381
-                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
382
-                    <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Width="80"  Foreground="#2D8CF0" Padding="2,26,10,0"/>
383
-                    <!--输入框-->
384
-                    <Border Background="#CDD6E0" Width="525" Height="43" CornerRadius="3">
385
-                        <Label x:Name="txbStoragePath" Background="#FFFFFF" Content="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="523" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
386
-                    </Border>
387
-                    <!--浏览按钮-->
388
-                    <Button Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
348
+                            <Button.Content>
349
+                                <StackPanel>
350
+                                    <Image Width="16" Height="12" Source=".\Images\class_p2.png" />
351
+                                </StackPanel>
352
+                            </Button.Content>
353
+                        </Button>
354
+                    </StackPanel>
355
+                </Grid>
356
+                <!--设置-->
357
+                <Grid Grid.Row="1" x:Name="gridSetUp"  Background="#FFFFFF" Visibility="Collapsed" Width="1276">
358
+                    <Grid.RowDefinitions>
359
+                        <RowDefinition Height="90"/>
360
+                        <RowDefinition Height="70"/>
361
+                        <RowDefinition Height="50"/>
362
+                        <RowDefinition Height="70"/>
363
+                        <RowDefinition Height="70"/>
364
+                        <RowDefinition Height="70"/>
365
+                        <RowDefinition Height="70"/>
366
+                        <RowDefinition Height="*"/>
367
+                    </Grid.RowDefinitions>
368
+                    <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
369
+                        <TextBlock Text="   点阵笔" FontSize="16" Foreground="#2D8CF0" Width="80"/>
370
+                        <TextBlock x:Name="txbNotConnecteds"  Text="未连接" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
371
+                    </StackPanel>
372
+                    <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
373
+                        <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0" Width="80"/>
374
+                        <RadioButton x:Name="rbnMP4" Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
375
+                        <RadioButton x:Name="rbnFLV" Cursor="Hand" Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
376
+                        <RadioButton x:Name="rbnAVI" Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
377
+                    </StackPanel>
378
+                    <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
379
+                        <TextBlock Text="头像位置" FontSize="16" Foreground="#2D8CF0" Width="80"/>
380
+                        <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
381
+                        <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
382
+                        <RadioButton Cursor="Hand" x:Name="rbnLeft" Content="左上" FontSize="14" Foreground="#333333" Margin="20,2,0,0" />
383
+                        <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
384
+                    </StackPanel>
385
+                    <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0" Visibility="Collapsed">
386
+                        <TextBlock Text="视频声音" FontSize="16" Foreground="#2D8CF0" Width="80"/>
387
+                        <RadioButton x:Name="rbnY" Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
388
+                        <RadioButton x:Name="rbnN" Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
389
+                    </StackPanel>
390
+                    <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
391
+                        <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Width="80"  Foreground="#2D8CF0" Padding="2,26,10,0"/>
392
+                        <!--输入框-->
393
+                        <Border Background="#CDD6E0" Width="525" Height="43" CornerRadius="3">
394
+                            <Label x:Name="txbStoragePath" Background="#FFFFFF" Content="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="523" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
395
+                        </Border>
396
+                        <!--浏览按钮-->
397
+                        <Button Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
398
+                            <Button.Template>
399
+                                <ControlTemplate TargetType="{x:Type Button}">
400
+                                    <Border
401
+                                BorderBrush="{TemplateBinding Control.BorderBrush}"
402
+                                BorderThickness="1"
403
+                                CornerRadius="2">
404
+                                        <Border.Background>#EBEFF3</Border.Background>
405
+                                        <ContentPresenter
406
+                                    HorizontalAlignment="Center"
407
+                                    VerticalAlignment="Center"
408
+                                    Content="{TemplateBinding ContentControl.Content}" />
409
+                                    </Border>
410
+                                </ControlTemplate>
411
+                            </Button.Template>
412
+                        </Button>
413
+                    </StackPanel>
414
+                    <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
415
+                        <TextBlock Text="    版本号" FontSize="16" Width="80" Foreground="#2D8CF0"/>
416
+                        <TextBlock x:Name="txbv" Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
417
+                    </StackPanel>
418
+                    <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
419
+                        <TextBlock Text="版权所有" FontSize="16" Width="80" Foreground="#2D8CF0"/>
420
+                        <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
421
+                    </StackPanel>
422
+                    <!--第四行 开始按钮-->
423
+                    <Button Cursor="Hand" Grid.Row="6" 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">
389 424
                         <Button.Template>
390 425
                             <ControlTemplate TargetType="{x:Type Button}">
391 426
                                 <Border
392 427
                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
393 428
                                 BorderThickness="1"
394 429
                                 CornerRadius="2">
395
-                                        <Border.Background>#EBEFF3</Border.Background>
430
+                                    <Border.Background>#2D8CF0</Border.Background>
396 431
                                     <ContentPresenter
397 432
                                     HorizontalAlignment="Center"
398 433
                                     VerticalAlignment="Center"
@@ -401,86 +436,60 @@
401 436
                             </ControlTemplate>
402 437
                         </Button.Template>
403 438
                     </Button>
404
-                </StackPanel>
405
-                <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
406
-                    <TextBlock Text="    版本号" FontSize="16" Width="80" Foreground="#2D8CF0"/>
407
-                    <TextBlock x:Name="txbv" Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
408
-                </StackPanel>
409
-                <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
410
-                    <TextBlock Text="版权所有" FontSize="16" Width="80" Foreground="#2D8CF0"/>
411
-                    <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
412
-                </StackPanel>
413
-                <!--第四行 开始按钮-->
414
-                <Button Cursor="Hand" Grid.Row="6" 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">
415
-                    <Button.Template>
416
-                        <ControlTemplate TargetType="{x:Type Button}">
417
-                            <Border
418
-                                BorderBrush="{TemplateBinding Control.BorderBrush}"
419
-                                BorderThickness="1"
420
-                                CornerRadius="2">
421
-                                <Border.Background>#2D8CF0</Border.Background>
422
-                                <ContentPresenter
423
-                                    HorizontalAlignment="Center"
424
-                                    VerticalAlignment="Center"
425
-                                    Content="{TemplateBinding ContentControl.Content}" />
426
-                            </Border>
427
-                        </ControlTemplate>
428
-                    </Button.Template>
429
-                </Button>
430
-            </Grid>
439
+                </Grid>
431 440
                 <!--上传-->
432 441
                 <Grid Grid.Row="1" x:Name="gridUpload" Visibility="Collapsed">
433 442
                     <Border Width="1276" Background="#EFF1F8">
434 443
                         <Grid  Width="1236" Background="#FFFFFF" Margin="0,0,0,0">
435
-                        <!--分4行-->
436
-                        <Grid.RowDefinitions>
437
-                            <RowDefinition Height="*"/>
438
-                                <RowDefinition Height="30"/>
439
-                            </Grid.RowDefinitions>
440
-                        <!--第二行 内容-->
441
-                        <Grid Grid.Row="0" Margin="0,0,0,0">
444
+                            <!--分4行-->
442 445
                             <Grid.RowDefinitions>
443
-                                <RowDefinition Height="45"/>
444 446
                                 <RowDefinition Height="*"/>
447
+                                <RowDefinition Height="30"/>
445 448
                             </Grid.RowDefinitions>
446
-                            <UniformGrid x:Name="uniStatisticsByTitle"
449
+                            <!--第二行 内容-->
450
+                            <Grid Grid.Row="0" Margin="0,0,0,0">
451
+                                <Grid.RowDefinitions>
452
+                                    <RowDefinition Height="45"/>
453
+                                    <RowDefinition Height="*"/>
454
+                                </Grid.RowDefinitions>
455
+                                <UniformGrid x:Name="uniStatisticsByTitle"
447 456
                 Grid.Row="0"
448 457
                 Margin="0,0,0,0"
449 458
                 Background="#E6F0FF"
450 459
                 Columns="5"
451 460
                 Rows="1">
452
-                                <TextBlock
461
+                                    <TextBlock
453 462
                     HorizontalAlignment="Center"
454 463
                     VerticalAlignment="Center"
455 464
                     FontSize="16"
456 465
                     Text="序号"  />
457
-                                <TextBlock
466
+                                    <TextBlock
458 467
                     HorizontalAlignment="Center"
459 468
                     VerticalAlignment="Center"
460 469
                     FontSize="16"
461 470
                     Text="视频名称"/>
462
-                                <!--<TextBlock
471
+                                    <!--<TextBlock
463 472
                     HorizontalAlignment="Center"
464 473
                     VerticalAlignment="Center"
465 474
                     FontSize="15"
466 475
                     Text="视频时长" Foreground="White" />-->
467
-                                <TextBlock
476
+                                    <TextBlock
468 477
                     HorizontalAlignment="Center"
469 478
                     VerticalAlignment="Center"
470 479
                     FontSize="16"
471 480
                     Text="视频大小"/>
472
-                                <TextBlock
481
+                                    <TextBlock
473 482
                     HorizontalAlignment="Center"
474 483
                     VerticalAlignment="Center"
475 484
                     FontSize="16"
476 485
                     Text="日期"/>
477
-                                <TextBlock
486
+                                    <TextBlock
478 487
                     HorizontalAlignment="Center"
479 488
                     VerticalAlignment="Center"
480 489
                     FontSize="16"
481 490
                     Text="操作"/>
482
-                            </UniformGrid>
483
-                            <ListBox Grid.Row="1" Margin="0,0,0,0"
491
+                                </UniformGrid>
492
+                                <ListBox Grid.Row="1" Margin="0,0,0,0"
484 493
                     x:Name="listView1"
485 494
                     BorderThickness="0"
486 495
                     FontSize="20"
@@ -489,53 +498,53 @@
489 498
                     ItemsSource="{Binding menuList}" 
490 499
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
491 500
                                 ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
492
-                        </Grid>
493
-                        <StackPanel Grid.Row="3" x:Name="stpUp" Orientation="Horizontal" Background="Transparent" Width="180" HorizontalAlignment="Center"
501
+                            </Grid>
502
+                            <StackPanel Grid.Row="3" x:Name="stpUp" Orientation="Horizontal" Background="Transparent" Width="180" HorizontalAlignment="Center"
494 503
             Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
495
-                            <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
504
+                                <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
496 505
                     x:Name="btnLastPage"
497 506
                     Width="60" Height="20"
498 507
                     Click="BtnLastPage_Click">
499
-                                <Button.Content>
500
-                                    <StackPanel>
501
-                                        <Image Width="16" Height="12" Source=".\Images\class_p1.png" />
502
-                                    </StackPanel>
503
-                                </Button.Content>
504
-                            </Button>
505
-                            <Grid Width="60"  Background="Transparent">
506
-                                <Grid.RowDefinitions>
507
-                                    <RowDefinition Height="311*"/>
508
-                                    <RowDefinition Height="483*"/>
509
-                                </Grid.RowDefinitions>
510
-                                <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-12,0,0" Grid.Row="1"  Background="Transparent">
511
-                                    <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
512
-                                        <TextBlock x:Name="txbCurrpageTwo" TextAlignment="Center" FontSize="15"/>
513
-                                        <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
514
-                                        <TextBlock x:Name="txbPageNumTwo" TextAlignment="Center" FontSize="15"/>
508
+                                    <Button.Content>
509
+                                        <StackPanel>
510
+                                            <Image Width="16" Height="12" Source=".\Images\class_p1.png" />
511
+                                        </StackPanel>
512
+                                    </Button.Content>
513
+                                </Button>
514
+                                <Grid Width="60"  Background="Transparent">
515
+                                    <Grid.RowDefinitions>
516
+                                        <RowDefinition Height="311*"/>
517
+                                        <RowDefinition Height="483*"/>
518
+                                    </Grid.RowDefinitions>
519
+                                    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-12,0,0" Grid.Row="1"  Background="Transparent">
520
+                                        <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
521
+                                            <TextBlock x:Name="txbCurrpageTwo" TextAlignment="Center" FontSize="15"/>
522
+                                            <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
523
+                                            <TextBlock x:Name="txbPageNumTwo" TextAlignment="Center" FontSize="15"/>
524
+                                        </StackPanel>
515 525
                                     </StackPanel>
516
-                                </StackPanel>
517
-                            </Grid>
518
-                            <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
526
+                                </Grid>
527
+                                <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
519 528
                     x:Name="btnNextPage"  Background="Transparent"
520 529
                     Width="60" Height="20"
521 530
                     Click="BtnNextPage_Click">
522
-                                <Button.Content>
523
-                                    <StackPanel>
524
-                                        <Image Width="16" Height="12" Source=".\Images\class_p2.png" />
525
-                                    </StackPanel>
526
-                                </Button.Content>
527
-                            </Button>
528
-                        </StackPanel>
531
+                                    <Button.Content>
532
+                                        <StackPanel>
533
+                                            <Image Width="16" Height="12" Source=".\Images\class_p2.png" />
534
+                                        </StackPanel>
535
+                                    </Button.Content>
536
+                                </Button>
537
+                            </StackPanel>
529 538
 
530
-                    </Grid>
539
+                        </Grid>
531 540
                     </Border>
532 541
                 </Grid>
533
-            <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
534
-                <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
535
-                    <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
536
-                    <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
542
+                <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
543
+                    <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
544
+                        <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
545
+                        <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
546
+
537 547
 
538
-                    
539 548
                         <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click">
540 549
                             <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
541 550
                         </Button>
@@ -551,22 +560,22 @@
551 560
                         <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click">
552 561
                             <Image x:Name="imgBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
553 562
                         </Button>
554
-                    <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
555
-                    <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,10,0,0" IsChecked="True" Click="RbnFine_Click"/>
556
-                    <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,10,0,0" Click="RbnIn_Click"/>
557
-                    <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,10,0,0" Click="RbnCrude_Click"/>
558
-                    <StackPanel Orientation="Horizontal">
559
-                        <TextBlock Text="摄像头:" FontSize="14" Padding="15,10,0,0"/>
560
-                        <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,10,0,0" Click="RbnOpen_Click"/>
561
-                        <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,10,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
563
+                        <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
564
+                        <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,10,0,0" IsChecked="True" Click="RbnFine_Click"/>
565
+                        <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,10,0,0" Click="RbnIn_Click"/>
566
+                        <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,10,0,0" Click="RbnCrude_Click"/>
567
+                        <StackPanel Orientation="Horizontal">
568
+                            <TextBlock Text="摄像头:" FontSize="14" Padding="15,10,0,0"/>
569
+                            <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,10,0,0" Click="RbnOpen_Click"/>
570
+                            <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,10,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
571
+                        </StackPanel>
572
+                    </StackPanel>
573
+                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,10,0">
574
+                        <TextBlock Text="智能笔状态:" FontSize="14" Padding="0,5,0,0"/>
575
+                        <TextBlock x:Name="txbNotConnected" Text="未连接" FontSize="14" Padding="0,5,5,0"/>
562 576
                     </StackPanel>
563
-                </StackPanel>
564
-                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,10,0">
565
-                    <TextBlock Text="智能笔状态:" FontSize="14" Padding="0,5,0,0"/>
566
-                    <TextBlock x:Name="txbNotConnected" Text="未连接" FontSize="14" Padding="0,5,5,0"/>
567
-                </StackPanel>
577
+                </Grid>
568 578
             </Grid>
569
-        </Grid>
570 579
         </Border>
571 580
     </Viewbox>
572 581
 </Window>

+ 199
- 11
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs ファイルの表示

@@ -25,6 +25,8 @@ using System.Collections.Specialized;
25 25
 using XHWK.WKTool.Config;
26 26
 using System.Windows.Threading;
27 27
 using System.Diagnostics;
28
+using System.Runtime.InteropServices;
29
+using System.Windows.Controls.Primitives;
28 30
 
29 31
 namespace XHWK.WKTool
30 32
 {
@@ -946,7 +948,10 @@ namespace XHWK.WKTool
946 948
                     if (APP.PageDrawList.Count >= APP.pageData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
947 949
                     {
948 950
                         imgDocumentation.Source = null;
949
-                        imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
951
+                        BitmapImage bitImg=new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
952
+                        imgCanvas.Source = bitImg;
953
+                        imgCanvas.Width = bitImg.Width;
954
+                        imgCanvas.Height = bitImg.Height;
950 955
                         APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation = false;
951 956
                         ImgPrint.Visibility = Visibility.Visible;//截图成功可打印
952 957
                         ImgPrintTwo.Visibility = Visibility.Collapsed;
@@ -1272,7 +1277,10 @@ namespace XHWK.WKTool
1272 1277
                 MessageWindow.Show("请先导入文档或截图!");
1273 1278
                 return;
1274 1279
             }
1275
-
1280
+            if (RectImgBorder.Visibility != Visibility.Hidden)
1281
+            {
1282
+                HideAngleBorder();
1283
+            }
1276 1284
             //btnStop.IsEnabled = true;//停止录制按钮可点击
1277 1285
             StartRecord();
1278 1286
         }
@@ -2123,15 +2131,6 @@ namespace XHWK.WKTool
2123 2131
             Console.WriteLine("mouseXY.X = " + mouseXY.X + "; mouseXY.Y = " + mouseXY.Y);
2124 2132
 
2125 2133
         }
2126
-        private void PicEMap_MouseDown(object sender, MouseButtonEventArgs e)
2127
-        {
2128
-            System.Windows.Point point = e.GetPosition(imgCanvas);
2129
-            //Console.WriteLine("PicEmap.X = " + point.X + "; PicEmap.Y = " + point.Y);
2130
-            //if ((point.X - 304) * (point.X - 304) + (point.Y - 86) * (point.Y - 86) < 100) 
2131
-            //{
2132
-            //    Console.WriteLine("在范围内");
2133
-            //}
2134
-        }
2135 2134
         private void IMG1_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
2136 2135
         {
2137 2136
             var img = sender as ContentControl;
@@ -3211,5 +3210,194 @@ namespace XHWK.WKTool
3211 3210
             }    
3212 3211
         }
3213 3212
         #endregion
3213
+
3214
+        #region 图片拉伸移动
3215
+        /// <summary>
3216
+        /// 隐藏图片四个点和线
3217
+        /// </summary>
3218
+        void HideAngleBorder()
3219
+        {
3220
+            RectLeftUp.Visibility = Visibility.Hidden;
3221
+            RectRightUp.Visibility = Visibility.Hidden;
3222
+            RectLeftDown.Visibility = Visibility.Hidden;
3223
+            RectRightDown.Visibility = Visibility.Hidden;
3224
+            RectImgBorder.Visibility = Visibility.Hidden;
3225
+        }
3226
+        void ShowAngleBorder()
3227
+        {
3228
+            PointLocation();
3229
+            RectLeftUp.Visibility = Visibility.Visible;
3230
+            RectRightUp.Visibility = Visibility.Visible;
3231
+            RectLeftDown.Visibility = Visibility.Visible;
3232
+            RectRightDown.Visibility = Visibility.Visible;
3233
+            RectImgBorder.Visibility = Visibility.Visible;
3234
+        }
3235
+       /// <summary>
3236
+       /// 确定四个点和边框的位置大小
3237
+       /// </summary>
3238
+        void PointLocation()
3239
+        {
3240
+            RectImgBorder.Width = imgCanvas.ActualWidth + 10.0;
3241
+            RectImgBorder.Height = imgCanvas.ActualHeight + 10.0;
3242
+            RectImgBorder.Margin = new Thickness(imgCanvas.Margin.Left - 5.0, imgCanvas.Margin.Top - 5.0, 0, 0);
3243
+
3244
+            Canvas.SetLeft(RectLeftUp, imgCanvas.Margin.Left - 10.0);
3245
+            Canvas.SetTop(RectLeftUp, imgCanvas.Margin.Top - 10.0);
3246
+
3247
+            Canvas.SetLeft(RectRightUp, imgCanvas.Margin.Left + imgCanvas.ActualWidth - 10.0);
3248
+            Canvas.SetTop(RectRightUp, imgCanvas.Margin.Top - 10.0);
3249
+
3250
+            Canvas.SetLeft(RectLeftDown, imgCanvas.Margin.Left - 10.0);
3251
+            Canvas.SetTop(RectLeftDown, imgCanvas.Margin.Top + imgCanvas.ActualHeight - 10.0);
3252
+
3253
+            Canvas.SetLeft(RectRightDown, imgCanvas.Margin.Left + imgCanvas.ActualWidth - 10.0);
3254
+            Canvas.SetTop(RectRightDown, imgCanvas.Margin.Top + imgCanvas.ActualHeight - 10.0);
3255
+
3256
+        }
3257
+        #endregion
3258
+
3259
+        /// <summary>
3260
+        /// 图片失去焦点事件
3261
+        /// </summary>
3262
+        /// <param name="sender"></param>
3263
+        /// <param name="e"></param>
3264
+        private void imgCanvas_LostFocus(object sender, RoutedEventArgs e)
3265
+        {
3266
+            //HideAngleBorder();
3267
+        }
3268
+
3269
+        /// <summary>
3270
+        /// 图片获取焦点事件
3271
+        /// </summary>
3272
+        /// <param name="sender"></param>
3273
+        /// <param name="e"></param>
3274
+        private void imgCanvas_GotFocus(object sender, RoutedEventArgs e)
3275
+        {
3276
+            ShowAngleBorder();
3277
+        }
3278
+        System.Windows.Point initialPoint;
3279
+        private void PicEMap_MouseDown(object sender, MouseButtonEventArgs e)
3280
+        {
3281
+            System.Windows.Point point = e.GetPosition(imgCanvas);
3282
+            initialPoint = point;
3283
+            //Console.WriteLine("PicEmap.X = " + point.X + "; PicEmap.Y = " + point.Y);
3284
+            //if ((point.X - 304) * (point.X - 304) + (point.Y - 86) * (point.Y - 86) < 100) 
3285
+            //{
3286
+            //    Console.WriteLine("在范围内");
3287
+            //}
3288
+            HideAngleBorder();
3289
+        }
3290
+        private void imgCanvas_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
3291
+        {
3292
+            if (e.LeftButton == MouseButtonState.Pressed)
3293
+            {
3294
+                System.Windows.Point point = e.GetPosition(imgCanvas);
3295
+                imgCanvas.Margin = new Thickness(imgCanvas.Margin.Left + (point.X - initialPoint.X), imgCanvas.Margin.Top + (point.Y - initialPoint.Y), 0, 0);
3296
+            }
3297
+        }
3298
+
3299
+        private void imgCanvas_MouseUp(object sender, MouseButtonEventArgs e)
3300
+        {
3301
+            ShowAngleBorder();
3302
+        }
3303
+        System.Drawing.PointF imgRightDown;
3304
+        private void RectRightUp_DragStarted(object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e)
3305
+        {
3306
+            try
3307
+            {
3308
+                Thumb thu = (Thumb)sender;
3309
+                imgRightDown = new System.Drawing.PointF((float)(imgCanvas.Margin.Left + imgCanvas.ActualWidth), (float)(imgCanvas.Margin.Top + imgCanvas.ActualHeight));
3310
+                HideAngleBorder();
3311
+                switch (thu.Name)
3312
+                {
3313
+                    case "RectLeftUp":
3314
+                        RectLeftUp.Visibility = Visibility.Visible;
3315
+                        break;
3316
+                    case "RectRightUp":
3317
+                        RectRightUp.Visibility = Visibility.Visible;
3318
+                        break;
3319
+                    case "RectLeftDown":
3320
+                        RectLeftDown.Visibility = Visibility.Visible;
3321
+                        break;
3322
+                    case "RectRightDown":
3323
+                        RectRightDown.Visibility = Visibility.Visible;
3324
+                        break;
3325
+                    default:
3326
+                        break;
3327
+                }
3328
+            }
3329
+            catch (Exception ex)
3330
+            {
3331
+                MessageWindow.Show(ex.Message);
3332
+            }
3333
+        }
3334
+        private void RectRightUp_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
3335
+        {
3336
+            try
3337
+            {
3338
+            Thumb thu = (Thumb)sender;
3339
+            Canvas.SetLeft(thu, Canvas.GetLeft(thu) + e.HorizontalChange);
3340
+            Canvas.SetTop(thu, Canvas.GetTop(thu) + e.VerticalChange);
3341
+                switch (thu.Name)
3342
+                {
3343
+                    case "RectLeftUp":
3344
+                        imgCanvas.Width = imgRightDown.X - (Mouse.GetPosition(gridM).X);
3345
+                        imgCanvas.Height = imgRightDown.Y - (Mouse.GetPosition(gridM).Y);
3346
+                        imgCanvas.Margin = new Thickness(Mouse.GetPosition(gridM).X, Mouse.GetPosition(gridM).Y, 0, 0);
3347
+                        break;
3348
+                    case "RectRightUp":
3349
+                        imgCanvas.Width = Mouse.GetPosition(gridM).X - imgCanvas.Margin.Left;
3350
+                        imgCanvas.Height = imgRightDown.Y - (Mouse.GetPosition(gridM).Y);
3351
+                        imgCanvas.Margin = new Thickness(imgCanvas.Margin.Left, Mouse.GetPosition(gridM).Y, 0, 0);
3352
+                        break;
3353
+                    case "RectLeftDown":
3354
+                        imgCanvas.Width = imgRightDown.X - (Mouse.GetPosition(gridM).X);
3355
+                        imgCanvas.Height = Mouse.GetPosition(gridM).Y - imgCanvas.Margin.Top;
3356
+                        imgCanvas.Margin = new Thickness(Mouse.GetPosition(gridM).X, imgCanvas.Margin.Top, 0, 0);
3357
+                        break;
3358
+                    case "RectRightDown":
3359
+                        imgCanvas.Width += e.HorizontalChange;
3360
+                        imgCanvas.Height += e.VerticalChange;
3361
+                        break;
3362
+                    default:
3363
+                        break;
3364
+                }
3365
+                //lbl1.Content = imgCanvas.Margin.Left + "," + imgCanvas.Margin.Top;
3366
+                //lbl2.Content = (imgCanvas.Margin.Left+ imgCanvas.Width) +"," + imgCanvas.Margin.Top;
3367
+                //lbl3.Content = imgCanvas.Margin.Left + "," + (imgCanvas.Margin.Top+ imgCanvas.Height);
3368
+                //lbl4.Content= (imgCanvas.Margin.Left + imgCanvas.Width )+ "," + (imgCanvas.Margin.Top + imgCanvas.Height);
3369
+            }
3370
+            catch (Exception ex)
3371
+            {
3372
+                MessageWindow.Show(ex.Message);
3373
+            }
3374
+        }
3375
+
3376
+        private void RectRightUp_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
3377
+        {
3378
+            ShowAngleBorder();
3379
+        }
3380
+
3381
+        private void gridM_MouseDown(object sender, MouseButtonEventArgs e)
3382
+        {
3383
+        }
3384
+
3385
+        private void Canvas_MouseDown(object sender, MouseButtonEventArgs e)
3386
+        {
3387
+
3388
+        }
3389
+
3390
+        private void IMG_MouseDown(object sender, MouseButtonEventArgs e)
3391
+        {
3392
+        }
3393
+
3394
+        private void GridMain_MouseDown(object sender, MouseButtonEventArgs e)
3395
+        {
3396
+        }
3397
+
3398
+        private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
3399
+        {
3400
+            HideAngleBorder();
3401
+        }
3214 3402
     }
3215 3403
 }

読み込み中…
キャンセル
保存