Quellcode durchsuchen

激活码、验证记录

tags/录制修改前
zhangxueyang vor 4 Jahren
Ursprung
Commit
3dccac2560

+ 1
- 0
Common/Common.csproj Datei anzeigen

@@ -118,6 +118,7 @@
118 118
   <ItemGroup>
119 119
     <Compile Include="AESHelper.cs" />
120 120
     <Compile Include="Model\DownloadInfoModel.cs" />
121
+    <Compile Include="system\DataProvider.cs" />
121 122
     <Compile Include="system\KeyboardHookCommon.cs" />
122 123
     <Compile Include="system\LatticeFileHelper.cs" />
123 124
     <Compile Include="system\PdfTrunImage.cs" />

+ 51
- 0
Common/system/DataProvider.cs Datei anzeigen

@@ -0,0 +1,51 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.IO;
4
+using System.Linq;
5
+using System.Security.Cryptography;
6
+using System.Text;
7
+using System.Threading.Tasks;
8
+
9
+namespace Common.system
10
+{
11
+    public class DataProvider
12
+    {
13
+        ///3DES解密   
14
+        public static string TripleDESDecrypt(string pToDecrypt, string sKey)
15
+        {
16
+            sKey = sKey.Substring(0, 24);
17
+            TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider
18
+            {
19
+                Mode = CipherMode.ECB,
20
+                Padding = PaddingMode.Zeros
21
+            };
22
+            byte[] inputByteArray = new byte[pToDecrypt.Length / 2];
23
+            for (int x = 0; x < pToDecrypt.Length / 2; x++)
24
+            {
25
+                int i = (Convert.ToInt32(pToDecrypt.Substring(x * 2, 2), 16));
26
+                inputByteArray[x] = (byte)i;
27
+            }
28
+
29
+            des.Key = ASCIIEncoding.ASCII.GetBytes(sKey);
30
+            des.IV = new byte[] { 0, 00, 00, 00, 00, 00, 00, 00, };
31
+            MemoryStream ms = new MemoryStream();
32
+            CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write);
33
+            cs.Write(inputByteArray, 0, inputByteArray.Length);
34
+            cs.FlushFinalBlock();
35
+
36
+            StringBuilder ret = new StringBuilder();
37
+
38
+            return System.Text.Encoding.Default.GetString(ms.ToArray()).Replace("\0", "");
39
+        }
40
+        /// <summary>
41
+        /// 返回一个时间戳到秒
42
+        /// </summary>
43
+        /// <returns></returns>
44
+        public static long TimestampTotalSeconds()
45
+        {
46
+            TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
47
+            long timestr = Convert.ToInt64(ts.TotalSeconds);
48
+            return timestr;
49
+        }
50
+    }
51
+}

+ 33
- 0
XHWK.Model/Model_Signatures.cs Datei anzeigen

@@ -0,0 +1,33 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace XHWK.Model
8
+{
9
+    public class Model_Signatures
10
+    {
11
+
12
+        /// <summary>
13
+        /// 开始时间
14
+        /// </summary>
15
+        public long begintime { get; set; }
16
+        /// <summary>
17
+        /// 激活码
18
+        /// </summary>
19
+        public string code { get; set; }
20
+        /// <summary>
21
+        /// 设备   
22
+        /// </summary>
23
+        public string device { get; set; }
24
+        /// <summary>
25
+        /// 结束时间
26
+        /// </summary>
27
+        public long endtime { get; set; }
28
+        /// <summary>
29
+        /// 物理地址   
30
+        /// </summary>
31
+        public string mac { get; set; }
32
+    }
33
+}

+ 1
- 0
XHWK.Model/XHWK.Model.csproj Datei anzeigen

@@ -59,6 +59,7 @@
59 59
     <Compile Include="Model_ResourceAddTwo.cs" />
60 60
     <Compile Include="Model_ResourceAdd.cs" />
61 61
     <Compile Include="Model_Screenshot.cs" />
62
+    <Compile Include="Model_Signatures.cs" />
62 63
     <Compile Include="Model_TsubjectbookList.cs" />
63 64
     <Compile Include="Model_UserInfo.cs" />
64 65
     <Compile Include="Model_Video.cs" />

+ 109
- 26
XHWK.WKTool/App.cs Datei anzeigen

@@ -5,6 +5,7 @@ using Common.system;
5 5
 using System;
6 6
 using System.Collections.Generic;
7 7
 using System.Diagnostics;
8
+using System.IO;
8 9
 using System.Reflection;
9 10
 using System.Security.Principal;
10 11
 using System.Threading;
@@ -14,6 +15,7 @@ using System.Windows.Threading;
14 15
 using TStudyDigitalPen.HID;
15 16
 
16 17
 using XHWK.Model;
18
+using XHWK.WKTool.Helpers;
17 19
 
18 20
 namespace XHWK.WKTool
19 21
 {
@@ -44,7 +46,15 @@ namespace XHWK.WKTool
44 46
         /// 数据存放目录
45 47
         /// </summary>
46 48
         public static string dataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\XHMicroLesson\\";
47
-
49
+        /// <summary>
50
+        /// 后台线程帮助类
51
+        /// </summary>
52
+        public static BackgroundWorkerHelper BackgroundWorkerHelper => BackgroundWorkerHelper.GetInstance();
53
+        /// <summary>
54
+        /// 签名
55
+        /// </summary>
56
+        public static string Signature = "";
57
+        public static string secretKey = "nanhuakaizhangjianwangni";
48 58
         /// <summary>
49 59
         /// 用户信息
50 60
         /// </summary>
@@ -194,40 +204,113 @@ namespace XHWK.WKTool
194 204
                 WindowsIdentity identity = WindowsIdentity.GetCurrent();
195 205
                 WindowsPrincipal principal = new WindowsPrincipal(identity);
196 206
                 //判断当前登录用户是否为管理员
197
-                if (principal.IsInRole(WindowsBuiltInRole.Administrator))
207
+                //if (principal.IsInRole(WindowsBuiltInRole.Administrator))
208
+                //{
209
+                //    //如果是管理员,则直接运行
210
+                //    W_CreateAMicroLessonWindow = new CreateAMicroLessonWindow();
211
+                //    // 定义Application对象作为整个应用程序入口
212
+                //    Application app = new Application();
213
+                //    app.Run(W_CreateAMicroLessonWindow);
214
+                //    //Application.Run(W_CreateAMicroLessonWindow);
215
+                //}
216
+                //else
217
+                //{
218
+                //    //创建启动对象
219
+                //    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo
220
+                //    {
221
+                //        UseShellExecute = true,
222
+                //        WorkingDirectory = Environment.CurrentDirectory,
223
+                //        FileName = Assembly.GetExecutingAssembly().Location,
224
+                //        //设置启动动作,确保以管理员身份运行
225
+                //        Verb = "runas"
226
+                //    };
227
+                //    try
228
+                //    {
229
+                //        System.Diagnostics.Process.Start(startInfo);
230
+                //    }
231
+                //    catch
232
+                //    {
233
+                //        return;
234
+                //    }
235
+                //    //退出
236
+                //    //Current.Shutdown();
237
+                //    Environment.Exit(0);
238
+
239
+                //}
240
+                #endregion
241
+
242
+
243
+
244
+                //如果本地文件为空,弹出弹窗 输密匙
245
+                //本地文件不为空, 解析
246
+                if (!File.Exists(APP.dataPath + "signature.txt"))//上次登陆时间为空 或者签名为空 或者上次登陆时间不是今天   都需要输入密匙验证 ,否则只验证本地的签名
198 247
                 {
199
-                    //如果是管理员,则直接运行
200
-                    W_CreateAMicroLessonWindow = new CreateAMicroLessonWindow();
201
-                    // 定义Application对象作为整个应用程序入口
202
-                    Application app = new Application();
203
-                    app.Run(W_CreateAMicroLessonWindow);
204
-                    //Application.Run(W_CreateAMicroLessonWindow);
248
+                    if (principal.IsInRole(WindowsBuiltInRole.Administrator))
249
+                    {
250
+                        //如果是管理员,则直接运行
251
+                        KeyVerification wins = new KeyVerification();
252
+                        // 定义Application对象作为整个应用程序入口
253
+                        Application app = new Application();
254
+                        app.Run(wins);
255
+                    }
256
+                    else
257
+                    {
258
+                        //创建启动对象
259
+                        System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo
260
+                        {
261
+                            UseShellExecute = true,
262
+                            WorkingDirectory = Environment.CurrentDirectory,
263
+                            FileName = Assembly.GetExecutingAssembly().Location,
264
+                            //设置启动动作,确保以管理员身份运行
265
+                            Verb = "runas"
266
+                        };
267
+                        try
268
+                        {
269
+                            System.Diagnostics.Process.Start(startInfo);
270
+                        }
271
+                        catch
272
+                        {
273
+                            return;
274
+                        }
275
+                        //退出
276
+                        //Current.Shutdown();
277
+                        Environment.Exit(0);
278
+
279
+                    }
205 280
                 }
206 281
                 else
207 282
                 {
208
-                    //创建启动对象
209
-                    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo
283
+                    if (principal.IsInRole(WindowsBuiltInRole.Administrator))
210 284
                     {
211
-                        UseShellExecute = true,
212
-                        WorkingDirectory = Environment.CurrentDirectory,
213
-                        FileName = Assembly.GetExecutingAssembly().Location,
214
-                        //设置启动动作,确保以管理员身份运行
215
-                        Verb = "runas"
216
-                    };
217
-                    try
218
-                    {
219
-                        System.Diagnostics.Process.Start(startInfo);
285
+                        ProductVerification wins = new ProductVerification();
286
+                        Application app = new Application();
287
+                        app.Run(wins);
220 288
                     }
221
-                    catch
289
+                    else
222 290
                     {
223
-                        return;
224
-                    }
225
-                    //退出
226
-                    //Current.Shutdown();
227
-                    Environment.Exit(0);
291
+                        //创建启动对象
292
+                        System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo
293
+                        {
294
+                            UseShellExecute = true,
295
+                            WorkingDirectory = Environment.CurrentDirectory,
296
+                            FileName = Assembly.GetExecutingAssembly().Location,
297
+                            //设置启动动作,确保以管理员身份运行
298
+                            Verb = "runas"
299
+                        };
300
+                        try
301
+                        {
302
+                            System.Diagnostics.Process.Start(startInfo);
303
+                        }
304
+                        catch
305
+                        {
306
+                            return;
307
+                        }
308
+                        //退出
309
+                        //Current.Shutdown();
310
+                        Environment.Exit(0);
228 311
 
312
+                    }
229 313
                 }
230
-                #endregion
231 314
             }
232 315
             catch (Exception ex)
