Browse Source

zhao:解决冲突

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

+ 17
- 9
Common/system/ImageHelper.cs View File

3
 using System.Drawing;
3
 using System.Drawing;
4
 using System.Drawing.Imaging;
4
 using System.Drawing.Imaging;
5
 using System.IO;
5
 using System.IO;
6
+using System.Security.Policy;
6
 using System.Text;
7
 using System.Text;
7
 using System.Threading;
8
 using System.Threading;
8
 using System.Windows;
9
 using System.Windows;
111
         /// </summary>
112
         /// </summary>
112
         /// <param name="ScreenSize">截图的区域,设置new Rectangle(0, 0, 0, 0)为截全屏</param>
113
         /// <param name="ScreenSize">截图的区域,设置new Rectangle(0, 0, 0, 0)为截全屏</param>
113
         /// <param name="ImageSavePath">图片存储路径,为空或null则保存到临时文件夹</param>
114
         /// <param name="ImageSavePath">图片存储路径,为空或null则保存到临时文件夹</param>
115
+        /// <param name="IsRetImg">是否返回图片</param>
116
+        /// <param name="bitmapimg">图片</param>
114
         /// <param name="level">压缩等级,0到100,0 最差质量,100 最佳</param>
117
         /// <param name="level">压缩等级,0到100,0 最差质量,100 最佳</param>
115
         /// <returns></returns>
118
         /// <returns></returns>
116
-        public static BitmapImage GetScreenshot(Rectangle ScreenSize, string ImageSavePath, long level = -1)
119
+        public static bool GetScreenshot(Rectangle ScreenSize, string ImageSavePath, bool IsRetImg, out BitmapImage bitmapimg, long level = -1)
117
         {
120
         {
121
+            bitmapimg = null;
118
             try
122
             try
119
             {
123
             {
120
                 System.Drawing.Size bounds = PrimaryScreen.DESKTOP;
124
                 System.Drawing.Size bounds = PrimaryScreen.DESKTOP;
143
                     g.CopyFromScreen(l, t, 0, 0, _Bitmap.Size, CopyPixelOperation.SourceCopy);
147
                     g.CopyFromScreen(l, t, 0, 0, _Bitmap.Size, CopyPixelOperation.SourceCopy);
144
                     Compress(_Bitmap, ImageSavePath, level);
148
                     Compress(_Bitmap, ImageSavePath, level);
145
                 }
149
                 }
146
-                Uri uri = new Uri(ImageSavePath, UriKind.Absolute);
147
-                BitmapImage bimg = new BitmapImage(uri);
150
+                if (IsRetImg)
151
+                {
152
+
153
+                    Uri uri = new Uri(ImageSavePath, UriKind.Absolute);
154
+                    bitmapimg = new BitmapImage(uri);
155
+                }
148
                 GC.Collect();
156
                 GC.Collect();
149
-                return bimg;
157
+                return true;
150
             }
158
             }
151
             catch (Exception ex)
159
             catch (Exception ex)
152
             {
160
             {
153
                 LogHelper.WriteErrLog("【截图】(GetBitmapSource)截图失败," + ex.Message, ex);
161
                 LogHelper.WriteErrLog("【截图】(GetBitmapSource)截图失败," + ex.Message, ex);
154
-                return null;
162
+                return false;
155
             }
163
             }
156
         }
164
         }
157
         /// <summary>
165
         /// <summary>
161
         public static string GetTempImagePath()
169
         public static string GetTempImagePath()
162
         {
170
         {
163
             TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
171
             TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
164
-            
165
-            string TempPath=FileToolsCommon.GetFileAbsolutePath("/temp/Screenshot/");
172
+
173
+            string TempPath = FileToolsCommon.GetFileAbsolutePath("/temp/Screenshot/");
166
             FileToolsCommon.CreateDirectory(TempPath);
174
             FileToolsCommon.CreateDirectory(TempPath);
167
             TempPath += Convert.ToInt64(ts.TotalMilliseconds).ToString() + ".jpg";
175
             TempPath += Convert.ToInt64(ts.TotalMilliseconds).ToString() + ".jpg";
168
             return TempPath;
176
             return TempPath;
468
                     break;
476
                     break;
469
             }
477
             }
470
 
478
 
471
-            if(right - left<=0)//zxyceshi
479
+            if (right - left <= 0)//zxyceshi
472
             {
480
             {
473
                 //克隆位图对象的一部分。
481
                 //克隆位图对象的一部分。
474
                 System.Drawing.Rectangle cloneRect = new System.Drawing.Rectangle(left, top, 1, bottom - top);
482
                 System.Drawing.Rectangle cloneRect = new System.Drawing.Rectangle(left, top, 1, bottom - top);
486
                 //cloneBitmap.Save(@"d:\123.png", ImageFormat.Png);
494
                 //cloneBitmap.Save(@"d:\123.png", ImageFormat.Png);
487
                 return cloneBitmap;
495
                 return cloneBitmap;
488
             }
496
             }
489
-         
497
+
490
         }
498
         }
491
 
499
 
492
         /// <summary>
500
         /// <summary>

+ 2
- 0
XHWK.WKTool/App.cs View File

131
         /// 提示窗口
131
         /// 提示窗口
132
         /// </summary>
132
         /// </summary>
133
         public static PromptWindow W_PromptWindow = null;
133
         public static PromptWindow W_PromptWindow = null;
134
+        public static LoadDialog myloading;
134
         #endregion
135
         #endregion
135
         #endregion
136
         #endregion
136
 
137
 
137
         [STAThread]
138
         [STAThread]
138
         private static void Main()
139
         private static void Main()
