Преглед изворни кода

修改类名 去掉拓思德点阵笔初始化

tags/对接微服务前
张剑 пре 3 година
родитељ
комит
a5bd407a73

+ 0
- 274
XHWK.WKTool/DAL/DAL_TmatrixCode.cs Прегледај датотеку

@@ -1,274 +0,0 @@
1
-using Common.system;
2
-
3
-using Newtonsoft.Json.Linq;
4
-
5
-using System;
6
-using System.Collections.Specialized;
7
-using System.Threading;
8
-
9
-using XHWK.Model;
10
-
11
-namespace XHWK.WKTool.DAL
12
-{
13
-    /// <summary>
14
-    /// TQL在线铺码服务-改为SDK  暂无用
15
-    /// </summary>
16
-    public class DAL_TmatrixCode
17
-    {
18
-        /// <summary>
19
-        /// TQL铺码地址
20
-        /// </summary>
21
-        private string TmatrixCodeURL = APP.TmatrixCodeURL;
22
-        /// <summary>
23
-        /// TQL用户名
24
-        /// </summary>
25
-        string TQLUserName = "test122";
26
-        /// <summary>
27
-        /// TQL密码
28
-        /// </summary>
29
-        string TQLPassword = "123456";
30
-        /// <summary>
31
-        /// 用户登陆后的用户ID
32
-        /// </summary>
33
-        string UserID;
34
-        /// <summary>
35
-        /// 分配的铺码 ID
36
-        /// </summary>
37
-        string pageserial;
38
-        //1000 操作成功
39
-        //1001 打开数据库失败
40
-        //1002 用户名或密码错误
41
-        //1003 Key 信息错误(过期或已使用完)
42
-        //1004 上传 Pdf 文档无法打开
43
-        //1005 铺码初始化失败
44
-        //1006 铺码错误
45
-        //1007 Json 数据错误
46
-        //1008 接口错误
47
-        //1009 UserID 错误
48
-        //1010 未查到该历史数据
49
-        /// <summary>
50
-        /// TQL登陆
51
-        /// </summary>
52
-        /// <param name="Message"></param>
53
-        /// <returns></returns>
54
-        public bool TQLUserLogin(out string Message)
55
-        {
56
-            Exception ex = null;
57
-            Message = "";//请求重试5次 共5秒
58
-            for (int num = 0; num < 5; num++)
59
-            {
60
-                try
61
-                {
62
-                    JObject jo = HttpHelper.PostFunction(TmatrixCodeURL + @"/TmatrixCode/User/UserLogin", @"application/x-www-form-urlencoded", @"userName=" + TQLUserName + "&password=" + TQLPassword, "");
63
-                    if (jo == null)
64
-                    {
65
-                        Message = "无法访问铺码服务器,请检查网络或铺码服务器地址。";
66
-                        return false;
67
-                    }
68
-                    //"state":"1000",
69
-                    //"message":"File upload was succeed!",
70
-                    //" userID ":"1"
71
-                    //1000 操作成功
72
-                    if (jo["state"].ToString() == "1000")
73
-                    {
74
-                        Message = "";
75
-                        //登陆成功后用户ID
76
-                        UserID = jo["userID"].ToString();
77
-                        return true;
78
-                    }
79
-                    else
80
-                    {
81
-                        Message = jo["message"].ToString();
82
-                        return false;
83
-                    }
84
-                }
85
-                catch (Exception e)
86
-                {
87
-                    Message = "无法访问铺码服务器:" + e.Message;
88
-                    ex = e;
89
-                    Thread.Sleep(1000);
90
-                }
91
-            }
92
-            string ErrMessage = "【TQL登陆】(TQLUserLogin):请求失败。" + Message;
93
-            LogHelper.WriteErrLog(ErrMessage, ex);
94
-            return false;
95
-        }
96
-
97
-        /// <summary>
98
-        /// TQL上传文件
99
-        /// </summary>
100
-        /// <param name="filePath">文件路径</param>
101
-        /// <param name="fileName">文件名</param>
102
-        /// <param name="Message"></param>
103
-        /// <returns></returns>
104
-        public bool TQLStartTmatrix(string filePath, string fileName, out string Message)
105
-        {
106
-            Exception ex = null;
107
-            Message = "";//请求重试5次 共5秒
108
-            if (string.IsNullOrWhiteSpace(UserID))
109
-            {
110
-                if (!TQLUserLogin(out Message))
111
-                {
112
-                    return false;
113
-                }
114
-            }
115
-            for (int num = 0; num < 5; num++)
116
-            {
117
-                try
118
-                {
119
-                    //byte[] byteArray = FileToolsCommon.ReadBigFileSpecifyLength(VideoInfo.VideoPath, len, (int)VideoInfo.SliceLen);
120
-                    //userID Y 字符 登录之后分配的 ID
121
-                    //callBack Y 回调 API 该 API 由应用方提供,为 post 请求
122
-                    //createimage Y 字符 是否生成 png 图片(若生 成则会进行文件打包成 zip)0,不生成,1 生 成。
123
-                    //fileName Y 字符 文件名称数组
124
-                    //tmatrixType Y 字符 铺码类型(0.600DPI 打 印、1.1200DPI 打印、 2.印刷
125
-                    //fileData
126
-                    //参数
127
-                    NameValueCollection formFields = new NameValueCollection
128
-                            {
129
-                                { "userID", UserID },
130
-                                { "callBack", ""},
131
-                                { "createimage", "0" },
132
-                                { "fileName", fileName },
133
-                                { "tmatrixType", "1" }
134
-                            };
135
-                    string[] PathList = new string[] { filePath };
136
-                    JObject jo = HttpHelper.UploadFilesToRemoteUrl(TmatrixCodeURL + @"/TmatrixCode/User/startTmatrix", PathList, "", formFields);
137
-                    if (jo == null)
138
-                    {
139
-                        Message = "无法访问铺码服务器,请检查网络或铺码服务器地址。";
140
-                        return false;
141
-                    }
142
-                    Model_TmatrixCode resultObj = JsonHelper.JsonToObj<Model_TmatrixCode>(jo.ToString());
143
-
144
-                    //1000 操作成功
145
-                    if (resultObj.state == "1000")
146
-                    {
147
-                        Message = "";
148
-                        pageserial = resultObj.pageserial;
149
-                        return true;
150
-                    }
151
-                    else
152
-                    {
153
-                        Message = resultObj.message;
154
-                        return false;
155
-                    }
156
-                }
157
-                catch (Exception e)
158
-                {
159
-                    Message = "无法访问铺码服务器:" + e.Message;
160
-                    ex = e;
161
-                    Thread.Sleep(1000);
162
-                }
163
-            }
164
-            string ErrMessage = "【TQL上传】(TQLStartTmatrix):请求失败。" + Message;
165
-            LogHelper.WriteErrLog(ErrMessage, ex);
166
-            return false;
167
-        }
168
-
169
-        /// <summary>
170
-        /// 查询进度
171
-        /// </summary>
172
-        /// <param name="Message"></param>
173
-        /// <returns>-1失败 0:未铺码 1:正在铺码 2:铺码完成,3:未查到。</returns>
174
-        public int TQLSchedulequery(out string Message)
175
-        {
176
-            Exception ex = null;
177
-            Message = "";//请求重试5次 共5秒
178
-            for (int num = 0; num < 5; num++)
179
-            {
180
-                try
181
-                {
182
-                    string[] pageserialList = new string[] { pageserial };
183
-                    JObject jo = HttpHelper.PostFunction(TmatrixCodeURL + @"/TmatrixCode/User/schedulequery", @"application/x-www-form-urlencoded", @"userID=" + UserID + "&pageserialList=" + pageserialList, "");
184
-                    if (jo == null)
185
-                    {
186
-                        Message = "无法访问铺码服务器,请检查网络或铺码服务器地址。";
187
-                        return -1;
188
-                    }
189
-                    Model_ScheduleQuery resultObj = JsonHelper.JsonToObj<Model_ScheduleQuery>(jo.ToString());
190
-
191
-                    //1000 操作成功
192
-                    if (resultObj.state == "1000")
193
-                    {
194
-                        //state Y 字符 返回标志
195
-                        //message Y 字符 返回标志说明
196
-                        //list Y 字符 进度数组
197
-                        //schedule Y 字符 返回铺码进度:0 - 100
198
-                        //pageserial 铺码 ID 字符 铺码 ID
199
-                        //state Y 数字 0:未铺码 1:正在铺码 2:铺码完成,3:未查到。
200
-                        Message = "";
201
-                        return int.Parse(resultObj.list.Find(x => x.pageserial == pageserial).state);
202
-                    }
203
-                    else
204
-                    {
205
-                        Message = resultObj.message;
206
-                        return -1;
207
-                    }
208
-                }
209
-                catch (Exception e)
210
-                {
211
-                    Message = "无法访问铺码服务器:" + e.Message;
212
-                    ex = e;
213
-                    Thread.Sleep(1000);
214
-                }
215
-            }
216
-            string ErrMessage = "【TQL查询进度】(TQLSchedulequery):请求失败。" + Message;
217
-            LogHelper.WriteErrLog(ErrMessage, ex);
218
-            return -1;
219
-        }
220
-
221
-        /// <summary>
222
-        /// TQL历史查询
223
-        /// </summary>
224
-        /// <param name="Message"></param>
225
-        /// <returns></returns>
226
-        public string TQLHistoryQuery(string fileName, string startPage, string maxPage, out string Message)
227
-        {
228
-            Exception ex = null;
229
-            Message = "";//请求重试5次 共5秒
230
-            for (int num = 0; num < 5; num++)
231
-            {
232
-                try
233
-                {
234
-                    //userID Y 字符 登录之后分配的 ID
235
-                    //fileName N 字符 查询文件名称
236
-                    //pageserial N 字符 铺码 ID(铺码 ID 或文件名必须设置一个)
237
-                    //startPage Y int 开始查询页码,从 1 开 始
238
-                    //maxPage Y int 最大页码数
239
-                    JObject jo = HttpHelper.PostFunction(TmatrixCodeURL + @"/TmatrixCode/User/HistoryQuery", @"application/x-www-form-urlencoded", @"userID=" + UserID + "&fileName=" + fileName + "&pageserial=" + pageserial + "&startPage=" + startPage + "&maxPage=" + maxPage, "");
240
-                    if (jo == null)
241
-                    {
242
-                        Message = "无法访问铺码服务器,请检查网络或铺码服务器地址。";
243
-                        return "";
244
-                    }
245
-
246
-                    Model_HistoryQuery resultObj = JsonHelper.JsonToObj<Model_HistoryQuery>(jo.ToString());
247
-                    //1000 操作成功
248
-                    if (resultObj.state == "1000")
249
-                    {
250
-                        Message = "";
251
-                        Model_HistoryPageList model_HistoryPageList = resultObj.pageList[0];
252
-                        Model_HistoryListItem model_HistoryListItem = model_HistoryPageList.list.Find(x => x.pageserial == pageserial);
253
-
254
-                        return model_HistoryListItem.url;
255
-                    }
256
-                    else
257
-                    {
258
-                        Message = resultObj.message;
259
-                        return "";
260
-                    }
261
-                }
262
-                catch (Exception e)
263
-                {
264
-                    Message = "无法访问铺码服务器:" + e.Message;
265
-                    ex = e;
266
-                    Thread.Sleep(1000);
267
-                }
268
-            }
269
-            string ErrMessage = "【TQL查询历史记录】(TQLHistoryQuery):请求失败。" + Message;
270
-            LogHelper.WriteErrLog(ErrMessage, ex);
271
-            return "";
272
-        }
273
-    }
274
-}