233 316
             {

+ 105
- 1
XHWK.WKTool/DAL/Interface.cs Datei anzeigen

@@ -4,7 +4,8 @@ using Newtonsoft.Json.Linq;
4 4
 
5 5
 using System;
6 6
 using System.Collections.Generic;
7
-
7
+using System.IO;
8
+using System.Text;
8 9
 using XHWK.Model;
9 10
 
10 11
 namespace XHWK.WKTool.DAL
@@ -15,6 +16,109 @@ namespace XHWK.WKTool.DAL
15 16
         //private string FileRequestAddress = FileToolsCommon.GetConfigValue("FileRequestAddress");
16 17
         //private string schoolfileRequestAddress = FileToolsCommon.GetConfigValue("schoolfileRequestAddress");
17 18
         /// <summary>
19
+        /// 激活信息--添加
20
+        /// </summary>
21
+        /// <param name="request"></param>
22
+        /// <returns></returns>
23
+        public int ActivationAdd(string mac, string device, string projectcode)
24
+        {
25
+            try
26
+            {
27
+                string url = APP.certapiUrl + "/activation/add";//地址
28
+                Dictionary<string, object> dic = new Dictionary<string, object>
29
+                {
30
+                    { "mac", mac },
31
+                    { "device", device },
32
+                    { "projectcode", projectcode }
33
+                };
34
+                string body = JsonHelper.ToJson(dic);
35
+
36
+                string xmlDoc = HttpHelper.HttpPost(body, url);
37
+
38
+                if (string.IsNullOrEmpty(xmlDoc))
39
+                {
40
+                    APP.ServerMsg = "网络异常!";
41
+                    return 1;
42
+                }
43
+                else
44
+                {
45
+                    JObject obj = JObject.Parse(xmlDoc);
46
+                    if (obj != null)
47
+                    {
48
+                        if (obj["code"].ToString().Equals("0"))
49
+                        {
50
+                            APP.Signature = obj["obj"].ToString();
51
+                            if (!Directory.Exists(APP.dataPath))
52
+                            {
53
+                                Directory.CreateDirectory(APP.dataPath);
54
+                            }
55
+                            string ApplicationData = APP.dataPath + "signature.txt";
56
+
57
+                            System.IO.File.WriteAllText(ApplicationData, APP.Signature, Encoding.Default);//存放签名
58
+                            return 0;
59
+                        }
60
+                        else
61
+                        {
62
+                            APP.ServerMsg = obj["msg"].ToString();
63
+                            return Convert.ToInt32(obj["code"].ToString());
64
+                        }
65
+                    }
66
+                    else
67
+                    {
68
+                        return 1;
69
+                    }
70
+                }
71
+            }
72
+            catch (Exception ex)
73
+            {
74
+                APP.ServerMsg = "网络异常!";
75
+                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
76
+                return 1;
77
+            }
78
+        }
79
+        /// <summary>
80
+        /// 激活信息--添加激活历史
81
+        /// </summary>
82
+        /// <param name="request"></param>
83
+        /// <returns></returns>
84
+        public int ActivationAddHistory()
85
+        {
86
+            try
87
+            {
88
+                string url = APP.certapiUrl + "/activation/add_history";
89
+                Dictionary<string, object> dic = new Dictionary<string, object>
90
+                {
91
+                    { "sign", APP.Signature }
92
+                };
93
+                string body = JsonHelper.ToJson(dic);
94
+                string xmlDoc = HttpHelper.HttpPost(body, url);
95
+
96
+                if (string.IsNullOrEmpty(xmlDoc))
97
+                {
98
+                    return 1;
99
+                    //returnObj.message = "账号密码不正确";
100
+                }
101
+                else
102
+                {
103
+                    JObject obj = JObject.Parse(xmlDoc);
104
+                    if (obj != null)
105
+                    {
106
+                        APP.ServerMsg = obj["msg"].ToString();
107
+                        return Convert.ToInt32(obj["code"].ToString());
108
+                    }
109
+                    else
110
+                    {
111
+                        return 1;
112
+                    }
113
+                }
114
+            }
115
+            catch (Exception ex)
116
+            {
117
+                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
118
+                return 1;
119
+            }
120
+        }
121
+        /// <summary>
18 122
         /// 登陆
19 123
         /// </summary>
20 124
         /// <param name="request"></param>

+ 118
- 0
XHWK.WKTool/Helpers/BackgroundWorkerHelper.cs Datei anzeigen

@@ -0,0 +1,118 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.ComponentModel;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading;
7
+using System.Threading.Tasks;
8
+
9
+namespace XHWK.WKTool.Helpers
10
+{
11
+    /// <summary>
12
+    /// 后台线程帮助类
13
+    /// </summary>
14
+    public class BackgroundWorkerHelper : IDisposable
15
+    {
16
+        private static BackgroundWorkerHelper backgroundWorkerHelper = null;
17
+
18
+        public static BackgroundWorkerHelper GetInstance()
19
+        {
20
+            if (backgroundWorkerHelper == null)
21
+            {
22
+                backgroundWorkerHelper = new BackgroundWorkerHelper();
23
+            }
24
+            return backgroundWorkerHelper;
25
+        }
26
+
27
+        private BackgroundWorker backWorker = null;
28
+        private Func<object> func = null;
29
+        private Action<object> actionComplate = null;
30
+
31
+        public BackgroundWorkerHelper()
32
+        {
33
+            backWorker = new BackgroundWorker();
34
+            backWorker.DoWork += new DoWorkEventHandler(backWorker_DoWork);
35
+            backWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backWorker_RunWorkerCompleted);
36
+        }
37
+
38
+        private void backWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
39
+        {
40
+            currentThread = null;
41
+
42
+            if (e.Error != null)
43
+            {
44
+                throw e.Error;
45
+            }
46
+            if (actionComplate != null)
47
+            {
48
+                actionComplate(e.Result);
49
+            }
50
+        }
51
+
52
+        private void backWorker_DoWork(object sender, DoWorkEventArgs e)
53
+        {
54
+            currentThread = Thread.CurrentThread;
55
+
56
+            if (func != null)
57
+            {
58
+                if (func != null)
59
+                {
60
+                    e.Result = func();
61
+                }
62
+            }
63
+        }
64
+
65
+        /// <summary>
66
+        /// 启动异步线程
67
+        /// </summary>
68
+        /// <param name="func">在异步执行的方法</param>
69
+        /// <param name="action">方法完成后</param>
70
+        public void RunWorkerAsync(Func<object> func, Action<object> action)
71
+        {
72
+            if (!backWorker.IsBusy)
73
+            {
74
+                this.func = func;
75
+                actionComplate = action;
76
+                backWorker.RunWorkerAsync();
77
+            }
78
+        }
79
+
80
+        private Thread currentThread = null;
81
+
82
+        /// <summary>
83
+        /// 强制中断
84
+        /// </summary>
85
+        public void Abort()
86
+        {
87
+            if (currentThread != null && backWorker.IsBusy)
88
+            {
89
+                currentThread.Abort();
90
+                currentThread = null;
91
+
92
+                backWorker.DoWork -= backWorker_DoWork;
93
+                backWorker.RunWorkerCompleted -= backWorker_RunWorkerCompleted;
94
+                backWorker.Dispose();
95
+
96
+                backWorker = new BackgroundWorker();
97
+                backWorker.DoWork += backWorker_DoWork;
98
+                backWorker.RunWorkerCompleted += backWorker_RunWorkerCompleted;
99
+                func = null;
100
+                actionComplate = null;
101
+            }
102
+        }
103
+
104
+        #region IDisposable 成员
105
+
106
+        /// <summary>
107
+        /// 释放资源
108
+        /// </summary>
109
+        public void Dispose()
110
+        {
111
+            actionComplate = null;
112
+            func = null;
113
+            backWorker.Dispose();
114
+        }
115
+
116
+        #endregion IDisposable 成员
117
+    }
118
+}

BIN
XHWK.WKTool/Images/Toobar27_1.png Datei anzeigen


BIN
XHWK.WKTool/Images/Toobar29.png Datei anzeigen


BIN
XHWK.WKTool/Images/rollCall_1.png Datei anzeigen


+ 1
- 2
XHWK.WKTool/KeyVerification.xaml Datei anzeigen

@@ -5,7 +5,6 @@
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6 6
         xmlns:local="clr-namespace:XHWK.WKTool"
7 7
          xmlns:Views="clr-namespace:XHWK.WKTool.Helpers"
8
-        mc:Ignorable="d"
9 8
         Title="KeyVerification"    Width="300"
10 9
     Height="230"
11 10
     AllowsTransparency="True"
@@ -99,7 +98,7 @@
99 98
                         Height="40"
100 99
                         HorizontalAlignment="Center"
101 100
                         VerticalAlignment="Center"
102
-                        Source="../Images/RollCall/rollCall_1.png"
101
+                        Source="./Images/rollCall_1.png"
103 102
                         Stretch="Fill" />
104 103
                 </Button>
105 104
             </Grid>

+ 13
- 17
XHWK.WKTool/KeyVerification.xaml.cs Datei anzeigen

@@ -1,14 +1,11 @@
1
-using SchoolClient.Commons;
2
-using SchoolClient.Config;
3
-using SchoolClient.Method;
4
-
5
-using System;
1
+using System;
6 2
 using System.IO;
7 3
 using System.Management;
8 4
 using System.Text;
9 5
 using System.Threading;
10 6
 using System.Windows;
11 7
 using System.Windows.Forms;
8
+using XHWK.WKTool.DAL;
12 9
 
13 10
 namespace XHWK.WKTool
14 11
 {
@@ -20,12 +17,13 @@ namespace XHWK.WKTool
20 17
          */
21 18
     public partial class KeyVerification : Window
22 19
     {
23
-        private readonly RegisterController registerController = new RegisterController();
20
+        private readonly Interface registerController = new Interface();
24 21
         private int serverReturnCode = 0;
25 22
 
26 23
         public KeyVerification()
27 24
         {
28 25
             InitializeComponent();
26
+            this.Topmost = true;
29 27
             WindowStartupLocation = WindowStartupLocation.CenterScreen;
30 28
         }
31 29
 
@@ -38,7 +36,7 @@ namespace XHWK.WKTool
38 36
                 return;
39 37
             }
40 38
             projectcode = txbKey.Text;
41
-            Shared.BackgroundWorkerHelper.RunWorkerAsync(InvokeActivationAddServering, InvokeActivationAddServerCompate);
39
+            APP.BackgroundWorkerHelper.RunWorkerAsync(InvokeActivationAddServering, InvokeActivationAddServerCompate);
42 40
         }
43 41
 
44 42
         private string projectcode = string.Empty;
@@ -48,10 +46,10 @@ namespace XHWK.WKTool
48 46
         /// <returns></returns>
49 47
         private object InvokeActivationAddServering()
50 48
         {
51
-            string device = "pc";
49
+            string device = "pcwk";
52 50
             string mac = GetMacAddress();
53 51
             serverReturnCode = registerController.ActivationAdd(mac, device, projectcode);
54
-            return Shared.ServerMsg;
52
+            return APP.ServerMsg;
55 53
         }
56 54
 
57 55
         /// <summary>
@@ -60,13 +58,13 @@ namespace XHWK.WKTool
60 58
         /// <returns></returns>
61 59
         public void InvokeActivationAddServerCompate(object obj)