139
         {
140
         {
141
+            myloading = new LoadDialog();
140
             StopSameProcess();
142
             StopSameProcess();
141
             Killffmpeg();
143
             Killffmpeg();
142
             LatticeFileHelper.RunPrintConfig();
144
             LatticeFileHelper.RunPrintConfig();

+ 105
- 80
XHWK.WKTool/FileDirectoryWindow.xaml View File

7
         mc:Ignorable="d"
7
         mc:Ignorable="d"
8
         Title="FileDirectoryWindow" Height="729" Width="1030" AllowsTransparency="True" 
8
         Title="FileDirectoryWindow" Height="729" Width="1030" AllowsTransparency="True" 
9
     ShowInTaskbar="False" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" MouseLeftButtonUp="Window_MouseLeftButtonUp"
9
     ShowInTaskbar="False" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" MouseLeftButtonUp="Window_MouseLeftButtonUp"
10
-    WindowStartupLocation="CenterOwner"
10
+    WindowStartupLocation="CenterOwner" 
11
     WindowStyle="None">
11
     WindowStyle="None">
12
     <Window.Resources>
12
     <Window.Resources>
13
         <!--  ListBox容器样式  -->
13
         <!--  ListBox容器样式  -->
31
         </Style>
31
         </Style>
32
         <DataTemplate x:Key="TongjiItem">
32
         <DataTemplate x:Key="TongjiItem">
33
             <UniformGrid
33
             <UniformGrid
34
-                Height="36"
34
+                Height="50"
35
                 Margin="0,0,0,0"
35
                 Margin="0,0,0,0"
36
                 Background="{Binding Colour}"
36
                 Background="{Binding Colour}"
37
-                Columns="6"
37
+                Columns="5"
38
                 Rows="1">
38
                 Rows="1">
39
                 <!--题号-->
39
                 <!--题号-->
40
                 <TextBlock 
40
                 <TextBlock 
41
                     HorizontalAlignment="Center"
41
                     HorizontalAlignment="Center"
42
                     VerticalAlignment="Center"
42
                     VerticalAlignment="Center"
43
-                    FontSize="15"
43
+                    FontSize="16"
44
                     Text="{Binding SerialNumber}" />
44
                     Text="{Binding SerialNumber}" />
45
                 <Grid>
45
                 <Grid>
46
                     <StackPanel Orientation="Horizontal"   HorizontalAlignment="Center"
46
                     <StackPanel Orientation="Horizontal"   HorizontalAlignment="Center"
48
                         <TextBox IsEnabled="{Binding IsEnabled}"
48
                         <TextBox IsEnabled="{Binding IsEnabled}"
49
                     HorizontalAlignment="Center"
49
                     HorizontalAlignment="Center"
50
                     VerticalAlignment="Center"
50
                     VerticalAlignment="Center"
51
-                    FontSize="15"
52
-                    Text="{Binding VideoName,Mode=TwoWay}" />
51
+                    FontSize="16" Height="30" Padding="0,5,0,0"
52
+                    Text="{Binding VideoName,Mode=TwoWay}" Width="150"/>
53
                         <Button x:Name="btnModify" Background="Transparent"
53
                         <Button x:Name="btnModify" Background="Transparent"
54
                                 Cursor="Hand"
54
                                 Cursor="Hand"
55
                         BorderThickness="0" Click="BtnModify_Click">
55
                         BorderThickness="0" Click="BtnModify_Click">
56
                             <Grid>
56
                             <Grid>
57
-                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
58
-                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
57
+                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
58
+                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
59
                             </Grid>
59
                             </Grid>
60
                         </Button>
60
                         </Button>
61
                     </StackPanel>
61
                     </StackPanel>
62
                 </Grid>
62
                 </Grid>
63
           
63
           
64
            
64
            
65
-                <!--分值-->
65
+                <!--分值--><!--
66
                 <TextBlock
66
                 <TextBlock
67
                     HorizontalAlignment="Center"
67
                     HorizontalAlignment="Center"
68
                     VerticalAlignment="Center"
68
                     VerticalAlignment="Center"
69
                     FontSize="15"
69
                     FontSize="15"
70
-                    Text="{Binding VideoDuration}" />
70
+                    Text="{Binding VideoDuration}" />-->
71
 
71
 
72
                 <!--平均时长-->
72
                 <!--平均时长-->
73
                 <TextBlock
73
                 <TextBlock
74
                     HorizontalAlignment="Center"
74
                     HorizontalAlignment="Center"
75
                     VerticalAlignment="Center"
75
                     VerticalAlignment="Center"
76
-                    FontSize="15"
76
+                    FontSize="16"
77
                     Text="{Binding VideoSize}" />
77
                     Text="{Binding VideoSize}" />
78
                 <!--最短时长-->
78
                 <!--最短时长-->
79
                 <TextBlock
79
                 <TextBlock
80
                     HorizontalAlignment="Center"
80
                     HorizontalAlignment="Center"
81
                     VerticalAlignment="Center"
81
                     VerticalAlignment="Center"
82
-                    FontSize="15"
82
+                    FontSize="16"
83
                     Text="{Binding VideoTime}" />
83
                     Text="{Binding VideoTime}" />
84
 
84
 
85
                 <Grid>
85
                 <Grid>
89
                                 Cursor="Hand"
89
                                 Cursor="Hand"
90
                         BorderThickness="0" Click="BtnPlay_Click">
90
                         BorderThickness="0" Click="BtnPlay_Click">
91
                             <Grid>
91
                             <Grid>
92
-                                <Image Source="./Images/fileDirectory1.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
93
-                                <Image Source="./Images/fileDirectory2.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
92
+                                <Image Source="./Images/fileDirectory1.png" Margin="10" Height="20" Visibility="{Binding vis}"/>
93
+                                <Image Source="./Images/fileDirectory2.png" Margin="10" Visibility="{Binding cos}"/>
94
                             </Grid>
94
                             </Grid>
95
                         </Button>
95
                         </Button>
96
                         <Button x:Name="btnUpload" Background="Transparent"
96
                         <Button x:Name="btnUpload" Background="Transparent"
97
                                 Cursor="Hand"
97
                                 Cursor="Hand"
98
                         BorderThickness="0" Click="BtnUpload_Click">
98
                         BorderThickness="0" Click="BtnUpload_Click">
99
                             <Grid>
99
                             <Grid>
100
-                                <Image Source="./Images/fileDirectory7.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
101
-                                <Image Source="./Images/fileDirectory8.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
100
+                                <Image Source="./Images/fileDirectory7.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
101
+                                <Image Source="./Images/fileDirectory8.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
102
                             </Grid>
102
                             </Grid>
103
                         </Button>
103
                         </Button>
104
                         <Button x:Name="btnDelete" Background="Transparent"
104
                         <Button x:Name="btnDelete" Background="Transparent"
105
                                 Cursor="Hand"
105
                                 Cursor="Hand"
106
                         BorderThickness="0" Click="BtnDelete_Click">
106
                         BorderThickness="0" Click="BtnDelete_Click">
107
                             <Grid>
107
                             <Grid>
108
-                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
109
-                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
108
+                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
109
+                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
110
                             </Grid>
110
                             </Grid>
111
                         </Button>
111
                         </Button>
112
                     </StackPanel>
112
                     </StackPanel>
117
         </DataTemplate>
117
         </DataTemplate>
118
     </Window.Resources>
118
     </Window.Resources>
119
     <Viewbox>
119
     <Viewbox>
120
-        <Grid Height="729" Width="1030" >
121
-            <!--分4行-->
122
-            <Grid.RowDefinitions>
123
-                <RowDefinition Height="45"/>
124
-                <RowDefinition Height="*"/>
125
-                <RowDefinition Height="80"/>
126
-            </Grid.RowDefinitions>
127
-            <!--第一行 标题-->
128
-            <Border Grid.Row="0" Background="#2D8CF0">
129
-                <Grid  MouseLeftButtonDown="Window_MouseLeftButtonDown">
130
-                    <TextBlock Text="文件目录" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
131
-                    <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnDown_Click"/>
132
-                </Grid>
133
-            </Border>
134
-           <!--第二行 内容-->
135
-            <Grid Grid.Row="1" Margin="0,15,0,0">
136
-                <Grid.RowDefinitions>
137
-                    <RowDefinition Height="45"/>
138
-                    <RowDefinition Height="*"/>
139
-                </Grid.RowDefinitions>
140
-                <UniformGrid x:Name="uniStatisticsByTitle"
120
+        <Border Background="#fefefe" Height="729" Width="1030">
121
+            <Border Background="#fdfdfd" Height="727" Width="1028">
122
+                <Border Background="#fcfcfc" Height="725" Width="1026">
123
+                    <Border Background="#fafafa" Height="723" Width="1024">
124
+                        <Border Background="#f9f9f9" Height="721" Width="1022">
125
+                            <Border Background="#f6f6f6" Height="719" Width="1020">
126
+                                <Border Background="#f3f3f3" Height="717" Width="1018">
127
+                                    <Border Background="#eeeeee" Height="715" Width="1016">
128
+                                        <Border Background="#e9e9e9" Height="713" Width="1014">
129
+                                            <Border Background="#e2e2e2" Height="711" Width="1012">
130
+                                                <Border Background="#dcdcdc" Height="709" Width="1010">
131
+                                                    <Border Background="#d3d3d3" Height="707" Width="1008">
132
+                                                        <Border Background="#cccccc" Height="705" Width="1006">
133
+                                                            <Border Background="#bfbfbf" Height="703" Width="1004">
134
+                                                                <Border Background="#aeaeae" Height="701" Width="1002">
135
+                                                                    <Border Background="#bababa" Height="699" Width="1000">
136
+                                                                        <Border Background="#e4e4e4" Height="697" Width="998">
137
+                                                                            <Grid Height="695" Width="998" Background="#FFFFFF" Margin="0,-1,0,0">
138
+                                                                                <!--分4行-->
139
+                                                                                <Grid.RowDefinitions>
140
+                                                                                    <RowDefinition Height="45"/>
141
+                                                                                    <RowDefinition Height="*"/>
142
+                                                                                    <RowDefinition Height="30"/>
143
+                                                                                </Grid.RowDefinitions>
144
+                                                                                <!--第一行 标题-->
145
+                                                                                <Border Grid.Row="0" Background="#2D8CF0">
146
+                                                                                    <Grid  MouseLeftButtonDown="Window_MouseLeftButtonDown">
147
+                                                                                        <TextBlock Text="文件目录" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
148
+                                                                                        <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnDown_Click"/>
149
+                                                                                    </Grid>
150
+                                                                                </Border>
151
+                                                                                <!--第二行 内容-->
152
+                                                                                <Grid Grid.Row="1" Margin="0,15,0,0">
153
+                                                                                    <Grid.RowDefinitions>
154
+                                                                                        <RowDefinition Height="45"/>
155
+                                                                                        <RowDefinition Height="*"/>
156
+                                                                                    </Grid.RowDefinitions>
157
+                                                                                    <UniformGrid x:Name="uniStatisticsByTitle"
141
                 Grid.Row="0"
158
                 Grid.Row="0"
142
                 Margin="10,0,10,0"
159
                 Margin="10,0,10,0"
143
                 Background="#2D8CF0"
160
                 Background="#2D8CF0"
144
-                Columns="6"
161
+                Columns="5"
145
                 Rows="1">
162
                 Rows="1">
146
-                    <TextBlock
163
+                                                                                        <TextBlock
147
                     HorizontalAlignment="Center"
164
                     HorizontalAlignment="Center"
148
                     VerticalAlignment="Center"
165
                     VerticalAlignment="Center"
149
-                    FontSize="15"
166
+                    FontSize="16"
150
                     Text="序号" Foreground="White" />
167
                     Text="序号" Foreground="White" />
151
-                    <TextBlock
168
+                                                                                        <TextBlock
152
                     HorizontalAlignment="Center"
169
                     HorizontalAlignment="Center"
153
                     VerticalAlignment="Center"
170
                     VerticalAlignment="Center"
154
-                    FontSize="15"
171
+                    FontSize="16"
155
                     Text="视频名称" Foreground="White" />
172
                     Text="视频名称" Foreground="White" />
156
-                    <TextBlock
173
+                                                                                        <!--<TextBlock
157
                     HorizontalAlignment="Center"
174
                     HorizontalAlignment="Center"
158
                     VerticalAlignment="Center"
175
                     VerticalAlignment="Center"
159
                     FontSize="15"
176
                     FontSize="15"
160
-                    Text="视频时长" Foreground="White" />
161
-                    <TextBlock
177
+                    Text="视频时长" Foreground="White" />-->
178
+                                                                                        <TextBlock
162
                     HorizontalAlignment="Center"
179
                     HorizontalAlignment="Center"
163
                     VerticalAlignment="Center"
180
                     VerticalAlignment="Center"
164
-                    FontSize="15"
181
+                    FontSize="16"
165
                     Text="视频大小" Foreground="White" />
182
                     Text="视频大小" Foreground="White" />
166
-                    <TextBlock
183
+                                                                                        <TextBlock
167
                     HorizontalAlignment="Center"
184
                     HorizontalAlignment="Center"
168
                     VerticalAlignment="Center"
185
                     VerticalAlignment="Center"
169
-                    FontSize="15"
186
+                    FontSize="16"
170
                     Text="日期" Foreground="White" />
187
                     Text="日期" Foreground="White" />
171
-                    <TextBlock
188
+                                                                                        <TextBlock
172
                     HorizontalAlignment="Center"
189
                     HorizontalAlignment="Center"
173
                     VerticalAlignment="Center"
190
                     VerticalAlignment="Center"
174
-                    FontSize="15"
191
+                    FontSize="16"
175
                     Text="操作" Foreground="White" />
192
                     Text="操作" Foreground="White" />
176
-                </UniformGrid>
177
-                <ListBox Grid.Row="1"
193
+                                                                                    </UniformGrid>
194
+                                                                                    <ListBox Grid.Row="1"
178
                     x:Name="listView1"
195
                     x:Name="listView1"
179
                     BorderThickness="0"
196
                     BorderThickness="0"
180
                     FontSize="20"
197
                     FontSize="20"
183
                     ItemsSource="{Binding menuList}" 
200
                     ItemsSource="{Binding menuList}" 
184
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
201
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
185
                                 ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
202
                                 ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
186
-            </Grid>
187
-            <!--第三行 删除 上传 按钮-->
188
-            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Height="32">
189
-                <TextBlock Text="共" FontSize="20" Padding="0,5,0,0"/>
190
-                <TextBlock x:Name="txbSum" Text="0" FontSize="20" Padding="0,5,0,0"/>
191
-                <TextBlock Text="条" FontSize="20" Padding="0,5,0,0"/>
192
-                <Button Background="Transparent"
193
-                                Cursor="Hand"
194
-                        BorderThickness="0">
195
-                    <Image Source="./Images/class_p1.png"/>
196
-                </Button>
197
-                <Button Background="Transparent"
198
-                                Cursor="Hand"
199
-                        BorderThickness="0" Content="1" FontSize="20" Width="30"/>
200
-                <Button Background="Transparent"
203
+                                                                                </Grid>
204
+                                                                                <!--第三行 删除 上传 按钮-->
205
+                                                                                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Height="32">
206
+                                                                                    <TextBlock Text="共" FontSize="20" Padding="0,5,0,0"/>
207
+                                                                                    <TextBlock x:Name="txbSum" Text="0" FontSize="20" Padding="0,5,0,0"/>
208
+                                                                                    <TextBlock Text="条" FontSize="20" Padding="0,5,0,0"/>
209
+                                                                                    <Button Background="Transparent"
201
                                 Cursor="Hand"
210
                                 Cursor="Hand"
202
-                        BorderThickness="0" Content="2" FontSize="20" Width="30"/>
203
-                <Button Background="Transparent"
211
+                        BorderThickness="0" Content="上一页" FontSize="20" Margin="10,0,0,0" >
212
+                                                                                        <!--<Image Source="./Images/class_p1.png"/>-->
213
+                                                                                    </Button>
214
+                                                                                    <Button Background="Transparent"
204
                                 Cursor="Hand"
215
                                 Cursor="Hand"
205
-                        BorderThickness="0" Content="3" FontSize="20" Width="30"/>
206
-                <Button Background="Transparent"
207
-                                Cursor="Hand"
208
-                        BorderThickness="0">
209
-                    <Image Source="./Images/class_p2.png"/>
210
-                </Button>
211
-            </StackPanel>
212
-            
213
-        </Grid>
216
+                        BorderThickness="0" Content="下一页" FontSize="20" Margin="10,0,0,0" >
217
+                                                                                        <!--<Image Source="./Images/class_p2.png"/>-->
218
+                                                                                    </Button>
219
+                                                                                </StackPanel>
220
+
221
+                                                                            </Grid>
222
+                                                                        </Border>
223
+                                                                    </Border>
224
+                                                                </Border>
225
+                                                            </Border>
226
+                                                        </Border>
227
+                                                    </Border>
228
+                                                </Border>
229
+                                            </Border>
230
+                                        </Border>
231
+                                    </Border>
232
+                                </Border>
233
+                            </Border>
234
+                        </Border>
235
+                    </Border>
236
+                </Border>
237
+            </Border>
238
+        </Border>
214
     </Viewbox>
239
     </Viewbox>
215
 </Window>
240
 </Window>

+ 25
- 17
XHWK.WKTool/FileDirectoryWindow.xaml.cs View File

50
         /// </summary>
50
         /// </summary>
51
         public void Initialize()
51
         public void Initialize()
52
         {
52
         {
53
+            APP.myloading.Show();
53
             MouseNumber = 0;
54
             MouseNumber = 0;
54
             IsModify = false;
55
             IsModify = false;
55
             //加载视频列表
56
             //加载视频列表
91
                     vis = "Collapsed";
92
                     vis = "Collapsed";
92
                     cos = "Visible";
93
                     cos = "Visible";
93
                 }
94
                 }
94
-                pageData.menuList.Add(new FileDirectoryModel()
95
+                if (i <= 16)
95
                 {
96
                 {
96
-                    SerialNumber = i,
97
-                    VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
98
-                    Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
99
-                    FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
100
-                    VideoDuration = 0,
101
-                    VideoSize = videoinfo.VideoSize,
102
-                    VideoTime = videoinfo.RSTime,
103
-                    IsEnabled = false,
104
-                    Path = videoinfo.VideoPath,
105
-                    Colour = colour,
106
-                    Visi = vis,
107
-                    Coll = cos,
108
-                    FileGuid = videoinfo.FileGuid,
109
-                    VideoType = videoinfo.VideoType.ToString()
110
-                }); ;
97
+                    pageData.menuList.Add(new FileDirectoryModel()
98
+                    {
99
+                        SerialNumber = i,
100
+                        VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
101
+                        Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
102
+                        FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
103
+                        VideoDuration = 0,
104
+                        VideoSize = videoinfo.VideoSize,
105
+                        VideoTime = videoinfo.RSTime,
106
+                        IsEnabled = false,
107
+                        Path = videoinfo.VideoPath,
108
+                        Colour = colour,
109
+                        Visi = vis,
110
+                        Coll = cos,
111
+                        FileGuid = videoinfo.FileGuid,
112
+                        VideoType = videoinfo.VideoType.ToString()
113
+                    }); ;
114
+                }
115
+
116
+
117
+
111
                 i++;
118
                 i++;
112
             }
119
             }