XHWK.WKTool/DAL/Interface.cs → XHWK.WKTool/DAL/XHApi.cs Прегледај датотеку

@@ -11,7 +11,7 @@ using XHWK.Model;
11 11
 
12 12
 namespace XHWK.WKTool.DAL
13 13
 {
14
-    public class Interface
14
+    public class XHApi
15 15
     {
16 16
         /// <summary>
17 17
         /// 激活信息--添加

+ 1
- 1
XHWK.WKTool/KeyVerification.xaml.cs Прегледај датотеку

@@ -18,7 +18,7 @@ namespace XHWK.WKTool
18 18
          */
19 19
     public partial class KeyVerification : Window
20 20
     {
21
-        private readonly Interface registerController = new Interface();
21
+        private readonly XHApi registerController = new XHApi();
22 22
         private int serverReturnCode = 0;
23 23
 
24 24
         public KeyVerification()

+ 48
- 26
XHWK.WKTool/LoginWindow.xaml.cs Прегледај датотеку

@@ -21,7 +21,7 @@ namespace XHWK.WKTool
21 21
         /// <summary>
22 22
         /// 调用接口
23 23
         /// </summary>
24
-        private readonly Interface @interface = new Interface();
24
+        private readonly XHApi xhapi = new XHApi();
25 25
 
26 26
         public LoginWindow()
27 27
         {
@@ -47,8 +47,10 @@ namespace XHWK.WKTool
47 47
         /// <summary>
48 48
         /// 关闭事件
49 49
         /// </summary>
50
-        /// <param name="sender"></param>
51
-        /// <param name="e"></param>
50
+        /// <param name="sender">
51
+        /// </param>
52
+        /// <param name="e">
53
+        /// </param>
52 54
         private void BtnDown_Click(object sender, RoutedEventArgs e)
53 55
         {
54 56
             txbAccountNumber.Text = string.Empty;
@@ -59,8 +61,10 @@ namespace XHWK.WKTool
59 61
         /// <summary>
60 62
         /// 登录事件
61 63
         /// </summary>
62
-        /// <param name="sender"></param>
63
-        /// <param name="e"></param>
64
+        /// <param name="sender">
65
+        /// </param>
66
+        /// <param name="e">
67
+        /// </param>
64 68
         private void BtnStart_Click(object sender, RoutedEventArgs e)
65 69
         {
66 70
             #region 获取服务接口地址 --2021年7月9日赵耀
@@ -108,7 +112,7 @@ namespace XHWK.WKTool
108 112
             accountNumber = txbAccountNumber.Text.Replace(" ", "").Trim();
109 113
             password = pobPassword.Password.Replace(" ", "").Trim();
110 114
 
111
-            int code = @interface.Login(accountNumber, password);
115
+            int code = xhapi.Login(accountNumber, password);
112 116
             if (code == 0)
113 117
             {
114 118
                 FileToolsCommon.CreateDirectory(APP.DataPath);
@@ -136,7 +140,7 @@ namespace XHWK.WKTool
136 140
                 if (!string.IsNullOrWhiteSpace(APP.UserInfo.Headpic))
137 141
                 {
138 142
                     //FileToolsCommon.
139
-                    @interface.DownloadAvatar(APP.UserInfo.Headpic, HeadpicPath);
143
+                    xhapi.DownloadAvatar(APP.UserInfo.Headpic, HeadpicPath);
140 144
                 }
141 145
 
142 146
                 #endregion 下载头像
@@ -154,8 +158,10 @@ namespace XHWK.WKTool
154 158
         /// <summary>
155 159
         /// 记住账号
156 160
         /// </summary>
157
-        /// <param name="sender"></param>
158
-        /// <param name="e"></param>
161
+        /// <param name="sender">
162
+        /// </param>
163
+        /// <param name="e">
164
+        /// </param>
159 165
         private void CkSaveName_Click(object sender, RoutedEventArgs e)
160 166
         {
161 167
         }
@@ -163,8 +169,10 @@ namespace XHWK.WKTool
163 169
         /// <summary>
164 170
         /// 读取客户设置
165 171
         /// </summary>
166
-        /// <param name="settingName"></param>
167
-        /// <returns></returns>
172
+        /// <param name="settingName">
173
+        /// </param>
174
+        /// <returns>
175
+        /// </returns>
168 176
         public static string GetSettingString(string settingName)
169 177
         {
170 178
             try
@@ -181,8 +189,10 @@ namespace XHWK.WKTool
181 189
         /// <summary>
182 190
         /// 更新设置
183 191
         /// </summary>
184
-        /// <param name="settingName"></param>
185
-        /// <param name="valueName"></param>
192
+        /// <param name="settingName">
193
+        /// </param>
194
+        /// <param name="valueName">
195
+        /// </param>
186 196
         public static void UpdateSettingString(string settingName, string valueName)
187 197
         {
188 198
             Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
@@ -199,8 +209,10 @@ namespace XHWK.WKTool
199 209
         /// <summary>
200 210
         /// 限制输入特殊字符
201 211
         /// </summary>
202
-        /// <param name="sender"></param>
203
-        /// <param name="e"></param>
212
+        /// <param name="sender">
213
+        /// </param>
214
+        /// <param name="e">
215
+        /// </param>
204 216
         private void txbAccountNumber_PreviewTextInput(object sender, TextCompositionEventArgs e)
205 217
         {
206 218
             try
@@ -235,8 +247,10 @@ namespace XHWK.WKTool
235 247
         /// <summary>
236 248
         /// 打开服务地址
237 249
         /// </summary>
238
-        /// <param name="sender"></param>
239
-        /// <param name="e"></param>
250
+        /// <param name="sender">
251
+        /// </param>
252
+        /// <param name="e">
253
+        /// </param>
240 254
         private void BtnServiceAddress_Click(object sender, RoutedEventArgs e)
241 255
         {
242 256
             GridLoginPage.Visibility = Visibility.Collapsed;
@@ -246,8 +260,10 @@ namespace XHWK.WKTool
246 260
         /// <summary>
247 261
         /// 取消
248 262
         /// </summary>
249
-        /// <param name="sender"></param>
250
-        /// <param name="e"></param>
263
+        /// <param name="sender">
264
+        /// </param>
265
+        /// <param name="e">
266
+        /// </param>
251 267
         private void BtnCancel_Click(object sender, RoutedEventArgs e)
252 268
         {
253 269
             GridLoginPage.Visibility = Visibility.Visible;
@@ -257,15 +273,17 @@ namespace XHWK.WKTool
257 273
         /// <summary>
258 274
         /// 服务地址设置
259 275
         /// </summary>
260
-        /// <param name="sender"></param>
261
-        /// <param name="e"></param>
276
+        /// <param name="sender">
277
+        /// </param>
278
+        /// <param name="e">
279
+        /// </param>
262 280
         private void BtnSetServiceAddress_Click(object sender, RoutedEventArgs e)
263 281
         {
264 282
             #region 获取服务地址 -- 2021年7月8日赵耀
265 283
 
266 284
             if (!string.IsNullOrWhiteSpace(TbxServiceAddress.Text))
267 285
             {
268
-                if (@interface.GetServiceAddress(TbxServiceAddress.Text, out string Message))
286
+                if (xhapi.GetServiceAddress(TbxServiceAddress.Text, out string Message))
269 287
                 {
270 288
                     APP.SaveServiceAddressData();
271 289
                     APP.SwitchAddress();
@@ -288,8 +306,10 @@ namespace XHWK.WKTool
288 306
         /// <summary>
289 307
         /// 校外
290 308
         /// </summary>
291
-        /// <param name="sender"></param>
292
-        /// <param name="e"></param>
309
+        /// <param name="sender">
310
+        /// </param>
311
+        /// <param name="e">
312
+        /// </param>
293 313
         private void RbnIsOutsideSchool_Checked(object sender, RoutedEventArgs e)
294 314
         {
295 315
             APP.IsOutsideSchool = true;
@@ -303,8 +323,10 @@ namespace XHWK.WKTool
303 323
         /// <summary>
304 324
         /// 校内
305 325
         /// </summary>
306
-        /// <param name="sender"></param>
307
-        /// <param name="e"></param>
326
+        /// <param name="sender">
327
+        /// </param>
328
+        /// <param name="e">
329
+        /// </param>
308 330
         private void RbnSchool_Checked(object sender, RoutedEventArgs e)
309 331
         {
310 332
             APP.IsOutsideSchool = false;

+ 1
- 1
XHWK.WKTool/ProductVerification.xaml.cs Прегледај датотеку

@@ -20,7 +20,7 @@ namespace XHWK.WKTool
20 20
          */
21 21
     public partial class ProductVerification : Window
22 22
     {
23
-        private readonly Interface registerController = new Interface();
23
+        private readonly XHApi registerController = new XHApi();
24 24
         private int serverReturnCode = 0;
25 25
 
26 26
         public ProductVerification()

+ 46
- 22
XHWK.WKTool/UploadWindow.xaml.cs Прегледај датотеку

@@ -1,8 +1,8 @@
1 1
 using Common.system;
2 2
 
3 3
 using System;
4
-using System.Collections.ObjectModel;
5 4
 using System.Threading;
5
+using System.Collections.ObjectModel;
6 6
 using System.Windows;
7 7
 using System.Windows.Controls;
8 8
 using System.Windows.Input;
@@ -22,39 +22,48 @@ namespace XHWK.WKTool
22 22
         /// <summary>
23 23
         /// 调用接口
24 24
         /// </summary>
25
-        private readonly Interface @interface = new Interface();
25
+        private readonly XHApi xhapi = new XHApi();
26
+
26 27
         /// <summary>
27 28
         /// 前台数据
28 29
         /// </summary>
29 30
         internal LoginPageData pageData = new LoginPageData();
31
+
30 32
         /// <summary>
31 33
         /// 文件名
32 34
         /// </summary>
33 35
         private string Resourcename = string.Empty;
36
+
34 37
         /// <summary>
35 38
         /// 文件大小
36 39
         /// </summary>
37 40
         private long Resourcesize = 0;
41
+
38 42
         /// <summary>
39 43
         /// 文件类型
40 44
         /// </summary>
41 45
         private string Suffix = string.Empty;
46
+
42 47
         /// <summary>
43 48
         /// 唯一编号
44 49
         /// </summary>
45 50
         private string Guid = string.Empty;
51
+
46 52
         //定义事件
47 53
         public event ChangeTextHandlers ChangeTextEvents;
54
+
48 55
         /// <summary>
49 56
         /// 当前视频的下标
50 57
         /// </summary>
51 58
         private int i = 0;
59
+
52 60
         private System.Timers.Timer times;
61
+
53 62
         public UploadWindow()
54 63
         {
55 64
             InitializeComponent();
56
-
57 65
         }
66
+
58 67
         /// <summary>
59 68
         /// 初始化
60 69
         /// </summary>
@@ -68,13 +77,15 @@ namespace XHWK.WKTool
68 77
             tip_outer.Visibility = Visibility.Collapsed;
69 78
             Tsubjectbook();
70 79
         }
80
+
71 81
         /// <summary>
72 82
         /// 教材接口调用
73 83
         /// </summary>
74
-        /// <returns></returns>
84
+        /// <returns>
85
+        /// </returns>
75 86
         private void Tsubjectbook()
76 87
         {
77
-            int code = @interface.TsubjectbookList();
88
+            int code = xhapi.TsubjectbookList();
78 89
             if (code == 0)
79 90
             {
80 91
                 for (int i = 0; i < APP.TsubjectbookList.Count; i++)
@@ -95,6 +106,7 @@ namespace XHWK.WKTool
95 106
                 MessageWindow.Show(APP.ServerMsg);
96 107
             }
97 108
         }
109
+
98 110
         /// <summary>
99 111
         /// 章节接口调用
100 112
         /// </summary>
@@ -105,7 +117,7 @@ namespace XHWK.WKTool
105 117
             {
106 118
                 selectIndex = 0;
107 119
             }
108
-            int code = @interface.DirectorList(APP.TsubjectbookList[selectIndex].Lsbid, 4, APP.UserInfo.Userid);
120
+            int code = xhapi.DirectorList(APP.TsubjectbookList[selectIndex].Lsbid, 4, APP.UserInfo.Userid);
109 121
             if (code == 0)
110 122
             {
111 123
                 pageData.zhangjieList.Clear();
@@ -133,10 +145,12 @@ namespace XHWK.WKTool
133 145
                 MessageWindow.Show(APP.ServerMsg);
134 146
             }
135 147
         }
148
+
136 149
         /// <summary>
137 150
         /// 子章节递归
138 151
         /// </summary>
139
-        /// <param name="directorList"></param>
152
+        /// <param name="directorList">
153
+        /// </param>
140 154
         private void addChild(Model_DirectorList directorList)
141 155
         {
142 156
             if (directorList.children != null && directorList.children.Count > 0)
@@ -156,11 +170,14 @@ namespace XHWK.WKTool
156 170
                 }
157 171
             }
158 172
         }
173
+
159 174
         /// <summary>
160 175
         /// 章节是否加空格符
161 176
         /// </summary>
162
-        /// <param name="num"></param>
163
-        /// <returns></returns>
177
+        /// <param name="num">
178
+        /// </param>
179
+        /// <returns>
180
+        /// </returns>
164 181
         private string getSpace(int num)
165 182
         {
166 183
             string str = "";
@@ -170,20 +187,22 @@ namespace XHWK.WKTool
170 187
             }
171 188
             return str;
172 189
         }
190
+
173 191
         private void Window_Loaded(object sender, RoutedEventArgs e)
174 192
         {
175
-
176 193
         }
177 194
 
178 195
         private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
179 196
         {
180
-
181 197
         }
198
+
182 199
         /// <summary>
183 200
         /// 教材下拉框改变事件
184 201
         /// </summary>
185
-        /// <param name="sender"></param>
186
-        /// <param name="e"></param>
202
+        /// <param name="sender">
203
+        /// </param>
204
+        /// <param name="e">
205
+        /// </param>
187 206
         private void toolbar_list_SelectionChanged(object sender, SelectionChangedEventArgs e)
188 207
         {
189 208
             Director();
@@ -194,11 +213,14 @@ namespace XHWK.WKTool
194 213
             APP.IsUpLoad = false;
195 214
             Hide();
196 215
         }
216
+
197 217
         /// <summary>
198 218
         /// 上传到个人空间
199 219
         /// </summary>
200
-        /// <param name="sender"></param>
201
-        /// <param name="e"></param>
220
+        /// <param name="sender">
221
+        /// </param>
222
+        /// <param name="e">
223
+        /// </param>
202 224
         private void BtnStart_Click(object sender, RoutedEventArgs e)
203 225
         {
204 226
             if (string.IsNullOrWhiteSpace(book_list.Text))
@@ -229,6 +251,7 @@ namespace XHWK.WKTool
229 251
             times.Elapsed += Times_ElapsedClick;
230 252
             times.Start();
231 253
         }
254
+
232 255
         private void StartUpload()
233 256
         {
234 257
             try
@@ -236,8 +259,6 @@ namespace XHWK.WKTool
236 259
                 DAL_Upload dAL_Upload = new DAL_Upload();
237 260
                 if (dAL_Upload.UploadVideoTwo(Guid, out string ErrMessage))
238 261
                 {
239
-
240
-
241 262
                     //        converted: 0
242 263
                     //createid: 80
243 264
                     //directorid: 1009
@@ -296,7 +317,7 @@ namespace XHWK.WKTool
296 317
 
297 318
                     model_ResourceAdd.suffix = Suffix;
298 319
                     //model_ResourceAdd.uid = 0;//zxy
299
-                    int code = @interface.ResourceAdd(model_ResourceAdd);
320
+                    int code = xhapi.ResourceAdd(model_ResourceAdd);
300 321
                     if (code == 0)
301 322
                     {
302 323
                         Dispatcher.Invoke(() =>
@@ -318,7 +339,6 @@ namespace XHWK.WKTool
318 339
                                 }
319 340
                             }
320 341
 
321
-
322 342
                             btnStart.IsEnabled = true;
323 343
                             book_list.IsEnabled = true;
324 344
                             cmbTeachingMaterial.IsEnabled = true;
@@ -376,11 +396,14 @@ namespace XHWK.WKTool
376 396
         }
377 397
 
378 398
         private int num = 0;
399
+
379 400
         /// <summary>
380 401
         /// 计时器
381 402
         /// </summary>
382
-        /// <param name="sender"></param>
383
-        /// <param name="e"></param>
403
+        /// <param name="sender">
404
+        /// </param>
405
+        /// <param name="e">
406
+        /// </param>
384 407
         private void Times_ElapsedClick(object sender, System.Timers.ElapsedEventArgs e)
385 408
         {
386 409
             Dispatcher.Invoke(() =>
@@ -399,6 +422,7 @@ namespace XHWK.WKTool
399 422
             });
400 423
         }
401 424
     }
425
+
402 426
     public class LoginPageData : NotifyModel
403 427
     {
404 428
         public ObservableCollection<ComboBoxBean> bookList { get; set; }
@@ -411,4 +435,4 @@ namespace XHWK.WKTool
411 435
             zhangjieList = new ObservableCollection<ComboBoxBean>();
412 436
         }
413 437
     }
414
-}
438
+}

+ 345
- 203
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 1
- 1
XHWK.WKTool/XHWK.WKTool.csproj Прегледај датотеку

@@ -241,7 +241,7 @@
241 241
       <DependentUpon>CountdownWindow.xaml</DependentUpon>
242 242
     </Compile>
243 243
     <Compile Include="DAL\DAL_Upload.cs" />
244
-    <Compile Include="DAL\Interface.cs" />
244
+    <Compile Include="DAL\XHApi.cs" />
245 245
     <Compile Include="DAL\ResultVo.cs" />
246 246
     <Compile Include="DeviceWindow.xaml.cs">
247 247
       <DependentUpon>DeviceWindow.xaml</DependentUpon>

+ 1
- 0
XHWK.WKTool/system/LogHelper.cs Прегледај датотеку

@@ -22,6 +22,7 @@ namespace Common.system
22 22
             if (loginfo.IsInfoEnabled)
23 23
             {
24 24
                 loginfo.Info(info);
25
+                Console.WriteLine(info);
25 26
             }
26 27
         }
27 28
 

Loading…
Откажи
Сачувај