62 60
         {
63
-            if (serverReturnCode == Shared.ServerScuessCode)
61
+            if (serverReturnCode == 0)
64 62
             {
65 63
                 MessageWindow.Show("产品激活成功");
66
-                Shared.BackgroundWorkerHelper.RunWorkerAsync(InvokeActivationAddHistoryServering, InvokeActivationAddHistoryServerCompate);
64
+                APP.BackgroundWorkerHelper.RunWorkerAsync(InvokeActivationAddHistoryServering, InvokeActivationAddHistoryServerCompate);
67 65
                 Dispatcher.Invoke(new Action(() =>
68 66
                 {
69
-                    LoginWindow win = new LoginWindow();
67
+                    CreateAMicroLessonWindow win = new CreateAMicroLessonWindow();
70 68
                     //win.Topmost = true;
71 69
                     win.Show();
72 70
 
@@ -77,7 +75,7 @@ namespace XHWK.WKTool
77 75
             }
78 76
             else
79 77
             {
80
-                System.Windows.Forms.MessageBox.Show(Shared.ServerMsg, "激活结果:", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly);
78
+                MessageWindow.Show(APP.ServerMsg);
81 79
             }
82 80
         }
83 81
         /// <summary>
@@ -86,8 +84,8 @@ namespace XHWK.WKTool
86 84
         /// <returns></returns>
87 85
         private object InvokeActivationAddHistoryServering()
88 86
         {
89
-            serverReturnCode = registerController.ActivationAddHistory(ref Shared.TeachingData);
90
-            return Shared.ServerMsg;
87
+            serverReturnCode = registerController.ActivationAddHistory();
88
+            return APP.ServerMsg;
91 89
         }
92 90
 
93 91
         /// <summary>
@@ -103,8 +101,6 @@ namespace XHWK.WKTool
103 101
             string ApplicationData = APP.dataPath + "signatureTime.txt";
104 102
             string currentTime = DateTime.Now.ToLongDateString().ToString();//当前时间
105 103
             System.IO.File.WriteAllText(ApplicationData, currentTime, Encoding.Default);//存放签名验证日期
106
-
107
-
108 104
         }
109 105
         /// <summary>  
110 106
         /// 获取本机MAC地址  

+ 2
- 2
XHWK.WKTool/LoadDialog.xaml Datei anzeigen

@@ -4,8 +4,8 @@
4 4
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6 6
         xmlns:local="clr-namespace:XHWK.WKTool"
7
-        mc:Ignorable="d"
8
-        Title="LoadDialog"  Width="100"
7
+      
8
+         Width="100"
9 9
     Height="100"
10 10
     AllowsTransparency="True"
11 11
     Background="Transparent"

+ 31
- 1
XHWK.WKTool/PrintWindow.xaml Datei anzeigen

@@ -3,7 +3,7 @@
3 3
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 4
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
-        xmlns:local="clr-namespace:XHWK.WKTool"
6
+        xmlns:local="clr-namespace:XHWK.WKTool" xmlns:Views="clr-namespace:XHWK.WKTool.Helpers"
7 7
         mc:Ignorable="d"
8 8
         Title="PrintWindow" Height="600" Width="900" AllowsTransparency="True"
9 9
     ShowInTaskbar="False"
@@ -102,5 +102,35 @@
102 102
                 </ControlTemplate>
103 103
             </Button.Template>
104 104
         </Button>
105
+        <Views:ZJClippingBorder
106
+            x:Name="tip_outer"
107
+            Width="760"
108
+            Height="44"
109
+            Margin="0,30,0,0"
110
+            HorizontalAlignment="Center"
111
+            VerticalAlignment="Center"
112
+            Background="#FAFAFA"
113
+            CornerRadius="4"
114
+            Visibility="Visible">
115
+            <Grid>
116
+
117
+                <ProgressBar BorderBrush="#4597FF"
118
+                             Foreground="#4597FF"
119
+                    Grid.Row="0"
120
+                    x:Name="pgbProcess"
121
+                    Height="20"
122
+                    Margin="0,0,0,0"
123
+                    Visibility="Visible" />
124
+                <Label Grid.Row="0"
125
+                    HorizontalAlignment="Center" Width="100"
126
+                    x:Name="lbProcess"
127
+                    Height="30"
128
+                    Margin="0,0,0,0"
129
+                       FontSize="16"
130
+                    Content=""
131
+                       Foreground="White"
132
+                    Visibility="Visible" />
133
+            </Grid>
134
+        </Views:ZJClippingBorder>
105 135
     </Grid>
106 136
 </Window>

+ 150
- 2
XHWK.WKTool/PrintWindow.xaml.cs Datei anzeigen

@@ -3,9 +3,11 @@
3 3
 using System;
4 4
 using System.Collections.Generic;
5 5
 using System.Data;
6
+using System.Threading;
6 7
 using System.Windows;
7 8
 using System.Windows.Input;
8 9
 using System.Windows.Media.Imaging;
10
+using System.Windows.Threading;
9 11
 
10 12
 namespace XHWK.WKTool
11 13
 {
@@ -19,6 +21,24 @@ namespace XHWK.WKTool
19 21
         /// </summary>
20 22
         public DataTable data = new DataTable();
21 23
         private DataTable dtComponentsUniqueNo;
24
+        /// <summary>
25
+        /// 计时器状态
26
+        /// </summary>
27
+        private enum State
28
+        {
29
+            Start,
30
+            Pause,
31
+            End
32
+        }
33
+        private DispatcherTimer t = null;
34
+        /// <summary>
35
+        /// 状态
36
+        /// </summary>
37
+        private State _state = State.End;
38
+        /// <summary>
39
+        /// 计时用
40
+        /// </summary>
41
+        private TimeSpan _timeSpan = new TimeSpan(0, 0, 0, 0, 0);
22 42
         public PrintWindow()
23 43
         {
24 44
             InitializeComponent();
@@ -48,7 +68,19 @@ namespace XHWK.WKTool
48 68
             {
49 69
                 imgPri.Source = new BitmapImage(new Uri(_imgPath));
50 70
             }
71
+            I = 0;
72
+            if (t == null)
73
+            {
74
+                t = new DispatcherTimer();
75
+                t.Tick += OnTimer;
76
+                t.Interval = new TimeSpan(0, 0, 0, 1);
77
+                t.IsEnabled = true;
78
+                t.Start();
79
+            }
80
+            t.Interval = new TimeSpan(0, 0, 0, 1);
81
+            tip_outer.Visibility = Visibility.Collapsed;
51 82
         }
83
+        private System.Timers.Timer times;
52 84
         /// <summary>
53 85
         /// 打印
54 86
         /// </summary>
@@ -59,9 +91,29 @@ namespace XHWK.WKTool
59 91
             if (string.IsNullOrWhiteSpace(cmbClass.Text))
60 92
             {
61 93
                 //MessageWindow.Show("打印机不能为空!");
62
-                MessageWindow.Show("打印机不能为空!", "", MessageBoxButton.OKCancel);
94
+                MessageWindow.Show("打印机不能为空!");
63 95
                 return;
64 96
             }
97
+            I = 1;
98
+            APP.myloading.Show();
99
+            tip_outer.Visibility = Visibility.Visible;
100
+            Thread.Sleep(2000);
101
+            //Times();
102
+            //Dispatcher.Invoke(() =>
103
+            //{
104
+            //    times = new System.Timers.Timer(100)//初始值为300
105
+            //    {
106
+            //        AutoReset = true//设置是否执行System.Timers.Timer.Elapsed事件
107
+            //    };//设置执行一次(false)还是一直执行(true)
108
+            //    I = 0;
109
+            //    tip_outer.Visibility = Visibility.Visible;
110
+            //    times.Elapsed += new System.Timers.ElapsedEventHandler(Times_Elapsed);
111
+            //    times.Enabled = true; //启动计时器
112
+            //                          //APP.myloading.Show();
113
+            //});
114
+
115
+
116
+
65 117
             string imgPath = FileToolsCommon.GetFileAbsolutePath("temp");
66 118
             FileToolsCommon.CreateFile(imgPath);
67 119
             string pdf = imgPath + "\\101.pdf";
@@ -95,19 +147,115 @@ namespace XHWK.WKTool
95 147
                 //}
96 148
                 if (printResult == 0)// 0为成功
97 149
                 {
98
-                    MessageWindow.Show("打印成功");
150
+                    new Thread(new ThreadStart(new Action(() =>
151
+                    {
152
+                        Dispatcher.Invoke(() =>
153
+                        {
154
+                            I = 100;
155
+                            pgbProcess.Value = I * 100 / 100;
156
+                            lbProcess.Content = string.Format("{0}/{1}", I, 100);
157
+                            APP.myloading.Hide();
158
+                            I = 0;
159
+                        });
160
+                        Thread.Sleep(2000);
161
+                        Dispatcher.Invoke(() =>
162
+                        {
163
+                            //tip_outer.Visibility = Visibility.Collapsed;
164
+                            MessageWindow.Show("打印成功");
165
+                        });
166
+                    }))).Start();
167
+
168
+
169
+                   
170
+                    
171
+                  
99 172
                 }
100 173
                 else
101 174
                 {
175
+                    APP.myloading.Hide();
102 176
                     MessageWindow.Show(standardError);
103 177
                 }
104 178
             }
105 179
             else
106 180
             {
181
+                APP.myloading.Hide();
107 182
                 MessageWindow.Show(msg);
108 183
             }
109 184
         }
110 185
         /// <summary>
186
+        /// 时钟回调
187
+        /// </summary>
188
+        /// <param name="sender"></param>
189
+        /// <param name="e"></param>
190
+        private void OnTimer(object sender, EventArgs e)
191
+        {
192
+            switch (_state)
193
+            {
194
+                case State.Start:
195
+                    {
196
+                        _timeSpan += new TimeSpan(0, 0, 0, 1);
197
+                    }
198
+                    break;
199
+
200
+                case State.Pause:
201
+                    {
202
+                    }
203
+                    break;
204
+
205
+                case State.End:
206
+                    {
207
+                        _timeSpan = new TimeSpan();
208
+                        //_timeSpan = new TimeSpan(0, 23, 12, 45, 54);
209
+                    }
210
+                    break;
211
+            }
212
+
213
+            string time = string.Format("{0:D2}:{1:D2}",/* _timeSpan.Hours,*/ _timeSpan.Minutes, _timeSpan.Seconds);
214
+            if(I <= 90 && I != 0)
215
+            {
216
+                Dispatcher.Invoke(() =>
217
+                {
218
+                    pgbProcess.Value = I * 100 / 100;
219
+            lbProcess.Content = string.Format("{0}/{1}", I, 100);
220
+            I++;
221
+                });
222
+            }
223
+        }
224
+        private void Times()
225
+        {
226
+            Dispatcher.Invoke(() =>
227
+            {
228
+                while (I <= 90&&I!=0)
229
+            {
230
+                pgbProcess.Value = I * 100 / 100;
231
+                lbProcess.Content = string.Format("{0}/{1}", I, 100);
232
+                Thread.Sleep(100);
233
+                I++;
234
+            }
235
+            });
236
+        }
237
+
238
+        private int I = 0;
239
+        private void Times_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
240
+        {
241
+            Dispatcher.Invoke(() =>
242
+            {
243
+            if (I <= 90)
244
+            {
245
+                try
246
+                {
247
+                        pgbProcess.Value = I * 100 / 100;
248
+                        lbProcess.Content = string.Format("{0}/{1}", I, 100);
249
+                        I++;
250
+                }
251
+                catch (Exception ex)
252
+                {
253
+                    LogHelper.WriteErrLog("【摄像】(Times_Elapsed)生成图片错误:" + ex.Message, ex);
254
+                }
255
+            }
256
+            });
257
+        }
258
+        /// <summary>
111 259
         /// 窗口移动
112 260
         /// </summary>
113 261
         /// <param name="sender"></param>

+ 111
- 0
XHWK.WKTool/ProductVerification.xaml Datei anzeigen

@@ -0,0 +1,111 @@
1
+<Window x:Class="XHWK.WKTool.ProductVerification"
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" xmlns:Views="clr-namespace:XHWK.WKTool.Helpers"
7
+        Title="ProductVerification"   Width="300"
8
+    Height="230"
9
+    AllowsTransparency="True"
10
+    Background="Transparent"
11
+    ShowInTaskbar="False"
12
+    WindowStartupLocation="CenterOwner"
13
+    WindowStyle="None"
14
+    mc:Ignorable="d" BorderThickness="7">
15
+    <Window.Effect>
16
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
17
+    </Window.Effect>
18
+    <Window.Resources>
19
+        <Style x:Key="oiliu" TargetType="ListBoxItem">
20
+            <!--  设置控件模板  -->
21
+            <Setter Property="Template">
22
+                <Setter.Value>
23
+                    <ControlTemplate TargetType="ListBoxItem">
24
+                        <Border
25
+                            Margin="4,0,0,0"
26
+                            Padding="0"
27
+                            Background="{TemplateBinding Background}">
28
+                            <ContentPresenter
29
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
30
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
31
+                                TextBlock.Foreground="{TemplateBinding Foreground}" />
32
+                        </Border>
33
+                    </ControlTemplate>
34
+                </Setter.Value>
35
+            </Setter>
36
+        </Style>
37
+        <DataTemplate x:Key="UserTpl">
38
+            <StackPanel
39
+                Width="70.5"
40
+                Height="auto"
41
+                Background="Transparent">
42
+                <TextBlock
43
+                        Padding="0,12,0,0"
44
+                        HorizontalAlignment="Left"
45
+                        FontSize="20"
46
+                        Foreground="#3C525B"
47
+                        Text="{Binding username}" />
48
+            </StackPanel>
49
+        </DataTemplate>
50
+    </Window.Resources>
51
+    <Views:ZJClippingBorder Background="White" CornerRadius="10,10,10,10">
52
+        <Grid Margin="0,0,0,0">
53
+            <Grid.RowDefinitions>
54
+                <RowDefinition Height="50" />
55
+                <RowDefinition Height="*" />
56
+                <RowDefinition Height="75" />
57
+            </Grid.RowDefinitions>
58
+            <!--  头部  -->
59
+            <Grid
60
+                Grid.Row="0"
61
+                Height="50"
62
+                Background="#4597FF">
63
+                <TextBlock
64
+                    x:Name="title_tb"
65
+                    Grid.Row="0"
66
+                    Margin="15,0,0,0"
67
+                    HorizontalAlignment="Left"
68
+                    VerticalAlignment="Center"
69
+                    FontSize="22"
70
+                    Foreground="White"
71
+                    Text="产品验证" />
72
+                <Button Cursor="Hand"
73
+                    Grid.Column="0"
74
+                    Width="46"
75
+                    Height="46"
76
+                    Margin="0,0,10,0"
77
+                    HorizontalAlignment="Right"
78
+                    VerticalAlignment="Center"
79
+                    Background="White"
80
+                    Click="close_click"
81
+                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
82
+                    <Button.Template>
83
+                        <ControlTemplate TargetType="{x:Type Button}">
84
+                            <Border
85
+                                BorderBrush="{TemplateBinding Control.BorderBrush}"
86
+                                BorderThickness="0"
87
+                                CornerRadius="20">
88
+                                <ContentPresenter
89
+                                    HorizontalAlignment="Center"
90
+                                    VerticalAlignment="Center"
91
+                                    Content="{TemplateBinding ContentControl.Content}" />
92
+                            </Border>
93
+                        </ControlTemplate>
94
+                    </Button.Template>
95
+                    <Image
96
+                        Width="40"
97
+                        Height="40"
98
+                        HorizontalAlignment="Center"
99
+                        VerticalAlignment="Center"
100
+                        Source="../Images/RollCall/rollCall_1.png"
101
+                        Stretch="Fill" />
102
+                </Button>
103
+            </Grid>
104
+            <Grid Grid.Row="1" Margin="10,20,0,0">
105
+                <StackPanel Orientation="Horizontal" Height="30">
106
+                    <TextBlock Text="产品验证中。。。。" FontSize="20"/>
107
+                </StackPanel>
108
+            </Grid>
109
+        </Grid>
110
+    </Views:ZJClippingBorder>
111
+</Window>

+ 183
- 0
XHWK.WKTool/ProductVerification.xaml.cs Datei anzeigen

@@ -0,0 +1,183 @@
1
+using Common.system;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.IO;
5
+using System.Linq;
6
+using System.Text;
7
+using System.Threading.Tasks;
8
+using System.Windows;
9
+using System.Windows.Controls;
10
+using System.Windows.Data;
11
+using System.Windows.Documents;
12
+using System.Windows.Input;
13
+using System.Windows.Media;
14
+using System.Windows.Media.Imaging;
15
+using System.Windows.Shapes;
16
+using XHWK.Model;
17
+using XHWK.WKTool.DAL;
18
+
19
+namespace XHWK.WKTool
20
+{
21
+    /// <summary>
22
+    /// ProductVerification.xaml 的交互逻辑
23
+    /// </summary>
24
+    /*
25
+     本地解密  解密成功 日期在有效期内 ,判断当天是否调用添加历史接口,没有则调用
26
+     解密失败 或解密获取的时间 过期 , 跳到输入code 激活界面
27
+         */
28
+    public partial class ProductVerification : Window
29
+    {
30
+        private readonly Interface registerController = new Interface();
31
+        private int serverReturnCode = 0;
32
+
33
+        public ProductVerification()
34
+        {
35
+            InitializeComponent();
36
+            WindowStartupLocation = WindowStartupLocation.CenterScreen;
37
+            this.Topmost = true;
38
+            APP.BackgroundWorkerHelper.RunWorkerAsync(InvokeActivationDecryptServering, InvokeActivationDecryptServerCompate);
39
+        }
40
+        /// <summary>
41
+        /// 激活信息--验证签名是否过期-调用
42
+        /// </summary>
43
+        /// <returns></returns>
44
+        private object InvokeActivationDecryptServering()
45
+        {
46
+            return APP.ServerMsg;
47
+        }
48
+
49
+        /// <summary>
50
+        /// 激活信息--验证签名是否过期-返回结果
51
+        /// </summary>
52
+        /// <returns></returns>
53
+        public void InvokeActivationDecryptServerCompate(object obj)
54
+        {
55
+            //解析
56
+            try
57
+            {
58
+                APP.Signature = System.IO.File.ReadAllText(APP.dataPath + "signature.txt", Encoding.Default);
59
+                string decrypt = DataProvider.TripleDESDecrypt(APP.Signature, APP.secretKey);
60
+                decrypt = decrypt.Replace("\u0001", "").Replace("\u0007","").Trim();
61
+                Model_Signatures msgBean = JsonHelper.JsonToObj<Model_Signatures>(decrypt);
62
+                long currentTimeTimestamp = DataProvider.TimestampTotalSeconds(); //当前时间 时间戳
63
+                if (msgBean.endtime > currentTimeTimestamp)//条件成立  解析成功 code 在有效期内
64
+                {
65
+                    if (File.Exists(APP.dataPath + "signatureTime.txt"))
66
+                    {
67
+                        string signatureTime = System.IO.File.ReadAllText(APP.dataPath + "signatureTime.txt", Encoding.Default);
68
+                        string currentTime = DateTime.Now.ToLongDateString().ToString();//当前时间  
69
+                        if (signatureTime != currentTime)
70
+                        {
71
+                            APP.BackgroundWorkerHelper.RunWorkerAsync(InvokeActivationAddHistoryServering, InvokeActivationAddHistoryServerCompate);
72
+                        }
73
+                    }
74
+                    Dispatcher.Invoke(new Action(() =>
75
+                    {
76
+                        CreateAMicroLessonWindow win = new CreateAMicroLessonWindow();
77
+                        win.Show();
78
+                        Close();
79
+                    }));
80
+                }
81
+                else//时间失效
82
+                {
83
+                    Dispatcher.Invoke(new Action(() =>
84
+                    {
85
+                        KeyVerification wins = new KeyVerification
86
+                        {
87
+                            Topmost = true
88
+                        };
89
+                        wins.ShowDialog();
90
+                        Close();
91
+                    }));
92
+                }
93
+            }
94
+            catch (Exception ex) //解析失败 输code  
95
+            {
96
+                LogHelper.WriteErrLog("ProductVerification(解析失败)" + ex.Message, ex);
97
+                Dispatcher.Invoke(new Action(() =>
98
+                {
99
+                    KeyVerification wins = new KeyVerification
100
+                    {
101
+                        Topmost = true
102
+                    };
103
+                    wins.ShowDialog();
104
+                    Close();
105
+                }));
106
+            }
107
+
108
+        }
109
+        /// <summary>
110
+        /// 激活信息--添加激活历史-调用
111
+        /// </summary>
112
+        /// <returns></returns>
113
+        private object InvokeActivationAddHistoryServering()
114
+        {
115
+            serverReturnCode = registerController.ActivationAddHistory();
116
+            return APP.ServerMsg;
117
+        }
118
+
119
+        /// <summary>
120
+        /// 激活信息--添加激活历史-返回结果
121
+        /// </summary>
122
+        /// <returns></returns>
123
+        public void InvokeActivationAddHistoryServerCompate(object obj)
124
+        {
125
+            if (!Directory.Exists(APP.dataPath))
126
+            {
127
+                Directory.CreateDirectory(APP.dataPath);
128
+            }
129
+            string ApplicationData = APP.dataPath + "signatureTime.txt";
130
+            string currentTime = DateTime.Now.ToLongDateString().ToString();//当前时间
131
+            System.IO.File.WriteAllText(ApplicationData, currentTime, Encoding.Default);//存放签名验证日期
132
+        }
133
+
134
+        /// <summary>
135
+        /// 关闭弹窗
136
+        /// </summary>
137
+        /// <param name="sender"></param>
138
+        /// <param name="e"></param>
139
+        private void close_click(object sender, RoutedEventArgs e)
140
+        {
141
+            closeAction();
142
+        }
143
+        /// <summary>
144
+        /// 退出程序
145
+        /// </summary>
146
+        private void closeAction()
147
+        {
148
+            Dispatcher.Invoke(new Action(() =>
149
+            {
150
+                System.Environment.Exit(0);
151
+            }));
152
+        }
153
+
154
+        ~ProductVerification()
155
+        {
156
+            Console.WriteLine("{0}被销毁", this);
157
+            Dispose(false);
158
+        }
159
+        public void Dispose()
160
+        {
161
+            Console.WriteLine("{0}被手动销毁", this);
162
+            Dispose(true);
163
+            GC.SuppressFinalize(this);
164
+        }
165
+
166
+        private bool disposed;
167
+        protected void Dispose(bool disposing)
168
+        {
169
+            Console.WriteLine("{0}被自动销毁", this);
170
+            if (!disposed)
171
+            {
172
+                if (disposing)
173
+                {
174
+                    //托管资源释放
175
+
176
+                }
177
+                //非托管资源释放
178
+                // ...
179
+            }
180
+            disposed = true;
181
+        }
182
+    }
183
+}

+ 16
- 8
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml Datei anzeigen

@@ -81,17 +81,25 @@
81 81
                 <!--<Button x:Name="BtnRecordingScreen"  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0" Click="BtnRecordingScreen_Click">
82 82
                     <Image x:Name="ImgRecordingScreen" Source="./Images/Toobar25.png"/>
83 83
                 </Button>-->
84
-                <Button x:Name="BtnStopRecordingScreen" Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,20,0" Click="BtnStopRecordingScreen_Click" ToolTip="停止">
85
-                    <Image x:Name="ImgEndRecordingScreen" Source="./Images/Toobar15.png"/>
84
+                <Button x:Name="BtnStopRecordingScreen" Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnStopRecordingScreen_Click" ToolTip="停止">
85
+                    <Border Background="#2d8cf0" CornerRadius="22">
86
+                        <Image x:Name="ImgEndRecordingScreen" Source="./Images/Toobar15.png" Margin="5,5,5,5"/>
87
+                    </Border>
86 88
                 </Button>
87
-                <Button  Cursor="Hand" x:Name="btnBlackPenOne" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,20,0" Click="BtnBrush_Click" ToolTip="批注">
88
-                    <Image x:Name="imgBlackPenOne" Source="./Images/31.png"/>
89
+                <Button  Cursor="Hand" x:Name="btnBlackPenOne" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnBrush_Click" ToolTip="批注">
90
+                    <Border x:Name="borOne" Background="#2d8cf0" CornerRadius="22">
91
+                        <Image x:Name="imgBlackPenOne" Source="./Images/31.png" Margin="5,5,5,5"/>
92
+                    </Border>
89 93
                 </Button>
90
-                <Button  Cursor="Hand" x:Name="btnBlackPenTwo" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,20,0" Click="BtnBlackPenTwo_Click" ToolTip="批注">
91
-                    <Image x:Name="imgBlackPenTwo" Source="./Images/31.png"/>
94
+                <Button  Cursor="Hand" x:Name="btnBlackPenTwo" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnBlackPenTwo_Click" ToolTip="批注">
95
+                    <Border x:Name="borTwo" Background="#2d8cf0" CornerRadius="22">
96
+                        <Image x:Name="imgBlackPenTwo" Source="./Images/31.png" Margin="5,5,5,5"/>
97
+                    </Border>
92 98
                 </Button>
93
-                <Button  Cursor="Hand" x:Name="btnReturn" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,20,0" Click="BtnReturn_Click" ToolTip="返回">
94
-                    <Image x:Name="imgReturn" Source="./Images/Toobar29.png"/>
99
+                <Button  Cursor="Hand" x:Name="btnReturn" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0" Click="BtnReturn_Click" ToolTip="返回">
100
+                    <Border Background="#2d8cf0" CornerRadius="22">
101
+                        <Image x:Name="imgReturn" Source="./Images/Toobar29.png" Margin="5,5,5,5"/>
102
+                    </Border>
95 103
                 </Button>
96 104
             </StackPanel>
97 105
         </Grid>

+ 46
- 1
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs Datei anzeigen

@@ -6,6 +6,7 @@ using System.Threading;
6 6
 using System.Windows;
7 7
 using System.Windows.Forms;
8 8
 using System.Windows.Ink;
9
+using System.Windows.Media;
9 10
 using System.Windows.Media.Imaging;
10 11
 using System.Windows.Threading;
11 12
 
@@ -85,6 +86,11 @@ namespace XHWK.WKTool
85 86
             //timer.Elapsed += new System.Timers.ElapsedEventHandler(TimerDealy);
86 87
             //timer.Enabled = true; //启动计时器
87 88
 
89
+                borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
90
+                borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
91
+
92
+
93
+
88 94
             k_hook = new KeyboardHookCommon();
89 95
             k_hook.KeyDownEvent += K_hook_KeyDownEvent;
90 96
 
@@ -99,7 +105,8 @@ namespace XHWK.WKTool
99 105
             gridToolbar.Visibility = Visibility.Hidden;
100 106
             gridColour.Visibility = Visibility.Hidden;
101 107
             gridThickness.Visibility = Visibility.Hidden;
102
-
108
+            imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar29.png"));
109
+            btnReturn.IsEnabled = true;//返回主界面可点击
103 110
             ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar26.png"));//大圆圈三角形
104 111
             ImgEndRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar15.png"));
105 112
             BtnStopRecordingScreen.IsEnabled = false; //停止录制按钮不点击
@@ -344,6 +351,10 @@ namespace XHWK.WKTool
344 351
                 txbTime.Visibility = Visibility.Visible;//时间显示
345 352
                 imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
346 353
                 btnReturn.IsEnabled = false;//返回主界面可点击
354
+
355
+
356
+
357
+                //borOne.Background = new SolidColorBrush(Colors.LightBlue);
347 358
                 try
348 359
                 {
349 360
                     new Thread(new ThreadStart(new Action(() =>
@@ -524,16 +535,35 @@ namespace XHWK.WKTool
524 535
             {
525 536
                 if (flg == 11)
526 537
                 {
538
+                    Dispatcher.Invoke(() =>
539
+                    {
540
+                        borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
541
+                        borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
542
+                    });
527 543
                     flg = 1;
528 544
                     APP.W_PracticeWindow.Hide();
529 545
                 }
530 546
                 else if (flg == 10)
531 547
                 {
548
+                    Dispatcher.Invoke(() =>
549
+                    {
550
+                        borOne.Background = new SolidColorBrush(Colors.LightSkyBlue);
551
+                        borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
552
+                    });
532 553
                     APP.W_PracticeWindow.Blue();
533 554
                     flg = 11;
534 555
                 }
535 556
                 else
536 557
                 {
558
+                    //new Thread(new ThreadStart(new Action(() =>
559
+                    //{
560
+                        Dispatcher.Invoke(() =>
561
+                        {
562
+                            borOne.Background = new SolidColorBrush(Colors.LightSkyBlue);
563
+                            borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
564
+                        });
565
+
566
+                    //}))).Start();
537 567
                     if (APP.W_PracticeWindow == null)
538 568
                     {
539 569
                         APP.W_PracticeWindow = new PracticeWindow
@@ -786,16 +816,31 @@ namespace XHWK.WKTool
786 816
             {
787 817
                 if (flg == 10)
788 818
                 {
819
+                    Dispatcher.Invoke(() =>
820
+                    {
821
+                        borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
822
+                        borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
823
+                    });
789 824
                     flg = 0;
790 825
                     APP.W_PracticeWindow.Hide();
791 826
                 }
792 827
                 else if (flg == 11)
793 828
                 {
829
+                    Dispatcher.Invoke(() =>
830
+                    {
831
+                        borTwo.Background = new SolidColorBrush(Colors.LightSkyBlue);
832
+                        borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
833
+                    });
794 834
                     flg = 10;
795 835
                     APP.W_PracticeWindow.Red();
796 836
                 }
797 837
                 else
798 838
                 {
839
+                    Dispatcher.Invoke(() =>
840
+                    {
841
+                        borTwo.Background = new SolidColorBrush(Colors.LightSkyBlue);
842
+                        borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
843
+                    });
799 844
                     if (APP.W_PracticeWindow == null)
800 845
                     {
801 846
                         APP.W_PracticeWindow = new PracticeWindow

+ 2
- 1
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Datei anzeigen

@@ -178,7 +178,8 @@
178 178
                 <Button Cursor="Hand" x:Name="btnLoginType" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnLoginType_Click">
179 179
                     <StackPanel Orientation="Horizontal">
180 180
                         <Image Source="./Images/microLessonSystem_9.png"/>
181
-                        <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
181
+                        <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"
182
+                                   />
182 183
                     </StackPanel>
183 184
                 </Button>
184 185
                 <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnShrink_Click" Margin="8,0,8,0">

+ 526
- 187
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Datei anzeigen

@@ -981,19 +981,25 @@ namespace XHWK.WKTool
981 981
                     DereferenceLinks = true
982 982
                 };
983 983
 
984
-                new Thread(
985
-                    o =>
986
-                    {
987
-                        Thread.Sleep(400);
988
-                        Dispatcher.Invoke(new Action(() =>
989
-                        {
990
-                            OpenDialog();
991
-                        }
992
-                            ));
993
-                    })
994
-                {
995
-                    IsBackground = true
996
-                }.Start();
984
+
985
+                APP.myloading.Show();
986
+                APP.BackgroundWorkerHelper.RunWorkerAsync(InvokeServering, InvokeServerCompate);
987
+
988
+
989
+                //new Thread(
990
+                //    o =>
991
+                //    {
992
+                //        Thread.Sleep(400);
993
+
994
+                //        Dispatcher.Invoke(new Action(() =>
995
+                //        {
996
+                //            OpenDialog();
997
+                //        }
998
+                //            ));
999
+                //    })
1000
+                //{
1001
+                //    IsBackground = true
1002
+                //}.Start();
997 1003
             }
998 1004
             catch (Exception ex)
999 1005
             {
@@ -1001,35 +1007,137 @@ namespace XHWK.WKTool
1001 1007
             }
1002 1008
         }
1003 1009
         /// <summary>
1004
-        /// 导入文档
1010
+        /// 导入-开始
1005 1011
         /// </summary>
1006
-        private void OpenDialog()
1012
+        /// <returns></returns>
1013
+        private object InvokeServering()
1007 1014
         {
1008
-            result = ofd.ShowDialog();
1009
-            if (result == System.Windows.Forms.DialogResult.OK)
1015
+            Dispatcher.Invoke(new Action(() =>
1010 1016
             {
1011
-                if (ofd.FileName != "")
1017
+                result = ofd.ShowDialog();
1018
+                if (result == System.Windows.Forms.DialogResult.OK)
1012 1019
                 {
1013
-                    APP.myloading.Show();
1014
-
1015
-                    myblackboard.changepage(APP.pageData.pagenum);
1016
-                    #region PPT转PDF
1017
-                    string filepath = ofd.FileName;
1018
-                    string path = ofd.SafeFileName.Replace(".ppt", "").Replace(".pptx", "").Trim();
1019
-                    string type = ofd.SafeFileName.Replace(".ppt", "typezsygppt").Replace(".pptx", "typezsygppt").Replace(".pdf", "typepdf").Trim();
1020
-                    if (type.Contains("typezsygppt"))//ppt
1020
+                    if (ofd.FileName != "")
1021 1021
                     {
1022
-                        try
1022
+                        APP.myloading.Show();
1023
+
1024
+                        myblackboard.changepage(APP.pageData.pagenum);
1025
+                        #region PPT转PDF
1026
+                        string filepath = ofd.FileName;
1027
+                        string path = ofd.SafeFileName.Replace(".ppt", "").Replace(".pptx", "").Trim();
1028
+                        string type = ofd.SafeFileName.Replace(".ppt", "typezsygppt").Replace(".pptx", "typezsygppt").Replace(".pdf", "typepdf").Trim();
1029
+                        if (type.Contains("typezsygppt"))//ppt
1023 1030
                         {
1024
-                            string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1025
-                            path = pathTemp + path + ".pdf";
1026
-                            FileToolsCommon.CreateDirectory(pathTemp);
1027
-
1028
-                            //PPT转PDF
1029
-                            Presentation ppt = new Presentation(filepath);
1030
-                            ppt.Save(path, Aspose.Slides.Export.SaveFormat.Pdf);
1031
-                            #endregion
1031
+                            try
1032
+                            {
1033
+                                string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1034
+                                path = pathTemp + path + ".pdf";
1035
+                                FileToolsCommon.CreateDirectory(pathTemp);
1036
+
1037
+                                //PPT转PDF
1038
+                                Presentation ppt = new Presentation(filepath);
1039
+                                ppt.Save(path, Aspose.Slides.Export.SaveFormat.Pdf);
1040
+                                #endregion
1041
+
1042
+                                #region PDF转图片
1043
+                                // 图片绝对路径集合
1044
+                                List<string> images = new List<string>();
1045
+                                string directoryPath = pathTemp;
1046
+                                //aspose许可证
1047
+                                //Aspose.Pdf.License l = new Aspose.Pdf.License();
1048
+                                //string licenseName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Aspose.Total.Product.Family.lic");
1049
+                                //l.SetLicense(licenseName);
1050
+                                //定义Jpeg转换设备
1051
+                                Aspose.Pdf.Document document = new Aspose.Pdf.Document(path);
1052
+                                Aspose.Pdf.Devices.JpegDevice device = new Aspose.Pdf.Devices.JpegDevice();
1053
+                                //int quality = int.Parse(this.comboBox1.SelectedItem.ToString());
1054
+                                //directoryPath += quality;
1055
+                                Directory.CreateDirectory(directoryPath);
1056
+                                //默认质量为100,设置质量的好坏与处理速度不成正比,甚至是设置的质量越低反而花的时间越长,怀疑处理过程是先生成高质量的再压缩
1057
+                                device = new Aspose.Pdf.Devices.JpegDevice(100);
1058
+                                //遍历每一页转为jpg
1059
+                                for (int i = 1; i <= document.Pages.Count; i++)
1060
+                                {
1061
+                                    long ii = Timestamp();
1062
+                                    string filePathOutPut = Path.Combine(directoryPath, string.Format("{0}{1}.jpg", ii, i));
1063
+                                    images.Add(filePathOutPut);
1064
+                                    FileStream fs = new FileStream(filePathOutPut, FileMode.OpenOrCreate);
1065
+                                    try
1066
+                                    {
1067
+                                        device.Process(document.Pages[i], fs);
1068
+                                        fs.Close();
1069
+                                    }
1070
+                                    catch (Exception)
1071
+                                    {
1072
+                                        fs.Close();
1073
+                                        File.Delete(filePathOutPut);
1074
+                                    }
1075
+                                }
1076
+                                #endregion
1077
+                                string[] page = images.ToArray();
1078
+                                int num = 0;
1079
+                                for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1080
+                                {
1081
+                                    if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
1082
+                                    {
1083
+                                        APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
1084
+                                        APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
1085
+                                        APP.PageDrawList[i].PageNum = i + 1;
1086
+                                        APP.PageDrawList[i].ImgDocumentation = true;
1087
+                                    }
1088
+                                    else
1089
+                                    {
1032 1090
 
1091
+                                        Model_DrawData model_DrawData = new Model_DrawData
1092
+                                        {
1093
+                                            PageImagePath = page[i - APP.pageData.pagenum],
1094
+                                            PdfImagePath = page[i - APP.pageData.pagenum],
1095
+                                            PageNum = i + 1,
1096
+                                            ImgDocumentation = true
1097
+                                        };
1098
+                                        APP.PageDrawList.Add(model_DrawData);
1099
+                                    }
1100
+                                    ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1101
+                                    ImgPrintTwo.Visibility = Visibility.Collapsed;
1102
+                                    btnPrint.IsEnabled = true;
1103
+                                    APP.SaveDraw();
1104
+                                    num++;
1105
+                                }
1106
+                                if (num > 0)
1107
+                                {
1108
+                                    APP.pageData.currpage = APP.pageData.pagenum + 1;
1109
+                                    APP.pageData.pagenum += num;
1110
+                                    gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1111
+                                }
1112
+                                if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1113
+                                {
1114
+                                    imgCanvas.Source = null;
1115
+                                    ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1116
+                                    ImgScreenshotTwo.Visibility = Visibility.Visible;
1117
+                                    btnScreenshot.IsEnabled = false;
1118
+                                    imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1119
+                                }
1120
+                                else
1121
+                                {
1122
+                                    imgDocumentation.Source = null;
1123
+                                    imgCanvas.Source = null;
1124
+                                    ///截图可用
1125
+                                    ImgScreenshot.Visibility = Visibility.Visible;
1126
+                                    ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1127
+                                    btnScreenshot.IsEnabled = true;
1128
+                                }
1129
+                                APP.myloading.Hide();
1130
+                            }
1131
+                            catch (Exception ex)
1132
+                            {
1133
+                                APP.myloading.Hide();
1134
+                                MessageWindow.Show("文件无效或者文件被加密!");
1135
+                                LogHelper.WriteErrLog("【打开ppt】(OpenDialog PPT)" + ex.Message, ex);
1136
+                            }
1137
+                        }
1138
+                        else if (type.Contains("typepdf"))
1139
+                        {
1140
+                            string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1033 1141
                             #region PDF转图片
1034 1142
                             // 图片绝对路径集合
1035 1143
                             List<string> images = new List<string>();
@@ -1039,7 +1147,7 @@ namespace XHWK.WKTool
1039 1147
                             //string licenseName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Aspose.Total.Product.Family.lic");
1040 1148
                             //l.SetLicense(licenseName);
1041 1149
                             //定义Jpeg转换设备
1042
-                            Aspose.Pdf.Document document = new Aspose.Pdf.Document(path);
1150
+                            Aspose.Pdf.Document document = new Aspose.Pdf.Document(filepath);
1043 1151
                             Aspose.Pdf.Devices.JpegDevice device = new Aspose.Pdf.Devices.JpegDevice();
1044 1152
                             //int quality = int.Parse(this.comboBox1.SelectedItem.ToString());
1045 1153
                             //directoryPath += quality;
@@ -1119,174 +1227,405 @@ namespace XHWK.WKTool
1119 1227
                             }
1120 1228
                             APP.myloading.Hide();
1121 1229
                         }
1122
-                        catch (Exception ex)
1123
-                        {
1124
-                            APP.myloading.Hide();
1125
-                            MessageWindow.Show("文件无效或者文件被加密!");
1126
-                            LogHelper.WriteErrLog("【打开ppt】(OpenDialog PPT)" + ex.Message, ex);
1127
-                        }
1128
-                    }
1129
-                    else if(type.Contains("typepdf"))
1130
-                    {
1131
-                        string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1132
-                        #region PDF转图片
1133
-                        // 图片绝对路径集合
1134
-                        List<string> images = new List<string>();
1135
-                        string directoryPath = pathTemp;
1136
-                        //aspose许可证
1137
-                        //Aspose.Pdf.License l = new Aspose.Pdf.License();
1138
-                        //string licenseName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Aspose.Total.Product.Family.lic");
1139
-                        //l.SetLicense(licenseName);
1140
-                        //定义Jpeg转换设备
1141
-                        Aspose.Pdf.Document document = new Aspose.Pdf.Document(filepath);
1142
-                        Aspose.Pdf.Devices.JpegDevice device = new Aspose.Pdf.Devices.JpegDevice();
1143
-                        //int quality = int.Parse(this.comboBox1.SelectedItem.ToString());
1144
-                        //directoryPath += quality;
1145
-                        Directory.CreateDirectory(directoryPath);
1146
-                        //默认质量为100,设置质量的好坏与处理速度不成正比,甚至是设置的质量越低反而花的时间越长,怀疑处理过程是先生成高质量的再压缩
1147
-                        device = new Aspose.Pdf.Devices.JpegDevice(100);
1148
-                        //遍历每一页转为jpg
1149
-                        for (int i = 1; i <= document.Pages.Count; i++)
1230
+                        else//word
1150 1231
                         {
1151
-                            long ii = Timestamp();
1152
-                            string filePathOutPut = Path.Combine(directoryPath, string.Format("{0}{1}.jpg", ii, i));
1153
-                            images.Add(filePathOutPut);
1154
-                            FileStream fs = new FileStream(filePathOutPut, FileMode.OpenOrCreate);
1155 1232
                             try
1156 1233
                             {
1157
-                                device.Process(document.Pages[i], fs);
1158
-                                fs.Close();
1159
-                            }
1160
-                            catch (Exception)
1161
-                            {
1162
-                                fs.Close();
1163
-                                File.Delete(filePathOutPut);
1164
-                            }
1165
-                        }
1166
-                        #endregion
1167
-                        string[] page = images.ToArray();
1168
-                        int num = 0;
1169
-                        for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1170
-                        {
1171
-                            if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
1172
-                            {
1173
-                                APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
1174
-                                APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
1175
-                                APP.PageDrawList[i].PageNum = i + 1;
1176
-                                APP.PageDrawList[i].ImgDocumentation = true;
1177
-                            }
1178
-                            else
1179
-                            {
1234
+                                string paths = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1235
+                                string[] page = ConvertWordToImage(filepath, paths, "", 0, 0, null, 0).ToArray();
1236
+                                int num = 0;
1237
+                                for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1238
+                                {
1239
+                                    if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
1240
+                                    {
1241
+                                        APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
1242
+                                        APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
1243
+                                        APP.PageDrawList[i].PageNum = i + 1;
1244
+                                        APP.PageDrawList[i].ImgDocumentation = true;
1245
+                                    }
1246
+                                    else
1247
+                                    {
1180 1248
 
1181
-                                Model_DrawData model_DrawData = new Model_DrawData
1249
+                                        Model_DrawData model_DrawData = new Model_DrawData
1250
+                                        {
1251
+                                            PageImagePath = page[i - APP.pageData.pagenum],
1252
+                                            PdfImagePath = page[i - APP.pageData.pagenum],
1253
+                                            PageNum = i + 1,
1254
+                                            ImgDocumentation = true
1255
+                                        };
1256
+                                        APP.PageDrawList.Add(model_DrawData);
1257
+                                    }
1258
+                                    ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1259
+                                    ImgPrintTwo.Visibility = Visibility.Collapsed;
1260
+                                    btnPrint.IsEnabled = true;
1261
+                                    APP.SaveDraw();
1262
+                                    num++;
1263
+                                }
1264
+                                if (num > 0)
1182 1265
                                 {
1183
-                                    PageImagePath = page[i - APP.pageData.pagenum],
1184
-                                    PdfImagePath = page[i - APP.pageData.pagenum],
1185
-                                    PageNum = i + 1,
1186
-                                    ImgDocumentation = true
1187
-                                };
1188
-                                APP.PageDrawList.Add(model_DrawData);
1189
-                            }
1190
-                            ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1191
-                            ImgPrintTwo.Visibility = Visibility.Collapsed;
1192
-                            btnPrint.IsEnabled = true;
1193
-                            APP.SaveDraw();
1194
-                            num++;
1195
-                        }
1196
-                        if (num > 0)
1197
-                        {
1198
-                            APP.pageData.currpage = APP.pageData.pagenum + 1;
1199
-                            APP.pageData.pagenum += num;
1200
-                            gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1201
-                        }
1202
-                        if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1203
-                        {
1204
-                            imgCanvas.Source = null;
1205
-                            ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1206
-                            ImgScreenshotTwo.Visibility = Visibility.Visible;
1207
-                            btnScreenshot.IsEnabled = false;
1208
-                            imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1209
-                        }
1210
-                        else
1211
-                        {
1212
-                            imgDocumentation.Source = null;
1213
-                            imgCanvas.Source = null;
1214
-                            ///截图可用
1215
-                            ImgScreenshot.Visibility = Visibility.Visible;
1216
-                            ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1217
-                            btnScreenshot.IsEnabled = true;
1218
-                        }
1219
-                        APP.myloading.Hide();
1220
-                    }
1221
-                    else//word
1222
-                    {
1223
-                        try
1224
-                        {
1225
-                            string paths = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1226
-                            string[] page = ConvertWordToImage(filepath, paths, "", 0, 0, null, 0).ToArray();
1227
-                            int num = 0;
1228
-                            for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1229
-                            {
1230
-                                if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
1266
+                                    APP.pageData.currpage = APP.pageData.pagenum + 1;
1267
+                                    APP.pageData.pagenum += num;
1268
+                                    gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1269
+                                }
1270
+                                if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1231 1271
                                 {
1232
-                                    APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
1233
-                                    APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
1234
-                                    APP.PageDrawList[i].PageNum = i + 1;
1235
-                                    APP.PageDrawList[i].ImgDocumentation = true;
1272
+
1273
+                                    imgCanvas.Source = null;
1274
+                                    ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1275
+                                    ImgScreenshotTwo.Visibility = Visibility.Visible;
1276
+                                    btnScreenshot.IsEnabled = false;
1277
+                                    imgDocumentation.Visibility = Visibility.Visible;
1278
+                                    imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1236 1279
                                 }
1237 1280
                                 else
1238 1281
                                 {
1239
-
1240
-                                    Model_DrawData model_DrawData = new Model_DrawData
1241
-                                    {
1242
-                                        PageImagePath = page[i - APP.pageData.pagenum],
1243
-                                        PdfImagePath = page[i - APP.pageData.pagenum],
1244
-                                        PageNum = i + 1,
1245
-                                        ImgDocumentation = true
1246
-                                    };
1247
-                                    APP.PageDrawList.Add(model_DrawData);
1282
+                                    imgDocumentation.Source = null;
1283
+                                    imgCanvas.Source = null;
1284
+                                    ///截图可用
1285
+                                    ImgScreenshot.Visibility = Visibility.Visible;
1286
+                                    ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1287
+                                    btnScreenshot.IsEnabled = true;
1248 1288
                                 }
1249
-                                ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1250
-                                ImgPrintTwo.Visibility = Visibility.Collapsed;
1251
-                                btnPrint.IsEnabled = true;
1252
-                                APP.SaveDraw();
1253
-                                num++;
1289
+                                APP.myloading.Hide();
1254 1290
                             }
1255
-                            if (num > 0)
1291
+                            catch (Exception ex)
1256 1292
                             {
1257
-                                APP.pageData.currpage = APP.pageData.pagenum + 1;
1258
-                                APP.pageData.pagenum += num;
1259
-                                gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1260
-                            }
1261
-                            if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1262
-                            {
1263
-
1264
-                                imgCanvas.Source = null;
1265
-                                ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1266
-                                ImgScreenshotTwo.Visibility = Visibility.Visible;
1267
-                                btnScreenshot.IsEnabled = false;
1268
-                                imgDocumentation.Visibility = Visibility.Visible;
1269
-                                imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1270
-                            }
1271
-                            else
1272
-                            {
1273
-                                imgDocumentation.Source = null;
1274
-                                imgCanvas.Source = null;
1275
-                                ///截图可用
1276
-                                ImgScreenshot.Visibility = Visibility.Visible;
1277
-                                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1278
-                                btnScreenshot.IsEnabled = true;
1293
+                                APP.myloading.Hide();
1294
+                                LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1279 1295
                             }
1280
-                            APP.myloading.Hide();
1281
-                        }
1282
-                        catch (Exception ex)
1283
-                        {
1284
-                            APP.myloading.Hide();
1285
-                            LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1286 1296
                         }
1287 1297
                     }
1288 1298
                 }
1289 1299
             }
1300
+                   ));
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+            //OpenDialog();
1325
+            return "";
1326
+        }
1327
+        /// <summary>
1328
+        /// 导入-结束
1329
+        /// </summary>
1330
+        /// <returns></returns>
1331
+        public void InvokeServerCompate(object obj)
1332
+        {
1333
+            //APP.myloading.Hide();
1334
+           
1335
+        }
1336
+        /// <summary>
1337
+        /// 导入文档
1338
+        /// </summary>
1339
+        private void OpenDialog()
1340
+        {
1341
+
1342
+            Dispatcher.Invoke(new Action(() =>
1343
+                  {
1344
+                      result = ofd.ShowDialog();
1345
+                      if (result == System.Windows.Forms.DialogResult.OK)
1346
+                      {
1347
+                          if (ofd.FileName != "")
1348
+                          {
1349
+                              APP.myloading.Show();
1350
+
1351
+                              myblackboard.changepage(APP.pageData.pagenum);
1352
+                              #region PPT转PDF
1353
+                              string filepath = ofd.FileName;
1354
+                              string path = ofd.SafeFileName.Replace(".ppt", "").Replace(".pptx", "").Trim();
1355
+                              string type = ofd.SafeFileName.Replace(".ppt", "typezsygppt").Replace(".pptx", "typezsygppt").Replace(".pdf", "typepdf").Trim();
1356
+                              if (type.Contains("typezsygppt"))//ppt
1357
+                              {
1358
+                                  try
1359
+                                  {
1360
+                                      string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1361
+                                      path = pathTemp + path + ".pdf";
1362
+                                      FileToolsCommon.CreateDirectory(pathTemp);
1363
+
1364
+                                      //PPT转PDF
1365
+                                      Presentation ppt = new Presentation(filepath);
1366
+                                      ppt.Save(path, Aspose.Slides.Export.SaveFormat.Pdf);
1367
+                                      #endregion
1368
+
1369
+                                      #region PDF转图片
1370
+                                      // 图片绝对路径集合
1371
+                                      List<string> images = new List<string>();
1372
+                                      string directoryPath = pathTemp;
1373
+                                      //aspose许可证
1374
+                                      //Aspose.Pdf.License l = new Aspose.Pdf.License();
1375
+                                      //string licenseName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Aspose.Total.Product.Family.lic");
1376
+                                      //l.SetLicense(licenseName);
1377
+                                      //定义Jpeg转换设备
1378
+                                      Aspose.Pdf.Document document = new Aspose.Pdf.Document(path);
1379
+                                      Aspose.Pdf.Devices.JpegDevice device = new Aspose.Pdf.Devices.JpegDevice();
1380
+                                      //int quality = int.Parse(this.comboBox1.SelectedItem.ToString());
1381
+                                      //directoryPath += quality;
1382
+                                      Directory.CreateDirectory(directoryPath);
1383
+                                      //默认质量为100,设置质量的好坏与处理速度不成正比,甚至是设置的质量越低反而花的时间越长,怀疑处理过程是先生成高质量的再压缩
1384
+                                      device = new Aspose.Pdf.Devices.JpegDevice(100);
1385
+                                      //遍历每一页转为jpg
1386
+                                      for (int i = 1; i <= document.Pages.Count; i++)
1387
+                                      {
1388
+                                          long ii = Timestamp();
1389
+                                          string filePathOutPut = Path.Combine(directoryPath, string.Format("{0}{1}.jpg", ii, i));
1390
+                                          images.Add(filePathOutPut);
1391
+                                          FileStream fs = new FileStream(filePathOutPut, FileMode.OpenOrCreate);
1392
+                                          try
1393
+                                          {
1394
+                                              device.Process(document.Pages[i], fs);
1395
+                                              fs.Close();
1396
+                                          }
1397
+                                          catch (Exception)
1398
+                                          {
1399
+                                              fs.Close();
1400
+                                              File.Delete(filePathOutPut);
1401
+                                          }
1402
+                                      }
1403
+                                      #endregion
1404
+                                      string[] page = images.ToArray();
1405
+                                      int num = 0;
1406
+                                      for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1407
+                                      {
1408
+                                          if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
1409
+                                          {
1410
+                                              APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
1411
+                                              APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
1412
+                                              APP.PageDrawList[i].PageNum = i + 1;
1413
+                                              APP.PageDrawList[i].ImgDocumentation = true;
1414
+                                          }
1415
+                                          else
1416
+                                          {
1417
+
1418
+                                              Model_DrawData model_DrawData = new Model_DrawData
1419
+                                              {
1420
+                                                  PageImagePath = page[i - APP.pageData.pagenum],
1421
+                                                  PdfImagePath = page[i - APP.pageData.pagenum],
1422
+                                                  PageNum = i + 1,
1423
+                                                  ImgDocumentation = true
1424
+                                              };
1425
+                                              APP.PageDrawList.Add(model_DrawData);
1426
+                                          }
1427
+                                          ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1428
+                                          ImgPrintTwo.Visibility = Visibility.Collapsed;
1429
+                                          btnPrint.IsEnabled = true;
1430
+                                          APP.SaveDraw();
1431
+                                          num++;
1432
+                                      }
1433
+                                      if (num > 0)
1434
+                                      {
1435
+                                          APP.pageData.currpage = APP.pageData.pagenum + 1;
1436
+                                          APP.pageData.pagenum += num;
1437
+                                          gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1438
+                                      }
1439
+                                      if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1440
+                                      {
1441
+                                          imgCanvas.Source = null;
1442
+                                          ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1443
+                                          ImgScreenshotTwo.Visibility = Visibility.Visible;
1444
+                                          btnScreenshot.IsEnabled = false;
1445
+                                          imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1446
+                                      }
1447
+                                      else
1448
+                                      {
1449
+                                          imgDocumentation.Source = null;
1450
+                                          imgCanvas.Source = null;
1451
+                                          ///截图可用
1452
+                                          ImgScreenshot.Visibility = Visibility.Visible;
1453
+                                          ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1454
+                                          btnScreenshot.IsEnabled = true;
1455
+                                      }
1456
+                                      APP.myloading.Hide();
1457
+                                  }
1458
+                                  catch (Exception ex)
1459
+                                  {
1460
+                                      APP.myloading.Hide();
1461
+                                      MessageWindow.Show("文件无效或者文件被加密!");
1462
+                                      LogHelper.WriteErrLog("【打开ppt】(OpenDialog PPT)" + ex.Message, ex);
1463
+                                  }
1464
+                              }
1465
+                              else if (type.Contains("typepdf"))
1466
+                              {
1467
+                                  string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1468
+                                  #region PDF转图片
1469
+                                  // 图片绝对路径集合
1470
+                                  List<string> images = new List<string>();
1471
+                                  string directoryPath = pathTemp;
1472
+                                  //aspose许可证
1473
+                                  //Aspose.Pdf.License l = new Aspose.Pdf.License();
1474
+                                  //string licenseName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Aspose.Total.Product.Family.lic");
1475
+                                  //l.SetLicense(licenseName);
1476
+                                  //定义Jpeg转换设备
1477
+                                  Aspose.Pdf.Document document = new Aspose.Pdf.Document(filepath);
1478
+                                  Aspose.Pdf.Devices.JpegDevice device = new Aspose.Pdf.Devices.JpegDevice();
1479
+                                  //int quality = int.Parse(this.comboBox1.SelectedItem.ToString());
1480
+                                  //directoryPath += quality;
1481
+                                  Directory.CreateDirectory(directoryPath);
1482
+                                  //默认质量为100,设置质量的好坏与处理速度不成正比,甚至是设置的质量越低反而花的时间越长,怀疑处理过程是先生成高质量的再压缩
1483
+                                  device = new Aspose.Pdf.Devices.JpegDevice(100);
1484
+                                  //遍历每一页转为jpg
1485
+                                  for (int i = 1; i <= document.Pages.Count; i++)
1486
+                                  {
1487
+                                      long ii = Timestamp();
1488
+                                      string filePathOutPut = Path.Combine(directoryPath, string.Format("{0}{1}.jpg", ii, i));
1489
+                                      images.Add(filePathOutPut);
1490
+                                      FileStream fs = new FileStream(filePathOutPut, FileMode.OpenOrCreate);
1491
+                                      try
1492
+                                      {
1493
+                                          device.Process(document.Pages[i], fs);
1494
+                                          fs.Close();
1495
+                                      }
1496
+                                      catch (Exception)
1497
+                                      {
1498
+                                          fs.Close();
1499
+                                          File.Delete(filePathOutPut);
1500
+                                      }
1501
+                                  }
1502
+                                  #endregion
1503
+                                  string[] page = images.ToArray();
1504
+                                  int num = 0;
1505
+                                  for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1506
+                                  {
1507
+                                      if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
1508
+                                      {
1509
+                                          APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
1510
+                                          APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
1511
+                                          APP.PageDrawList[i].PageNum = i + 1;
1512
+                                          APP.PageDrawList[i].ImgDocumentation = true;
1513
+                                      }
1514
+                                      else
1515
+                                      {
1516
+
1517
+                                          Model_DrawData model_DrawData = new Model_DrawData
1518
+                                          {
1519
+                                              PageImagePath = page[i - APP.pageData.pagenum],
1520
+                                              PdfImagePath = page[i - APP.pageData.pagenum],
1521
+                                              PageNum = i + 1,
1522
+                                              ImgDocumentation = true
1523
+                                          };
1524
+                                          APP.PageDrawList.Add(model_DrawData);
1525
+                                      }
1526
+                                      ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1527
+                                      ImgPrintTwo.Visibility = Visibility.Collapsed;
1528
+                                      btnPrint.IsEnabled = true;
1529
+                                      APP.SaveDraw();
1530
+                                      num++;
1531
+                                  }
1532
+                                  if (num > 0)
1533
+                                  {
1534
+                                      APP.pageData.currpage = APP.pageData.pagenum + 1;
1535
+                                      APP.pageData.pagenum += num;
1536
+                                      gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1537
+                                  }
1538
+                                  if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1539
+                                  {
1540
+                                      imgCanvas.Source = null;
1541
+                                      ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1542
+                                      ImgScreenshotTwo.Visibility = Visibility.Visible;
1543
+                                      btnScreenshot.IsEnabled = false;
1544
+                                      imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1545
+                                  }
1546
+                                  else
1547
+                                  {
1548
+                                      imgDocumentation.Source = null;
1549
+                                      imgCanvas.Source = null;
1550
+                                      ///截图可用
1551
+                                      ImgScreenshot.Visibility = Visibility.Visible;
1552
+                                      ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1553
+                                      btnScreenshot.IsEnabled = true;
1554
+                                  }
1555
+                                  APP.myloading.Hide();
1556
+                              }
1557
+                              else//word
1558
+                              {
1559
+                                  try
1560
+                                  {
1561
+                                      string paths = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1562
+                                      string[] page = ConvertWordToImage(filepath, paths, "", 0, 0, null, 0).ToArray();
1563
+                                      int num = 0;
1564
+                                      for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1565
+                                      {
1566
+                                          if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
1567
+                                          {
1568
+                                              APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
1569
+                                              APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
1570
+                                              APP.PageDrawList[i].PageNum = i + 1;
1571
+                                              APP.PageDrawList[i].ImgDocumentation = true;
1572
+                                          }
1573
+                                          else
1574
+                                          {
1575
+
1576
+                                              Model_DrawData model_DrawData = new Model_DrawData
1577
+                                              {
1578
+                                                  PageImagePath = page[i - APP.pageData.pagenum],
1579
+                                                  PdfImagePath = page[i - APP.pageData.pagenum],
1580
+                                                  PageNum = i + 1,
1581
+                                                  ImgDocumentation = true
1582
+                                              };
1583
+                                              APP.PageDrawList.Add(model_DrawData);
1584
+                                          }
1585
+                                          ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1586
+                                          ImgPrintTwo.Visibility = Visibility.Collapsed;
1587
+                                          btnPrint.IsEnabled = true;
1588
+                                          APP.SaveDraw();
1589
+                                          num++;
1590
+                                      }
1591
+                                      if (num > 0)
1592
+                                      {
1593
+                                          APP.pageData.currpage = APP.pageData.pagenum + 1;
1594
+                                          APP.pageData.pagenum += num;
1595
+                                          gridPage.Visibility = Visibility.Visible;//页码大于0 显示
1596
+                                      }
1597
+                                      if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
1598
+                                      {
1599
+
1600
+                                          imgCanvas.Source = null;
1601
+                                          ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1602
+                                          ImgScreenshotTwo.Visibility = Visibility.Visible;
1603
+                                          btnScreenshot.IsEnabled = false;
1604
+                                          imgDocumentation.Visibility = Visibility.Visible;
1605
+                                          imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
1606
+                                      }
1607
+                                      else
1608
+                                      {
1609
+                                          imgDocumentation.Source = null;
1610
+                                          imgCanvas.Source = null;
1611
+                                          ///截图可用
1612
+                                          ImgScreenshot.Visibility = Visibility.Visible;
1613
+                                          ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1614
+                                          btnScreenshot.IsEnabled = true;
1615
+                                      }
1616
+                                      APP.myloading.Hide();
1617
+                                  }
1618
+                                  catch (Exception ex)
1619
+                                  {
1620
+                                      APP.myloading.Hide();
1621
+                                      LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1622
+                                  }
1623
+                              }
1624
+                          }
1625
+                      }
1626
+                  }
1627
+                      ));
1628
+            
1290 1629
         }
1291 1630
         #endregion
1292 1631
 

+ 15
- 1
XHWK.WKTool/XHWK.WKTool.csproj Datei anzeigen

@@ -140,6 +140,7 @@
140 140
     <Compile Include="FileDirectoryWindow.xaml.cs">
141 141
       <DependentUpon>FileDirectoryWindow.xaml</DependentUpon>
142 142
     </Compile>
143
+    <Compile Include="Helpers\BackgroundWorkerHelper.cs" />
143 144
     <Compile Include="Helpers\ScreenHelper.cs" />
144 145
     <Compile Include="Helpers\WpfHelper.cs" />
145 146
     <Compile Include="Helpers\ZJClippingBorder.cs" />
@@ -171,6 +172,9 @@
171 172
     <Compile Include="PrintWindow.xaml.cs">
172 173
       <DependentUpon>PrintWindow.xaml</DependentUpon>
173 174
     </Compile>
175
+    <Compile Include="ProductVerification.xaml.cs">
176
+      <DependentUpon>ProductVerification.xaml</DependentUpon>
177
+    </Compile>
174 178
     <Compile Include="PromptWindow.xaml.cs">
175 179
       <DependentUpon>PromptWindow.xaml</DependentUpon>
176 180
     </Compile>
@@ -206,7 +210,7 @@
206 210
     </Page>
207 211
     <Page Include="KeyVerification.xaml">
208 212
       <SubType>Designer</SubType>
209
-      <Generator>MSBuild:Compile</Generator>
213
+      <Generator>XamlIntelliSenseFileGenerator</Generator>
210 214
     </Page>
211 215
     <Page Include="LoadDialog.xaml">
212 216
       <SubType>Designer</SubType>
@@ -224,6 +228,10 @@
224 228
       <SubType>Designer</SubType>
225 229
       <Generator>MSBuild:Compile</Generator>
226 230
     </Page>
231
+    <Page Include="ProductVerification.xaml">
232
+      <SubType>Designer</SubType>
233
+      <Generator>MSBuild:Compile</Generator>
234
+    </Page>
227 235
     <Page Include="PromptWindow.xaml">
228 236
       <Generator>MSBuild:Compile</Generator>
229 237
       <SubType>Designer</SubType>
@@ -1581,5 +1589,11 @@
1581 1589
     <Resource Include="Images\Toobar29.png" />
1582 1590
     <Resource Include="Images\Toobar30.png" />
1583 1591
   </ItemGroup>
1592
+  <ItemGroup>
1593
+    <Resource Include="Images\Toobar27_1.png" />
1594
+  </ItemGroup>
1595
+  <ItemGroup>
1596
+    <Resource Include="Images\rollCall_1.png" />
1597
+  </ItemGroup>
1584 1598
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1585 1599
 </Project>

Laden…
Abbrechen
Speichern