113
             txbSum.Text = pageData.menuList.Count.ToString();
120
             txbSum.Text = pageData.menuList.Count.ToString();
121
+            APP.myloading.Hide();
114
             DataContext = pageData;
122
             DataContext = pageData;
115
         }
123
         }
116
         /// <summary>
124
         /// <summary>
210
         /// <param name="e"></param>
218
         /// <param name="e"></param>
211
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
219
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
212
         {
220
         {
213
-        
221
+
214
             pageData.menuList[Subscript].IsEnabled = false;
222
             pageData.menuList[Subscript].IsEnabled = false;
215
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
223
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
216
             for (int i = 0; i < buttons.Count; i++)
224
             for (int i = 0; i < buttons.Count; i++)

BIN
XHWK.WKTool/Images/img_load.gif View File


+ 10
- 8
XHWK.WKTool/JieTuWindow.xaml.cs View File

81
                 Directory.CreateDirectory(tempPath);
81
                 Directory.CreateDirectory(tempPath);
82
             }
82
             }
83
             string imagePath = Path.Combine(tempPath, time + ".jpg");
83
             string imagePath = Path.Combine(tempPath, time + ".jpg");
84
-            Background = new ImageBrush(ImageHelper.GetScreenshot(new Rectangle(0, 0, 0, 0), null));
84
+            if (ImageHelper.GetScreenshot(new Rectangle(0, 0, 0, 0), null, true, out BitmapImage bitmap))
85
+                Background = new ImageBrush(bitmap);
85
         }
86
         }
86
 
87
 
87
         public void initialization()
88
         public void initialization()
233
             //string imagePath = ImageHelper.GetImagePath(out string serverSavePath);
234
             //string imagePath = ImageHelper.GetImagePath(out string serverSavePath);
234
 
235
 
235
             //BitmapSource bitmap = ImageHelper.GetBitmapSource((int)AppModel.Current.MaskLeftWidth + 1, (int)AppModel.Current.MaskTopHeight + 1, (int)MainImage.ActualWidth - 2, (int)MainImage.ActualHeight - 2, out JieTuBitmapPtr);
236
             //BitmapSource bitmap = ImageHelper.GetBitmapSource((int)AppModel.Current.MaskLeftWidth + 1, (int)AppModel.Current.MaskTopHeight + 1, (int)MainImage.ActualWidth - 2, (int)MainImage.ActualHeight - 2, out JieTuBitmapPtr);
236
-            BitmapImage bitmap = ImageHelper.GetScreenshot(new Rectangle((int)AppModel.Current.MaskLeftWidth + 1, (int)AppModel.Current.MaskTopHeight + 1, (int)MainImage.ActualWidth - 2, (int)MainImage.ActualHeight - 2), imagePath);
237
+           /* BitmapImage bitmap = */ImageHelper.GetScreenshot(new Rectangle((int)AppModel.Current.MaskLeftWidth + 1, (int)AppModel.Current.MaskTopHeight + 1, (int)MainImage.ActualWidth - 2, (int)MainImage.ActualHeight - 2), imagePath,true,out BitmapImage bitmapimg);
237
             _IsMouseDown = false;
238
             _IsMouseDown = false;
238
             _IsCapture = false;
239
             _IsCapture = false;
239
             ImageEditBar.Current.Visibility = Visibility.Collapsed;
240
             ImageEditBar.Current.Visibility = Visibility.Collapsed;
241
             SizeRGB.Visibility = Visibility.Collapsed;
242
             SizeRGB.Visibility = Visibility.Collapsed;
242
             MainImage.Visibility = Visibility.Collapsed;
243
             MainImage.Visibility = Visibility.Collapsed;
243
             DataContext = new AppModel();
244
             DataContext = new AppModel();
244
-            Background = new ImageBrush(ImageHelper.GetScreenshot(new Rectangle(0, 0, 0, 0), imagePath));//zxy
245
+            ImageHelper.GetScreenshot(new Rectangle(0, 0, 0, 0), imagePath, true, out BitmapImage bitmap);//zxy
246
+            Background = new ImageBrush(bitmap);
245
             WpfHelper.MainDispatcher = Dispatcher;
247
             WpfHelper.MainDispatcher = Dispatcher;
246
             MaxWindow();
248
             MaxWindow();
247
             MaskLeft.Height = ScreenHeight;
249
             MaskLeft.Height = ScreenHeight;
248
             MaskRight.Height = ScreenHeight;
250
             MaskRight.Height = ScreenHeight;
249
             //计算Windows项目缩放比例
251
             //计算Windows项目缩放比例
250
             ScreenHelper.ResetScreenScale();
252
             ScreenHelper.ResetScreenScale();
251
-            if (bitmap != null)
252
-            {
253
-                //Shared.TeachingData.REQ_InteractiveLaunch.teacherpic = serverSavePath;
254
-                //Shared.TeachingData.FilePath = imagePath;
255
-            }
253
+            //if (bitmap != null)
254
+            //{
255
+            //    //Shared.TeachingData.REQ_InteractiveLaunch.teacherpic = serverSavePath;
256
+            //    //Shared.TeachingData.FilePath = imagePath;
257
+            //}
256
 
258
 
257
             ///修改为统一截图时存储到服务器 修改人:赵耀 修改时间:2020年8月11日
259
             ///修改为统一截图时存储到服务器 修改人:赵耀 修改时间:2020年8月11日
258
             //if (bitmap != null)
260
             //if (bitmap != null)

+ 239
- 0
XHWK.WKTool/LoadDialog.xaml View File

1
+<Window x:Class="XHWK.WKTool.LoadDialog"
2
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
+        xmlns:local="clr-namespace:XHWK.WKTool"
7
+        mc:Ignorable="d"
8
+        Title="LoadDialog"  Width="100"
9
+    Height="100"
10
+    AllowsTransparency="True"
11
+    Background="Transparent"
12
+    Opacity="1"
13
+    ResizeMode="NoResize"
14
+    Topmost="True"
15
+    WindowStartupLocation="CenterScreen"
16
+    WindowStyle="None">
17
+    <Grid>
18
+        <Border Background="#66000000" CornerRadius="10 10 10 10">
19
+            <Grid Width="60" Height="60">
20
+                <Grid.Resources>
21
+                    <DrawingBrush
22
+                        x:Key="brush"
23
+                        AlignmentX="Center"
24
+                        AlignmentY="Top"
25
+                        Stretch="None">
26
+                        <DrawingBrush.Drawing>
27
+                            <GeometryDrawing Brush="White">
28
+                                <GeometryDrawing.Geometry>
29
+                                    <EllipseGeometry RadiusX="2" RadiusY="5" />
30
+                                </GeometryDrawing.Geometry>
31
+                            </GeometryDrawing>
32
+                        </DrawingBrush.Drawing>
33
+                    </DrawingBrush>
34
+                </Grid.Resources>
35
+
36
+                <Rectangle
37
+                    x:Name="r01"
38
+                    Fill="{StaticResource brush}"
39
+                    Opacity="0.8"
40
+                    RenderTransformOrigin="0.5,0.5">
41
+                    <Rectangle.RenderTransform>
42
+                        <RotateTransform Angle="0" />
43
+                    </Rectangle.RenderTransform>
44
+                </Rectangle>
45
+                <Rectangle
46
+                    x:Name="r02"
47
+                    Fill="{StaticResource brush}"
48
+                    Opacity="0.8"
49
+                    RenderTransformOrigin="0.5,0.5">
50
+                    <Rectangle.RenderTransform>
51
+                        <RotateTransform Angle="30" />
52
+                    </Rectangle.RenderTransform>
53
+                </Rectangle>
54
+                <Rectangle
55
+                    x:Name="r03"
56
+                    Fill="{StaticResource brush}"
57
+                    Opacity="0.8"
58
+                    RenderTransformOrigin="0.5,0.5">
59
+                    <Rectangle.RenderTransform>
60
+                        <RotateTransform Angle="60" />
61
+                    </Rectangle.RenderTransform>
62
+                </Rectangle>
63
+                <Rectangle
64
+                    x:Name="r04"
65
+                    Fill="{StaticResource brush}"
66
+                    Opacity="0.8"
67
+                    RenderTransformOrigin="0.5,0.5">
68
+                    <Rectangle.RenderTransform>
69
+                        <RotateTransform Angle="90" />
70
+                    </Rectangle.RenderTransform>
71
+                </Rectangle>
72
+                <Rectangle
73
+                    x:Name="r05"
74
+                    Fill="{StaticResource brush}"
75
+                    Opacity="0.8"
76
+                    RenderTransformOrigin="0.5,0.5">
77
+                    <Rectangle.RenderTransform>
78
+                        <RotateTransform Angle="120" />
79
+                    </Rectangle.RenderTransform>
80
+                </Rectangle>
81
+                <Rectangle
82
+                    x:Name="r06"
83
+                    Fill="{StaticResource brush}"
84
+                    Opacity="0.8"
85
+                    RenderTransformOrigin="0.5,0.5">
86
+                    <Rectangle.RenderTransform>
87
+                        <RotateTransform Angle="150" />
88
+                    </Rectangle.RenderTransform>
89
+                </Rectangle>
90
+                <Rectangle
91
+                    x:Name="r07"
92
+                    Fill="{StaticResource brush}"
93
+                    Opacity="0.8"
94
+                    RenderTransformOrigin="0.5,0.5">
95
+                    <Rectangle.RenderTransform>
96
+                        <RotateTransform Angle="180" />
97
+                    </Rectangle.RenderTransform>
98
+                </Rectangle>
99
+                <Rectangle
100
+                    x:Name="r08"
101
+                    Fill="{StaticResource brush}"
102
+                    Opacity="0.8"
103
+                    RenderTransformOrigin="0.5,0.5">
104
+                    <Rectangle.RenderTransform>
105
+                        <RotateTransform Angle="210" />
106
+                    </Rectangle.RenderTransform>
107
+                </Rectangle>
108
+                <Rectangle
109
+                    x:Name="r09"
110
+                    Fill="{StaticResource brush}"
111
+                    Opacity="0.8"
112
+                    RenderTransformOrigin="0.5,0.5">
113
+                    <Rectangle.RenderTransform>
114
+                        <RotateTransform Angle="240" />
115
+                    </Rectangle.RenderTransform>
116
+                </Rectangle>
117
+                <Rectangle
118
+                    x:Name="r10"
119
+                    Fill="{StaticResource brush}"
120
+                    Opacity="0.8"
121
+                    RenderTransformOrigin="0.5,0.5">
122
+                    <Rectangle.RenderTransform>
123
+                        <RotateTransform Angle="270" />
124
+                    </Rectangle.RenderTransform>
125
+                </Rectangle>
126
+                <Rectangle
127
+                    x:Name="r11"
128
+                    Fill="{StaticResource brush}"
129
+                    Opacity="0.8"
130
+                    RenderTransformOrigin="0.5,0.5">
131
+                    <Rectangle.RenderTransform>
132
+                        <RotateTransform Angle="300" />
133
+                    </Rectangle.RenderTransform>
134
+                </Rectangle>
135
+                <Rectangle
136
+                    x:Name="r12"
137
+                    Fill="{StaticResource brush}"
138
+                    Opacity="0.8"
139
+                    RenderTransformOrigin="0.5,0.5">
140
+                    <Rectangle.RenderTransform>
141
+                        <RotateTransform Angle="330" />
142
+                    </Rectangle.RenderTransform>
143
+                </Rectangle>
144
+                <Grid.Triggers>
145
+                    <EventTrigger RoutedEvent="Grid.Loaded">
146
+                        <BeginStoryboard>
147
+                            <Storyboard RepeatBehavior="Forever">
148
+                                <DoubleAnimation
149
+                                    AutoReverse="True"
150
+                                    BeginTime="0:0:0.00000"
151
+                                    Storyboard.TargetName="r01"
152
+                                    Storyboard.TargetProperty="Opacity"
153
+                                    To="0"
154
+                                    Duration="0:0:0.08333" />
155
+                                <DoubleAnimation
156
+                                    AutoReverse="True"
157
+                                    BeginTime="0:0:0.08333"
158
+                                    Storyboard.TargetName="r02"
159
+                                    Storyboard.TargetProperty="Opacity"
160
+                                    To="0"
161
+                                    Duration="0:0:0.08333" />
162
+                                <DoubleAnimation
163
+                                    AutoReverse="True"
164
+                                    BeginTime="0:0:0.16666"
165
+                                    Storyboard.TargetName="r03"
166
+                                    Storyboard.TargetProperty="Opacity"
167
+                                    To="0"
168
+                                    Duration="0:0:0.08333" />
169
+                                <DoubleAnimation
170
+                                    AutoReverse="True"
171
+                                    BeginTime="0:0:0.24999"
172
+                                    Storyboard.TargetName="r04"
173
+                                    Storyboard.TargetProperty="Opacity"
174
+                                    To="0"
175
+                                    Duration="0:0:0.08333" />
176
+                                <DoubleAnimation
177
+                                    AutoReverse="True"
178
+                                    BeginTime="0:0:0.33332"
179
+                                    Storyboard.TargetName="r05"
180
+                                    Storyboard.TargetProperty="Opacity"
181
+                                    To="0"
182
+                                    Duration="0:0:0.08333" />
183
+                                <DoubleAnimation
184
+                                    AutoReverse="True"
185
+                                    BeginTime="0:0:0.41665"
186
+                                    Storyboard.TargetName="r06"
187
+                                    Storyboard.TargetProperty="Opacity"
188
+                                    To="0"
189
+                                    Duration="0:0:0.08333" />
190
+                                <DoubleAnimation
191
+                                    AutoReverse="True"
192
+                                    BeginTime="0:0:0.49998"
193
+                                    Storyboard.TargetName="r07"
194
+                                    Storyboard.TargetProperty="Opacity"
195
+                                    To="0"
196
+                                    Duration="0:0:0.08333" />
197
+                                <DoubleAnimation
198
+                                    AutoReverse="True"
199
+                                    BeginTime="0:0:0.58331"
200
+                                    Storyboard.TargetName="r08"
201
+                                    Storyboard.TargetProperty="Opacity"
202
+                                    To="0"
203
+                                    Duration="0:0:0.08333" />
204
+                                <DoubleAnimation
205
+                                    AutoReverse="True"
206
+                                    BeginTime="0:0:0.66664"
207
+                                    Storyboard.TargetName="r09"
208
+                                    Storyboard.TargetProperty="Opacity"
209
+                                    To="0"
210
+                                    Duration="0:0:0.08333" />
211
+                                <DoubleAnimation
212
+                                    AutoReverse="True"
213
+                                    BeginTime="0:0:0.74997"
214
+                                    Storyboard.TargetName="r10"
215
+                                    Storyboard.TargetProperty="Opacity"
216
+                                    To="0"
217
+                                    Duration="0:0:0.08333" />
218
+                                <DoubleAnimation
219
+                                    AutoReverse="True"
220
+                                    BeginTime="0:0:0.83330"
221
+                                    Storyboard.TargetName="r11"
222
+                                    Storyboard.TargetProperty="Opacity"
223
+                                    To="0"
224
+                                    Duration="0:0:0.08333" />
225
+                                <DoubleAnimation
226
+                                    AutoReverse="True"
227
+                                    BeginTime="0:0:0.91663"
228
+                                    Storyboard.TargetName="r12"
229
+                                    Storyboard.TargetProperty="Opacity"
230
+                                    To="0"
231
+                                    Duration="0:0:0.08333" />
232
+                            </Storyboard>
233
+                        </BeginStoryboard>
234
+                    </EventTrigger>
235
+                </Grid.Triggers>
236
+            </Grid>
237
+        </Border>
238
+    </Grid>
239
+</Window>

+ 27
- 0
XHWK.WKTool/LoadDialog.xaml.cs View File

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+using System.Windows;
7
+using System.Windows.Controls;
8
+using System.Windows.Data;
9
+using System.Windows.Documents;
10
+using System.Windows.Input;
11
+using System.Windows.Media;
12
+using System.Windows.Media.Imaging;
13
+using System.Windows.Shapes;
14
+
15
+namespace XHWK.WKTool
16
+{
17
+    /// <summary>
18
+    /// LoadDialog.xaml 的交互逻辑
19
+    /// </summary>
20
+    public partial class LoadDialog : Window
21
+    {
22
+        public LoadDialog()
23
+        {
24
+            InitializeComponent();
25
+        }
26
+    }
27
+}

+ 43
- 9
XHWK.WKTool/LoginWindow.xaml View File

5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
         xmlns:local="clr-namespace:XHWK.WKTool"
6
         xmlns:local="clr-namespace:XHWK.WKTool"
7
         mc:Ignorable="d"
7
         mc:Ignorable="d"
8
-        Title="LoginWindow" Height="341" Width="454"   AllowsTransparency="True"
8
+        Title="LoginWindow" Height="358" Width="471"   AllowsTransparency="True"
9
     ShowInTaskbar="False"
9
     ShowInTaskbar="False"
10
     WindowStartupLocation="CenterOwner"
10
     WindowStartupLocation="CenterOwner"
11
     WindowStyle="None">
11
     WindowStyle="None">
12
     <Viewbox>
12
     <Viewbox>
13
-        <Grid Height="341" Width="454" >
13
+        <Border Background="#fefefe" Height="358" Width="471">
14
+            <Border Background="#fdfdfd" Height="357" Width="470">
15
+                <Border Background="#fcfcfc" Height="356" Width="469">
16
+                    <Border Background="#fafafa" Height="355" Width="468">
17
+                        <Border Background="#f9f9f9" Height="354" Width="467">
18
+                            <Border Background="#f6f6f6" Height="353" Width="466">
19
+                                <Border Background="#f3f3f3" Height="352" Width="465">
20
+                                    <Border Background="#eeeeee" Height="351" Width="464">
21
+                                        <Border Background="#e9e9e9" Height="350" Width="463">
22
+                                            <Border Background="#e2e2e2" Height="349" Width="462">
23
+                                                <Border Background="#dcdcdc" Height="348" Width="461">
24
+                                                    <Border Background="#d3d3d3" Height="347" Width="460">
25
+                                                        <Border Background="#cccccc" Height="346" Width="459">
26
+                                                            <Border Background="#bfbfbf" Height="345" Width="458">
27
+                                                                <Border Background="#aeaeae" Height="344" Width="457">
28
+                                                                    <Border Background="#bababa" Height="343" Width="456">
29
+                                                                        <!--<Border Background="#e4e4e4" Height="342" Width="455">-->
30
+                                                                        <Grid Height="343" Width="456" Background="#FFFFFF">
14
             <!--分5行-->
31
             <!--分5行-->
15
             <Grid.RowDefinitions>
32
             <Grid.RowDefinitions>
16
                 <RowDefinition Height="45"/>
33
                 <RowDefinition Height="45"/>
30
             <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
47
             <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
31
                 <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
48
                 <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
32
                 <!--输入框-->
49
                 <!--输入框-->
33
-                <Border Background="#CDD6E0" Width="371" Height="43" CornerRadius="3">
34
-                    <TextBox x:Name="txbAccountNumber" Text="" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="369" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
50
+                                                                                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
51
+                    <TextBox x:Name="txbAccountNumber" Text="" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
35
                 </Border>
52
                 </Border>
36
             </StackPanel>
53
             </StackPanel>
37
             <!--第三行 密码-->
54
             <!--第三行 密码-->
38
             <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
55
             <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
39
                 <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
56
                 <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
40
                 <!--输入框-->
57
                 <!--输入框-->
41
-                <Border Background="#CDD6E0" Width="371" Height="43" CornerRadius="3">
42
-                    <PasswordBox x:Name="pobPassword" FontSize="16" Foreground="#333333" PasswordChar="*" Padding="5,12,2,2" Width="369" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
58
+                                                                                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
59
+                    <PasswordBox x:Name="pobPassword" FontSize="16" Foreground="#333333" PasswordChar="*" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
43
                 </Border>
60
                 </Border>
44
             </StackPanel>
61
             </StackPanel>
45
-            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20,0,0,0">
62
+            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20,10,0,0">
46
                 <Viewbox Height="23">
63
                 <Viewbox Height="23">
47
                     <CheckBox   x:Name="ckSaveName" Click="CkSaveName_Click"/>
64
                     <CheckBox   x:Name="ckSaveName" Click="CkSaveName_Click"/>
48
                 </Viewbox>
65
                 </Viewbox>
50
             </StackPanel>
67
             </StackPanel>
51
             
68
             
52
             <!--第五行 开始按钮-->
69
             <!--第五行 开始按钮-->
53
-            <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="登录" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="43" Margin="10,0,10,0" Click="BtnStart_Click">
70
+            <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="登录" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="50" Margin="10,0,10,0" Click="BtnStart_Click">
54
                 <Button.Template>
71
                 <Button.Template>
55
                     <ControlTemplate TargetType="{x:Type Button}">
72
                     <ControlTemplate TargetType="{x:Type Button}">
56
                         <Border
73
                         <Border
57
                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
74
                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
58
                                 BorderThickness="1"
75
                                 BorderThickness="1"
59
-                                CornerRadius="2">
76
+                                CornerRadius="7">
60
                             <Border.Background>#2D8CF0</Border.Background>
77
                             <Border.Background>#2D8CF0</Border.Background>
61
                             <ContentPresenter
78
                             <ContentPresenter
62
                                     HorizontalAlignment="Center"
79
                                     HorizontalAlignment="Center"
67
                 </Button.Template>
84
                 </Button.Template>
68
             </Button>
85
             </Button>
69
         </Grid>
86
         </Grid>
87
+                                                                        </Border>
88
+                                                                    </Border>
89
+                                                                </Border>
90
+                                                            </Border>
91
+                                                        </Border>
92
+                                                    </Border>
93
+                                                </Border>
94
+                                            </Border>
95
+                                        </Border>
96
+                                    </Border>
97
+                                </Border>
98
+                            </Border>
99
+                        </Border>
100
+                    </Border>
101
+                </Border>
102
+            </Border>
103
+        <!--</Border>-->
70
     </Viewbox>
104
     </Viewbox>
71
 </Window>
105
 </Window>

+ 3
- 1
XHWK.WKTool/LoginWindow.xaml.cs View File

68
                 MessageBox.Show("密码未输入");
68
                 MessageBox.Show("密码未输入");
69
                 return;
69
                 return;
70
             }
70
             }
71
+            APP.myloading.Show();
71
             Login();
72
             Login();
72
         }
73
         }
73
         /// <summary>
74
         /// <summary>
99
                     System.IO.File.WriteAllText(applicationData, accountNumbers, Encoding.Default);//存放账号
100
                     System.IO.File.WriteAllText(applicationData, accountNumbers, Encoding.Default);//存放账号
100
                 }
101
                 }
101
 
102
 
102
-
103
+                APP.myloading.Hide();
103
                 //UpdateSettingString("userName", txbAccountNumber.Text);
104
                 //UpdateSettingString("userName", txbAccountNumber.Text);
104
                 APP.IsLoginType = true;
105
                 APP.IsLoginType = true;
105
                 txbAccountNumber.Text = string.Empty;
106
                 txbAccountNumber.Text = string.Empty;
131
             }
132
             }
132
             else
133
             else
133
             {
134
             {
135
+                APP.myloading.Hide();
134
                 MessageBox.Show(APP.ServerMsg);
136
                 MessageBox.Show(APP.ServerMsg);
135
             }
137
             }
136
         }
138
         }

+ 4
- 4
XHWK.WKTool/PracticeWindow.xaml.cs View File

33
         /// <summary>
33
         /// <summary>
34
         /// 当前画笔颜色
34
         /// 当前画笔颜色
35
         /// </summary>
35
         /// </summary>
36
-        Color Colour=Colors.Black;
36
+        Color Colour=Colors.Red;
37
         /// <summary>
37
         /// <summary>
38
         /// 当前画笔宽
38
         /// 当前画笔宽
39
         /// </summary>
39
         /// </summary>
111
             Colour = Colors.Red;
111
             Colour = Colors.Red;
112
         }
112
         }
113
         /// <summary>
113
         /// <summary>
114
-        /// 画笔颜色事件 
114
+        /// 画笔颜色事件 
115
         /// </summary>
115
         /// </summary>
116
         /// <param name="sender"></param>
116
         /// <param name="sender"></param>
117
         /// <param name="e"></param>
117
         /// <param name="e"></param>
118
         public void Gray()
118
         public void Gray()
119
         {
119
         {
120
             //flg = 0;
120
             //flg = 0;
121
-            drawingAttributes.Color = Colors.Gray;
122
-            Colour = Colors.Gray;
121
+            drawingAttributes.Color = Colors.Black;
122
+            Colour = Colors.Black;
123
         }
123
         }
124
         /// <summary>
124
         /// <summary>
125
         /// 画笔颜色事件 青色
125
         /// 画笔颜色事件 青色

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

13
         <SolidColorBrush Opacity="0" Color="#292C2E" />
13
         <SolidColorBrush Opacity="0" Color="#292C2E" />
14
     </Window.Background>
14
     </Window.Background>
15
     <Viewbox>
15
     <Viewbox>
16
-        <Grid>
16
+        <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown">
17
             <Grid.RowDefinitions>
17
             <Grid.RowDefinitions>
18
                 <RowDefinition Height="auto"/>
18
                 <RowDefinition Height="auto"/>
19
                 <RowDefinition Height="auto"/>
19
                 <RowDefinition Height="auto"/>
21
             <Image x:Name="imgCanvas" Visibility="Collapsed"/>
21
             <Image x:Name="imgCanvas" Visibility="Collapsed"/>
22
             <InkCanvas Grid.Row="0" x:Name="blackboard_canvas" Background="Transparent" Visibility="Collapsed" Grid.RowSpan="2" />
22
             <InkCanvas Grid.Row="0" x:Name="blackboard_canvas" Background="Transparent" Visibility="Collapsed" Grid.RowSpan="2" />
23
             <!--画笔工具栏-->
23
             <!--画笔工具栏-->
24
-            <Grid Grid.Row="0" x:Name="gridToolbar" Visibility="Visible">
24
+            <Grid Grid.Row="0" x:Name="gridToolbar" Visibility="Collapsed">
25
                 <Image Grid.Row="0"  Source="./Images/Toobar22.png" HorizontalAlignment="Right"/>
25
                 <Image Grid.Row="0"  Source="./Images/Toobar22.png" HorizontalAlignment="Right"/>
26
                 <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,5,10,0">
26
                 <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,5,10,0">
27
                     <Button  Cursor="Hand" x:Name="btnToolbarDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnToolbarDown_Click">
27
                     <Button  Cursor="Hand" x:Name="btnToolbarDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnToolbarDown_Click">
51
                 </StackPanel>
51
                 </StackPanel>
52
             </Grid>
52
             </Grid>
53
             <!--字体颜色-->
53
             <!--字体颜色-->
54
-            <Grid Grid.Row="0" x:Name="gridColour" Visibility="Visible">
54
+            <Grid Grid.Row="0" x:Name="gridColour" Visibility="Collapsed">
55
                 <Image Source="./Images/Toobar20.png" HorizontalAlignment="Right" Margin="0,200,62,0"/>
55
                 <Image Source="./Images/Toobar20.png" HorizontalAlignment="Right" Margin="0,200,62,0"/>
56
                 <StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,215,68,0">
56
                 <StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,215,68,0">
57
                     <Button  Cursor="Hand" x:Name="btnWhite" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="15" Width="15" Margin="0,0,0,0" Click="BtnWhite_Click"/>
57
                     <Button  Cursor="Hand" x:Name="btnWhite" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="15" Width="15" Margin="0,0,0,0" Click="BtnWhite_Click"/>
81
                 <Button x:Name="BtnStopRecordingScreen" Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0" Click="BtnStopRecordingScreen_Click">
81
                 <Button x:Name="BtnStopRecordingScreen" Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0" Click="BtnStopRecordingScreen_Click">
82
                     <Image x:Name="ImgEndRecordingScreen" Source="./Images/Toobar14.png"/>
82
                     <Image x:Name="ImgEndRecordingScreen" Source="./Images/Toobar14.png"/>
83
                 </Button>
83
                 </Button>
84
-                <Button  Cursor="Hand" x:Name="btnBrush" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnBrush_Click">
84
+                <Button  Cursor="Hand" x:Name="btnBlackPen" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnBlackPen_Click">
85
                     <Image Source="./Images/Toobar8.png"/>
85
                     <Image Source="./Images/Toobar8.png"/>
86
                 </Button>
86
                 </Button>
87
             </StackPanel>
87
             </StackPanel>

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

371
                 Directory.CreateDirectory(tempPath);
371
                 Directory.CreateDirectory(tempPath);
372
             }
372
             }
373
             string imagePath = Path.Combine(tempPath, time + ".jpg");
373
             string imagePath = Path.Combine(tempPath, time + ".jpg");
374
-            ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath);
374
+            //ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), imagePath);
375
             if (gridToolbar.Visibility == Visibility.Visible)
375
             if (gridToolbar.Visibility == Visibility.Visible)
376
             {
376
             {
377
                 gridToolbar.Visibility = Visibility.Hidden;
377
                 gridToolbar.Visibility = Visibility.Hidden;
590
         /// 停止录屏
590
         /// 停止录屏
591
         /// </summary>
591
         /// </summary>
592
         public event StopRecordingScreen Click_stopRecordingScreen;
592
         public event StopRecordingScreen Click_stopRecordingScreen;
593
+        /// <summary>
594
+        /// 黑笔
595
+        /// </summary>
596
+        /// <param name="sender"></param>
597
+        /// <param name="e"></param>
598
+        private void BtnBlackPen_Click(object sender, RoutedEventArgs e)
599
+        {
593
 
600
 
601
+        }
602
+        /// <summary>
603
+        /// 移动工具栏
604
+        /// </summary>
605
+        /// <param name="sender"></param>
606
+        /// <param name="e"></param>
607
+        private void Grid_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
608
+        {
609
+            DragMove();
610
+        }
594
     }
611
     }
595
 }
612
 }

+ 67
- 56
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
          xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
6
          xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
7
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
7
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
8
+        xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
8
         xmlns:local="clr-namespace:XHWK.WKTool"
9
         xmlns:local="clr-namespace:XHWK.WKTool"
9
         mc:Ignorable="d"
10
         mc:Ignorable="d"
10
         Title="星火微课系统" Height="1040" Width="1276" WindowStartupLocation="CenterScreen"
11
         Title="星火微课系统" Height="1040" Width="1276" WindowStartupLocation="CenterScreen"
29
     </Window.BorderBrush>
30
     </Window.BorderBrush>
30
 
31
 
31
     <Viewbox>
32
     <Viewbox>
32
-        <Grid x:Name="GridContent" Height="1040">
33
+        <Border Background="#cdcdcd" Height="1040" Width="1280">
34
+            <Grid x:Name="GridContent" Height="1036" Width="1276">
33
 
35
 
34
             <!--分3行-->
36
             <!--分3行-->
35
             <Grid.RowDefinitions>
37
             <Grid.RowDefinitions>
36
-                <RowDefinition Height="110"/>
38
+                <RowDefinition Height="106"/>
37
                 <RowDefinition Height="*"/>
39
                 <RowDefinition Height="*"/>
38
                 <RowDefinition Height="40"/>
40
                 <RowDefinition Height="40"/>
39
             </Grid.RowDefinitions>
41
             </Grid.RowDefinitions>
101
                             <TextBlock Text="停止" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
103
                             <TextBlock Text="停止" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
102
                         </StackPanel>
104
                         </StackPanel>
103
                     </Button>
105
                     </Button>
106
+                    <TextBlock x:Name="txbType" Text="" FontSize="20" Foreground="#FFFFFF" Margin="20,20,0,0"/>
104
                 </StackPanel>
107
                 </StackPanel>
105
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
108
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
106
                     <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click" Margin="0,0,30,0">
109
                     <Button Cursor="Hand" x:Name="btnAdd" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnAdd_Click" Margin="0,0,30,0">
117
                             <TextBlock Text="打印" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
120
                             <TextBlock Text="打印" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
118
                         </StackPanel>
121
                         </StackPanel>
119
                     </Button>
122
                     </Button>
120
-                    <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click" Margin="0,0,30,0">
123
+                    <!--<Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click" Margin="0,0,30,0">
121
                         <StackPanel Orientation="Vertical">
124
                         <StackPanel Orientation="Vertical">
122
                             <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_15.png" Visibility="Collapsed"/>
125
                             <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_15.png" Visibility="Collapsed"/>
123
                             <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_16.png" Visibility="Visible"/>
126
                             <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_16.png" Visibility="Visible"/>
124
                             <TextBlock Text="上传" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
127
                             <TextBlock Text="上传" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
125
                         </StackPanel>
128
                         </StackPanel>
129
+                    </Button>-->
130
+                    <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnUpload_Click">
131
+                        <StackPanel Orientation="Vertical">
132
+                            <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_22.png" Visibility="Collapsed"/>
133
+                            <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_1.png" Visibility="Visible"/>
134
+                            <TextBlock Text="我的" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
135
+                        </StackPanel>
126
                     </Button>
136
                     </Button>
127
                     <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnSetUp_Click">
137
                     <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnSetUp_Click">
128
                         <StackPanel Orientation="Vertical">
138
                         <StackPanel Orientation="Vertical">
134
                 </StackPanel>
144
                 </StackPanel>
135
             </Grid>
145
             </Grid>
136
             <!--主内容-->
146
             <!--主内容-->
137
-            <Grid Grid.Row="1" x:Name="GridMain" Width="1276">
138
-                <ScrollViewer x:Name="scroMain" VerticalScrollBarVisibility="Visible">
139
-                    <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Visibility="Visible" Height="1780">
140
-                        <Grid>
141
-                            <Border Grid.Row="1"  CornerRadius="5">
142
-                                <Grid x:Name="IMG" Margin="0,0,0,0">
143
-                                    <Grid.Resources>
144
-                                        <TransformGroup x:Key="Imageview">
145
-                                            <ScaleTransform/>
146
-                                            <TranslateTransform/>
147
-                                        </TransformGroup>
148
-                                    </Grid.Resources>
147
+                <Grid Grid.Row="1" x:Name="GridMain" Width="1276" >
148
+                    <ScrollViewer x:Name="scroMain" VerticalScrollBarVisibility="Visible">
149
+                        <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Visibility="Visible" Height="1780">
150
+                            <Grid>
151
+                                <Border Grid.Row="1"  CornerRadius="5">
152
+                                    <Grid x:Name="IMG" Margin="0,0,0,0">
153
+                                        <Grid.Resources>
154
+                                            <TransformGroup x:Key="Imageview">
155
+                                                <ScaleTransform/>
156
+                                                <TranslateTransform/>
157
+                                            </TransformGroup>
158
+                                        </Grid.Resources>
149
 
159
 
150
-                                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
160
+                                        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
151
                   Margin="0,0,0,0" Focusable="False" x:Name="BackFrame">
161
                   Margin="0,0,0,0" Focusable="False" x:Name="BackFrame">
152
-                                        <ContentControl  MouseLeftButtonDown="IMG1_MouseLeftButtonDown"   
162
+                                            <ContentControl  MouseLeftButtonDown="IMG1_MouseLeftButtonDown"   
153
                              MouseLeftButtonUp="IMG1_MouseLeftButtonUp"
163
                              MouseLeftButtonUp="IMG1_MouseLeftButtonUp"
154
                              MouseMove="IMG1_MouseMove"
164
                              MouseMove="IMG1_MouseMove"
155
                              MouseWheel="IMG1_MouseWheel" >
165
                              MouseWheel="IMG1_MouseWheel" >
156
-                                            <Image Name="imgCanvas" Width="635" Height="auto" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}">
157
-                                            </Image>
158
-                                        </ContentControl>
159
-                                    </ScrollViewer>
160
-                                </Grid>
161
-                            </Border>
162
-                        </Grid>
163
-                        <Image x:Name="imgDocumentation"/>
164
-                        <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
165
-                        <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
166
-                        <!--摄像头-->
167
-                        <!--<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">
166
+                                                <Image Name="imgCanvas" Width="635" Height="auto" VerticalAlignment="Top" HorizontalAlignment="Left" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}" MouseRightButtonDown="imgCanvas_MouseRightButtonDown">
167
+                                                </Image>
168
+                                            </ContentControl>
169
+                                        </ScrollViewer>
170
+                                    </Grid>
171
+                                </Border>
172
+                            </Grid>
173
+                            <!--导入图片-->
174
+                            <Image x:Name="imgDocumentation"/>
175
+                            <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
176
+                            <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
177
+                            <!--摄像头-->
178
+                            <!--<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">
168
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
179
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
169
                 </wfi:WindowsFormsHost>-->
180
                 </wfi:WindowsFormsHost>-->
170
-
171
-
172
-
173
-
174
-                    </Grid>
175
-                </ScrollViewer>
176
-                <Image x:Name="imgPlayerLeft" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
177
-                <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,26,10" VerticalAlignment="Top" Visibility="Collapsed"/>
178
-                <Image x:Name="imgPlayerLeftUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
179
-                <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,26,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
180
-                <Label Content="" Grid.Column="0" Height="2" Width="2" HorizontalAlignment="Left"  VerticalAlignment="Top" Background="#FF0F0F0F" Margin="1,0,0,0"/>
181
-                <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,16,0"/>
182
-                <Label Content="" Grid.Column="0" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
183
-                <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,0"/>
184
-            </Grid>
185
-
186
-            <Grid Grid.Row="1">
187
-                <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Center"
188
-            Height="58" Margin="0,520,0,0" Grid.Column="1" VerticalAlignment="Bottom">
181
+                            <!--<Image x:Name="imgLoad"
182
+                    Width="300"
183
+                    Height="300"
184
+                    gifLib:ImageBehavior.AnimatedSource="./Images/img_load.gif" VerticalAlignment="Top" Margin="0,200,0,0" Visibility="Visible"/>-->
185
+                        </Grid>
186
+                    </ScrollViewer>
187
+                    <Image x:Name="imgPlayerLeft" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
188
+                    <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,26,10" VerticalAlignment="Top" Visibility="Collapsed"/>
189
+                    <Image x:Name="imgPlayerLeftUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
190
+                    <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,26,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
191
+                    <Label Content="" Grid.Column="0" Height="2" Width="2" HorizontalAlignment="Left"  VerticalAlignment="Top" Background="#FF0F0F0F" Margin="1,0,0,0"/>
192
+                    <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,16,0"/>
193
+                    <Label Content="" Grid.Column="0" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
194
+                    <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,0"/>
195
+                </Grid>
196
+                <!--页码-->
197
+                <Grid Grid.Row="1" x:Name="gridPage" Visibility="Collapsed" Background="#FFFFFF">
198
+                    <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Center"
199
+            Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
189
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
200
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
190
                     x:Name="last_button"
201
                     x:Name="last_button"
191
-                    Width="60" Height="50"
202
+                    Width="60" Height="20"
192
                     Click="last_button_Click">
203
                     Click="last_button_Click">
193
                         <Button.Content>
204
                         <Button.Content>
194
                             <StackPanel>
205
                             <StackPanel>
195
-                                <Image Width="16" Source=".\Images\class_p1.png" />
206
+                                <Image Width="16" Height="12" Source=".\Images\class_p1.png" />
196
                             </StackPanel>
207
                             </StackPanel>
197
                         </Button.Content>
208
                         </Button.Content>
198
                     </Button>
209
                     </Button>
201
                             <RowDefinition Height="311*"/>
212
                             <RowDefinition Height="311*"/>
202
                             <RowDefinition Height="483*"/>
213
                             <RowDefinition Height="483*"/>
203
                         </Grid.RowDefinitions>
214
                         </Grid.RowDefinitions>
204
-                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-25,0,0" Grid.Row="1"  Background="Transparent">
205
-
215
+                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-12,0,0" Grid.Row="1"  Background="Transparent">
206
                             <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
216
                             <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
207
                                 <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15"/>
217
                                 <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15"/>
208
                                 <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
218
                                 <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
212
                     </Grid>
222
                     </Grid>
213
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
223
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
214
                     x:Name="next_btn"  Background="Transparent"
224
                     x:Name="next_btn"  Background="Transparent"
215
-                    Width="60" Height="50"
225
+                    Width="60" Height="20"
216
                     Click="next_btn_Click">
226
                     Click="next_btn_Click">
217
                         <Button.Content>
227
                         <Button.Content>
218
                             <StackPanel>
228
                             <StackPanel>
219
-                                <Image Width="16" Source=".\Images\class_p2.png" />
229
+                                <Image Width="16" Height="12" Source=".\Images\class_p2.png" />
220
                             </StackPanel>
230
                             </StackPanel>
221
                         </Button.Content>
231
                         </Button.Content>
222
                     </Button>
232
                     </Button>
306
                     </Button.Template>
316
                     </Button.Template>
307
                 </Button>
317
                 </Button>
308
             </Grid>
318
             </Grid>
309
-            <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,2,0,0">
319
+            <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
310
                 <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
320
                 <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
311
                     <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
321
                     <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
312
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0"/>
322
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0"/>
313
                     <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click"/>
323
                     <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click"/>
314
-                    <Button Cursor="Hand" x:Name="btnGray" Background="#A7A9AC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnGray_Click"/>
324
+                    <Button Cursor="Hand" x:Name="btnGray" Background="#333333" Width="20" Height="20" Margin="5,2,0,0" Click="BtnGray_Click"/>
315
                     <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,2,0,0" Click="BtnCyanBlue_Click"/>
325
                     <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,2,0,0" Click="BtnCyanBlue_Click"/>
316
                     <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,2,0,0" Click="BtnYellow_Click"/>
326
                     <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,2,0,0" Click="BtnYellow_Click"/>
317
                     <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click"/>
327
                     <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click"/>
331
                 </StackPanel>
341
                 </StackPanel>
332
             </Grid>
342
             </Grid>
333
         </Grid>
343
         </Grid>
344
+        </Border>
334
     </Viewbox>
345
     </Viewbox>
335
 </Window>
346
 </Window>

+ 162
- 31
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

23
 using System.Text;
23
 using System.Text;
24
 using System.Collections.Specialized;
24
 using System.Collections.Specialized;
25
 using XHWK.WKTool.Config;
25
 using XHWK.WKTool.Config;
26
-using System.Windows.Media.Converters;
26
+using System.Windows.Threading;
27
 
27
 
28
 namespace XHWK.WKTool
28
 namespace XHWK.WKTool
29
 {
29
 {
56
         /// <summary>
56
         /// <summary>
57
         /// 当前颜色
57
         /// 当前颜色
58
         /// </summary>
58
         /// </summary>
59
-        private System.Windows.Media.Color Color = System.Windows.Media.Colors.Black;
59
+        private System.Windows.Media.Color Color = System.Windows.Media.Colors.Red;
60
         /// <summary>
60
         /// <summary>
61
         /// 笔迹粗细
61
         /// 笔迹粗细
62
         /// </summary>
62
         /// </summary>
63
         private int PenSize = 2;
63
         private int PenSize = 2;
64
+        private DispatcherTimer t = null;
65
+        /// <summary>
66
+        /// 计时器状态
67
+        /// </summary>
68
+        private enum State
69
+        {
70
+            Start,
71
+            Pause,
72
+            End
73
+        }
74
+        /// <summary>
75
+        /// 状态
76
+        /// </summary>
77
+        private State _state = State.End;
78
+        /// <summary>
79
+        /// 计时用
80
+        /// </summary>
81
+        private TimeSpan _timeSpan = new TimeSpan(0, 0, 0, 0, 0);
64
         #endregion
82
         #endregion
65
 
83
 
66
         #region 初始化
84
         #region 初始化
106
             #region 数据初始化
124
             #region 数据初始化
107
             APP.pageData.pagenum = 0;
125
             APP.pageData.pagenum = 0;
108
             APP.pageData.currpage = APP.pageData.pagenum;
126
             APP.pageData.currpage = APP.pageData.pagenum;
127
+            btnStop.IsEnabled = false;//停止录制按钮不可点击
109
             #endregion
128
             #endregion
110
 
129
 
111
 
130
 
126
             //wfhCamera.Visibility = Visibility.Hidden;
145
             //wfhCamera.Visibility = Visibility.Hidden;
127
             ImgPDFPath = null;
146
             ImgPDFPath = null;
128
             ImgPDFPath = new string[300];
147
             ImgPDFPath = new string[300];
148
+          
149
+        }
150
+        /// <summary>
151
+        /// 开始
152
+        /// </summary>
153
+        /// <param name="sender"></param>
154
+        /// <param name="e"></param>
155
+        private void Stack()
156
+        {
157
+            _state = State.Start;
158
+        }
159
+        /// <summary>
160
+        /// 暂停
161
+        /// </summary>
162
+        private void TimeOut()
163
+        {
164
+            _state = State.Pause;
165
+        }
166
+        /// <summary>
167
+        /// 结束
168
+        /// </summary>
169
+        /// <param name="sender"></param>
170
+        /// <param name="e"></param>
171
+        private void End()
172
+        {
173
+            _state = State.End;
174
+        }
175
+        /// <summary>
176
+        /// 时钟回调
177
+        /// </summary>
178
+        /// <param name="sender"></param>
179
+        /// <param name="e"></param>
180
+        private void OnTimer(object sender, EventArgs e)
181
+        {
182
+            switch (_state)
183
+            {
184
+                case State.Start:
185
+                    {
186
+                        _timeSpan += new TimeSpan(0, 0, 0, 1);
187
+                    }
188
+                    break;
189
+
190
+                case State.Pause:
191
+                    {
192
+                    }
193
+                    break;
194
+
195
+                case State.End:
196
+                    {
197
+                        _timeSpan = new TimeSpan();
198
+                        //_timeSpan = new TimeSpan(0, 23, 12, 45, 54);
199
+                    }
200
+                    break;
201
+            }
202
+
203
+            string time = string.Format("{0:D2}:{1:D2}",/* _timeSpan.Hours,*/ _timeSpan.Minutes, _timeSpan.Seconds);
204
+            //txbTime.Text = time;
129
         }
205
         }
130
         /// <summary>
206
         /// <summary>
131
         /// 修改布局
207
         /// 修改布局
351
             }))).Start();
427
             }))).Start();
352
 
428
 
353
         }
429
         }
354
-
355
         /// <summary>
430
         /// <summary>
356
         /// 上传事件
431
         /// 上传事件
357
         /// </summary>
432
         /// </summary>
448
             //}
523
             //}
449
             #endregion
524
             #endregion
450
 
525
 
526
+            ImgRecord.Visibility = Visibility.Visible;//设置结束时可录制
527
+            ImgRecordTwo.Visibility = Visibility.Collapsed;//设置结束时可录制
528
+            BtnRecord.IsEnabled = true;//设置结束时可录制
451
             if (rbnMP4.IsChecked == true)
529
             if (rbnMP4.IsChecked == true)
452
             {
530
             {
453
                 //存储文件
531
                 //存储文件
506
                 GridMain.Visibility = Visibility.Collapsed;
584
                 GridMain.Visibility = Visibility.Collapsed;
507
                 gridSetUp.Visibility = Visibility.Visible;
585
                 gridSetUp.Visibility = Visibility.Visible;
508
                 txbStoragePath.Content = APP.WKData.WkPath;
586
                 txbStoragePath.Content = APP.WKData.WkPath;
587
+                ImgRecord.Visibility = Visibility.Collapsed;//设置时不可录制
588
+                ImgRecordTwo.Visibility = Visibility.Visible;//设置时不可录制
589
+                BtnRecord.IsEnabled = false;//设置时不可录制
509
                 ///  < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
590
                 ///  < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
510
                 if ("1".Equals(APP.CameraPosition))
591
                 if ("1".Equals(APP.CameraPosition))
511
                 {
592
                 {
579
             Color = Colors.Red;
660
             Color = Colors.Red;
580
         }
661
         }
581
         /// <summary>
662
         /// <summary>
582
-        /// 画笔颜色事件 
663
+        /// 画笔颜色事件 
583
         /// </summary>
664
         /// </summary>
584
         /// <param name="sender"></param>
665
         /// <param name="sender"></param>
585
         /// <param name="e"></param>
666
         /// <param name="e"></param>
586
         private void BtnGray_Click(object sender, RoutedEventArgs e)
667
         private void BtnGray_Click(object sender, RoutedEventArgs e)
587
         {
668
         {
588
-            drawingAttributes.Color = Colors.Gray;
589
-            Color = Colors.Gray;
669
+            drawingAttributes.Color = Colors.Black;
670
+            Color = Colors.Black;
590
         }
671
         }
591
         /// <summary>
672
         /// <summary>
592
         /// 画笔颜色事件 青色
673
         /// 画笔颜色事件 青色
701
         {
782
         {
702
             string time = GetTimeStamp();
783
             string time = GetTimeStamp();
703
             string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + time + ".jpg";
784
             string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + time + ".jpg";
704
-            ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), desktopPath);
705
-
785
+            ImageHelper.GetScreenshot(new System.Drawing.Rectangle(0, 0, 0, 0), desktopPath,false,out BitmapImage bitmap);
786
+            if (this.WindowState == WindowState.Normal)//截图隐藏窗口
787
+            {
788
+                this.WindowState = WindowState.Minimized;
789
+            }
706
             if (APP.W_JieTuWindow != null)
790
             if (APP.W_JieTuWindow != null)
707
             {
791
             {
708
                 APP.W_JieTuWindow.initialization();
792
                 APP.W_JieTuWindow.initialization();
729
         {
813
         {
730
             if ("关闭窗口".Equals(text))
814
             if ("关闭窗口".Equals(text))
731
             {
815
             {
816
+                if (this.WindowState == WindowState.Minimized)//截图完恢复窗口
817
+                {
818
+                    this.WindowState = WindowState.Normal;
819
+                }
732
                 if (!string.IsNullOrWhiteSpace(APP.ImgPath) && File.Exists(APP.ImgPath))
820
                 if (!string.IsNullOrWhiteSpace(APP.ImgPath) && File.Exists(APP.ImgPath))
733
                 {
821
                 {
734
                     if (APP.pageData.currpage == 0)
822
                     if (APP.pageData.currpage == 0)
735
                     {
823
                     {
736
                         APP.pageData.pagenum += 1;
824
                         APP.pageData.pagenum += 1;
737
                         APP.pageData.currpage = APP.pageData.pagenum;
825
                         APP.pageData.currpage = APP.pageData.pagenum;
826
+                        gridPage.Visibility = Visibility.Visible;//页码大于0 显示
738
                     }
827
                     }
739
                     if (APP.PageDrawList.Count >= APP.pageData.currpage)
828
                     if (APP.PageDrawList.Count >= APP.pageData.currpage)
740
                     {
829
                     {
748
                         model_DrawData.PdfImagePath = APP.ImgPath;
837
                         model_DrawData.PdfImagePath = APP.ImgPath;
749
                         APP.PageDrawList.Add(model_DrawData);
838
                         APP.PageDrawList.Add(model_DrawData);
750
                     }
839
                     }
751
-                    //if (!string.IsNullOrWhiteSpace(APP.JPaths[APP.pageData.currpage]))
752
-                    //{
753
-                    //    //imgCanvas.Source = new BitmapImage(new Uri(APP.JPaths[APP.pageData.currpage]));
754
-                    //    imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage-1].PageImagePath));
755
-                    //}
756
                     if (APP.PageDrawList.Count >= APP.pageData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
840
                     if (APP.PageDrawList.Count >= APP.pageData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
757
                     {
841
                     {
758
-                        //imgCanvas.Source = new BitmapImage(new Uri(APP.JPaths[APP.pageData.currpage]));
759
                         imgDocumentation.Source = null;
842
                         imgDocumentation.Source = null;
760
                         imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
843
                         imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
761
-                        //btnOk.Visibility = Visibility.Visible;
762
-                        //blackboard_canvas.Visibility = Visibility.Collapsed;
763
                         APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation = false;
844
                         APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation = false;
764
                         ImgPrint.Visibility = Visibility.Visible;//截图成功可打印
845
                         ImgPrint.Visibility = Visibility.Visible;//截图成功可打印
765
                         ImgPrintTwo.Visibility = Visibility.Collapsed;
846
                         ImgPrintTwo.Visibility = Visibility.Collapsed;
773
         /// </summary>
854
         /// </summary>
774
         private void JietuWindow_click_closeJietuWindowClick()
855
         private void JietuWindow_click_closeJietuWindowClick()
775
         {
856
         {
857
+            if (this.WindowState == WindowState.Minimized)//截图完恢复窗口
858
+            {
859
+                this.WindowState = WindowState.Normal;
860
+            }
776
             APP.W_JieTuWindow = null;
861
             APP.W_JieTuWindow = null;
777
         }
862
         }
778
         /// <summary>
863
         /// <summary>
832
             {
917
             {
833
                 if (ofd.FileName != "")
918
                 if (ofd.FileName != "")
834
                 {
919
                 {
920
+                    APP.myloading.Show();
921
+
835
                     #region PPT转PDF
922
                     #region PPT转PDF
836
                     string filepath = ofd.FileName;
923
                     string filepath = ofd.FileName;
837
                     string path = ofd.SafeFileName.Replace(".ppt", "").Trim();
924
                     string path = ofd.SafeFileName.Replace(".ppt", "").Trim();
913
                             {
1000
                             {
914
                                 APP.pageData.currpage = APP.pageData.pagenum + 1;
1001
                                 APP.pageData.currpage = APP.pageData.pagenum + 1;
915
                                 APP.pageData.pagenum += num;
1002
                                 APP.pageData.pagenum += num;
1003
+                                gridPage.Visibility = Visibility.Visible;//页码大于0 显示
916
                             }
1004
                             }
917
                             if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1005
                             if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
918
                             {
1006
                             {
931
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1019
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
932
                                 btnScreenshot.IsEnabled = true;
1020
                                 btnScreenshot.IsEnabled = true;
933
                             }
1021
                             }
1022
+                            APP.myloading.Hide();
934
                         }
1023
                         }
935
                         catch (Exception ex)
1024
                         catch (Exception ex)
936
                         {
1025
                         {
1026
+                            APP.myloading.Hide();
937
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog PPT)" + ex.Message, ex);
1027
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog PPT)" + ex.Message, ex);
938
                         }
1028
                         }
939
                     }
1029
                     }
991
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1081
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
992
                                 btnScreenshot.IsEnabled = true;
1082
                                 btnScreenshot.IsEnabled = true;
993
                             }
1083
                             }
1084
+                            APP.myloading.Hide();
994
                         }
1085
                         }
995
                         catch (Exception ex)
1086
                         catch (Exception ex)
996
                         {
1087
                         {
1088
+                            APP.myloading.Hide();
997
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1089
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
998
                         }
1090
                         }
999
                     }
1091
                     }
1064
                 System.Windows.MessageBox.Show("请先导入文档或截图!");
1156
                 System.Windows.MessageBox.Show("请先导入文档或截图!");
1065
                 return;
1157
                 return;
1066
             }
1158
             }
1159
+
1160
+            //btnStop.IsEnabled = true;//停止录制按钮可点击
1067
             StartRecord();
1161
             StartRecord();
1068
         }
1162
         }
1069
         /// <summary>
1163
         /// <summary>
1093
             {
1187
             {
1094
                 if (IsFirstR)//是否第一次录制  初始化录制
1188
                 if (IsFirstR)//是否第一次录制  初始化录制
1095
                 {
1189
                 {
1190
+                    #region 计时器初始化
1191
+                    if (t == null)
1192
+                    {
1193
+                        t = new DispatcherTimer();
1194
+                        t.Tick += OnTimer;
1195
+                        t.Interval = new TimeSpan(0, 0, 0, 1);
1196
+                        t.IsEnabled = true;
1197
+                        t.Start();
1198
+                    }
1199
+                    t.Interval = new TimeSpan(0, 0, 0, 1);
1200
+                    Stack(); 
1201
+                    #endregion
1202
+
1096
                     VideoInfo = new Model_Video();
1203
                     VideoInfo = new Model_Video();
1097
                     VideoInfo.VideoType = (Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"));
1204
                     VideoInfo.VideoType = (Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"));
1098
                     VideoInfo.WkType = Enum_WKVidetype.RecordingLessons;
1205
                     VideoInfo.WkType = Enum_WKVidetype.RecordingLessons;
1162
 
1269
 
1163
                     btnLoginType.IsEnabled = false;
1270
                     btnLoginType.IsEnabled = false;
1164
                     #endregion
1271
                     #endregion
1165
-
1272
+                    #region 录像倒计时
1273
+                    if (APP.W_CountdownWindow == null)
1274
+                    {
1275
+                        APP.W_CountdownWindow = new CountdownWindow();
1276
+                        //APP.W_CountdownWindow.Topmost = true;
1277
+                    }
1278
+                    else
1279
+                    {
1280
+                        APP.W_CountdownWindow.Initialize();
1281
+                        //APP.W_CountdownWindow.Topmost = true;
1282
+                    }
1283
+                    APP.W_CountdownWindow.Show();
1284
+                    #endregion
1166
                     IsFirstR = false;
1285
                     IsFirstR = false;
1167
                     RsImgName = new List<string>();
1286
                     RsImgName = new List<string>();
1168
                     timer = new System.Timers.Timer(200);//设置执行一次(false)还是一直执行(true)
1287
                     timer = new System.Timers.Timer(200);//设置执行一次(false)还是一直执行(true)
1170
                     timer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
1289
                     timer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
1171
                     timer.Enabled = true; //启动计时器
1290
                     timer.Enabled = true; //启动计时器
1172
                 }
1291
                 }
1173
-                #region 录像倒计时
1174
-                if (APP.W_CountdownWindow == null)
1175
-                {
1176
-                    APP.W_CountdownWindow = new CountdownWindow();
1177
-                    //APP.W_CountdownWindow.Topmost = true;
1178
-                }
1179
-                else
1180
-                {
1181
-                    APP.W_CountdownWindow.Initialize();
1182
-                    //APP.W_CountdownWindow.Topmost = true;
1183
-                }
1184
-                APP.W_CountdownWindow.Show();
1185
-                #endregion
1292
+            
1186
                 //继续录制
1293
                 //继续录制
1187
                 IsSuspendR = false;
1294
                 IsSuspendR = false;
1188
                 //BtnRecording.Content = "暂停录制";
1295
                 //BtnRecording.Content = "暂停录制";
1323
                 btnSetUp.IsEnabled = true;
1430
                 btnSetUp.IsEnabled = true;
1324
 
1431
 
1325
                 btnLoginType.IsEnabled = true;
1432
                 btnLoginType.IsEnabled = true;
1433
+
1434
+
1435
+                //btnStop.IsEnabled = false;//停止录制按钮不可点击
1436
+
1326
                 #endregion
1437
                 #endregion
1327
 
1438
 
1328
                 IsSuspendR = true;
1439
                 IsSuspendR = true;
1329
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
1440
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
1330
                 ImgStop.Visibility = Visibility.Visible;
1441
                 ImgStop.Visibility = Visibility.Visible;
1331
                 ImgStopTwo.Visibility = Visibility.Collapsed;
1442
                 ImgStopTwo.Visibility = Visibility.Collapsed;
1332
-                TxbRecordingWord.Text = "保存中";
1443
+                txbType.Text = "保存中";
1333
                 #region 2秒内不可点击
1444
                 #region 2秒内不可点击
1334
                 new Thread(new ThreadStart(new Action(() =>
1445
                 new Thread(new ThreadStart(new Action(() =>
1335
                 {
1446
                 {
1391
                             BtnRecord.IsEnabled = true;
1502
                             BtnRecord.IsEnabled = true;
1392
                             btnStop.IsEnabled = true;
1503
                             btnStop.IsEnabled = true;
1393
                             TxbRecordingWord.Text = "录制";
1504
                             TxbRecordingWord.Text = "录制";
1505
+                            txbType.Text = "";
1394
                         });
1506
                         });
1395
                         FileToolsCommon.DeleteFile(ThumbnailPathName);
1507
                         FileToolsCommon.DeleteFile(ThumbnailPathName);
1396
                         VideoInfo.RSTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
1508
                         VideoInfo.RSTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
1434
                 blackboard_canvas.Visibility = Visibility.Visible;
1546
                 blackboard_canvas.Visibility = Visibility.Visible;
1435
             }
1547
             }
1436
             APP.pageData.pagenum += 1;
1548
             APP.pageData.pagenum += 1;
1549
+            gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1437
             APP.pageData.currpage = APP.pageData.pagenum;
1550
             APP.pageData.currpage = APP.pageData.pagenum;
1438
             myblackboard.changepage(APP.pageData.currpage - 1);
1551
             myblackboard.changepage(APP.pageData.currpage - 1);
1439
             ///清空页面图片UI
1552
             ///清空页面图片UI
2460
         /// </summary>
2573
         /// </summary>
2461
         [System.Runtime.InteropServices.DllImport("user32.dll")]
2574
         [System.Runtime.InteropServices.DllImport("user32.dll")]
2462
         private static extern int SetCursorPos(int x, int y);
2575
         private static extern int SetCursorPos(int x, int y);
2576
+        /// 截图的图片鼠标右键事件
2577
+        /// </summary>
2578
+        /// <param name="sender"></param>
2579
+        /// <param name="e"></param>
2580
+        private void imgCanvas_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
2581
+        {
2582
+            imgCanvas.Source = null;
2583
+        }
2463
 
2584
 
2585
+        private void Button_Click(object sender, RoutedEventArgs e)
2586
+        {
2587
+            //System.Windows.SplashScreen(LoadDialog);
2588
+            //Common.system.SplashScreen.Show(typeof(LoadDialog));
2589
+            //Thread.Sleep(5000);
2590
+            //Common.system.SplashScreen.Close();
2591
+            APP.myloading.Show();
2592
+            Thread.Sleep(1000);
2593
+            APP.myloading.Hide();
2594
+        }
2464
     }
2595
     }
2465
 }
2596
 }

+ 10
- 0
XHWK.WKTool/XHWK.WKTool.csproj View File

135
     <Compile Include="JieTuWindow.xaml.cs">
135
     <Compile Include="JieTuWindow.xaml.cs">
136
       <DependentUpon>JieTuWindow.xaml</DependentUpon>
136
       <DependentUpon>JieTuWindow.xaml</DependentUpon>
137
     </Compile>
137
     </Compile>
138
+    <Compile Include="LoadDialog.xaml.cs">
139
+      <DependentUpon>LoadDialog.xaml</DependentUpon>
140
+    </Compile>
138
     <Compile Include="LoginWindow.xaml.cs">
141
     <Compile Include="LoginWindow.xaml.cs">
139
       <DependentUpon>LoginWindow.xaml</DependentUpon>
142
       <DependentUpon>LoginWindow.xaml</DependentUpon>
140
     </Compile>
143
     </Compile>
181
       <SubType>Designer</SubType>
184
       <SubType>Designer</SubType>
182
       <Generator>MSBuild:Compile</Generator>
185
       <Generator>MSBuild:Compile</Generator>
183
     </Page>
186
     </Page>
187
+    <Page Include="LoadDialog.xaml">
188
+      <SubType>Designer</SubType>
189
+      <Generator>MSBuild:Compile</Generator>
190
+    </Page>
184
     <Page Include="PracticeWindow.xaml">
191
     <Page Include="PracticeWindow.xaml">
185
       <SubType>Designer</SubType>
192
       <SubType>Designer</SubType>
186
       <Generator>MSBuild:Compile</Generator>
193
       <Generator>MSBuild:Compile</Generator>
1515
   <ItemGroup>
1522
   <ItemGroup>
1516
     <Resource Include="Images\APP.png" />
1523
     <Resource Include="Images\APP.png" />
1517
   </ItemGroup>
1524
   </ItemGroup>
1525
+  <ItemGroup>
1526
+    <Resource Include="Images\img_load.gif" />
1527
+  </ItemGroup>
1518
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1528
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1519
 </Project>
1529
 </Project>

+ 2
- 2
XHWK.WKTool/ZConfig.cs View File

13
         /// <summary>
13
         /// <summary>
14
         /// 当前版本号
14
         /// 当前版本号
15
         /// </summary>
15
         /// </summary>
16
-        public static int versionCode = 1;
16
+        public static int versionCode = 2;
17
 
17
 
18
-        public static string versionName = "1.0.0";
18
+        public static string versionName = "1.0.1";
19
 
19
 
20
         //接口地址
20
         //接口地址
21
         public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : "http://schoolapi.xhkjedu.com";
21
         public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : "http://schoolapi.xhkjedu.com";

Loading…
Cancel
Save