Переглянути джерело

互动 个人空间数据

ZhangXueYang
zhangxueyang 3 роки тому
джерело
коміт
e1edb4e27c
31 змінених файлів з 225 додано та 53 видалено
  1. 1
    0
      Common/Common.csproj
  2. 1
    1
      XHZB.Desktop/AttendanceWindow.xaml
  3. 1
    1
      XHZB.Desktop/AttendanceWindow.xaml.cs
  4. BIN
      XHZB.Desktop/Images/Resource/CLASS.png
  5. BIN
      XHZB.Desktop/Images/Resource/DOC.png
  6. BIN
      XHZB.Desktop/Images/Resource/DSC.png
  7. BIN
      XHZB.Desktop/Images/Resource/EXCEL.png
  8. BIN
      XHZB.Desktop/Images/Resource/FLV.png
  9. BIN
      XHZB.Desktop/Images/Resource/MP3.png
  10. BIN
      XHZB.Desktop/Images/Resource/MP4.png
  11. BIN
      XHZB.Desktop/Images/Resource/PDF.png
  12. BIN
      XHZB.Desktop/Images/Resource/PNG.png
  13. BIN
      XHZB.Desktop/Images/Resource/PPT.png
  14. BIN
      XHZB.Desktop/Images/Resource/TXT.png
  15. BIN
      XHZB.Desktop/Images/Resource/WAV.png
  16. BIN
      XHZB.Desktop/Images/Resource/resource_0.png
  17. BIN
      XHZB.Desktop/Images/Resource/resource_1.png
  18. BIN
      XHZB.Desktop/Images/Resource/resource_2.png
  19. 1
    1
      XHZB.Desktop/LoginWindow.xaml
  20. 44
    7
      XHZB.Desktop/LoginWindow.xaml.cs
  21. 1
    1
      XHZB.Desktop/RollCallWindow.xaml
  22. 23
    23
      XHZB.Desktop/RollCallWindow.xaml.cs
  23. 5
    3
      XHZB.Desktop/ToolbarWindow.xaml.cs
  24. 29
    12
      XHZB.Desktop/UserCenterWindow.xaml.cs
  25. 26
    0
      XHZB.Desktop/Utils/RegisterController.cs
  26. 1
    1
      XHZB.Desktop/WebSocket/SocketCallback.cs
  27. 1
    0
      XHZB.Desktop/WebSocket/SocketClient.cs
  28. 60
    2
      XHZB.Desktop/WebSocket/WSocketClient.cs
  29. 17
    1
      XHZB.Desktop/XHZB.Desktop.csproj
  30. 13
    0
      XHZB.Model/CisectionidModel.cs
  31. 1
    0
      XHZB.Model/XHZB.Model.csproj

+ 1
- 0
Common/Common.csproj Переглянути файл

@@ -139,6 +139,7 @@
139 139
     <Compile Include="system\LogHelper.cs" />
140 140
     <Compile Include="system\PrimaryScreen.cs" />
141 141
     <Compile Include="Properties\AssemblyInfo.cs" />
142
+    <Compile Include="system\RegistryHelper.cs" />
142 143
     <Compile Include="system\SplashScreen.cs" />
143 144
     <Compile Include="system\XmlUtilHelper.cs" />
144 145
     <Compile Include="system\ZJClippingBorder.cs" />

+ 1
- 1
XHZB.Desktop/AttendanceWindow.xaml Переглянути файл

@@ -174,7 +174,7 @@
174 174
             <Grid x:Name="gridImg" Grid.Row="2" Visibility="Collapsed">
175 175
                 <Image x:Name="img"/>
176 176
             </Grid>
177
-            <Viewbox Grid.Row="3">
177
+            <Viewbox Grid.Row="3" Visibility="Hidden">
178 178
                 <Border
179 179
                     Grid.Row="3"
180 180
                     Margin="25,0,25,0"

+ 1
- 1
XHZB.Desktop/AttendanceWindow.xaml.cs Переглянути файл

@@ -56,7 +56,7 @@ namespace XHZB.Desktop
56 56
             DragMove();
57 57
         }
58 58
 
59
-        public void receiveWsMsg(ZWsMsgVo msg)
59
+        public void receiveWsMsg(SocketModel msg)
60 60
         {
61 61
         }
62 62
 

BIN
XHZB.Desktop/Images/Resource/CLASS.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/DOC.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/DSC.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/EXCEL.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/FLV.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/MP3.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/MP4.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/PDF.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/PNG.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/PPT.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/TXT.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/WAV.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/resource_0.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/resource_1.png Переглянути файл


BIN
XHZB.Desktop/Images/Resource/resource_2.png Переглянути файл


+ 1
- 1
XHZB.Desktop/LoginWindow.xaml Переглянути файл

@@ -459,7 +459,7 @@
459 459
                 Foreground="White"
460 460
                 Text="测试版" />
461 461
             </StackPanel>
462
-            <Button x:Name="btnSetUp" Height="25" Width="66" HorizontalAlignment="Right" Cursor="Hand"  Margin="0,0,5,6" VerticalAlignment="Bottom" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnSetUp_Click">
462
+            <Button x:Name="btnSetUp" Height="25" Width="66" HorizontalAlignment="Right" Cursor="Hand"  Margin="0,0,5,6" VerticalAlignment="Bottom" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnSetUp_Click" Visibility="Hidden">
463 463
                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
464 464
                     <Image Source=".\Images\Login\设置@2x.png"/>
465 465
                     <TextBlock Text="设置" Foreground="White" FontSize="16"   HorizontalAlignment="Right"    

+ 44
- 7
XHZB.Desktop/LoginWindow.xaml.cs Переглянути файл

@@ -503,15 +503,20 @@ namespace XHZB.Desktop
503 503
             APP.myloading.Hide();
504 504
             if (serverReturnCode == APP.ServerScuessCode)
505 505
             {
506
-                string imagepath = APP.classRoomImagePath();
507
-                if (!Directory.Exists(imagepath))
506
+                new Thread(o =>
508 507
                 {
509
-                    Directory.CreateDirectory(imagepath);
510
-                }
511
-                ToolbarWindow win = new ToolbarWindow();
508
+                    InvokeLiveBroadcastServering();
509
+                    Dispatcher.Invoke(new Action(() =>
510
+                    {
511
+                        InvokeServerLiveBroadcastCompate();
512
+                    }));
513
+
514
+                }).Start();
515
+
512 516
 
513
-                Close();
514
-                win.ShowDialog();
517
+
518
+
519
+           
515 520
 
516 521
 
517 522
 
@@ -555,6 +560,38 @@ namespace XHZB.Desktop
555 560
             }
556 561
         }
557 562
         /// <summary>
563
+        /// 开始直播服务-调用
564
+        /// </summary>
565
+        /// <returns></returns>
566
+        private object InvokeLiveBroadcastServering()  
567
+        {
568
+            serverReturnCode = registerController.ClassList();
569
+            return APP.ErrorMessage;
570
+        }
571
+        /// <summary>
572
+        /// 开始直播服务-返回结果
573
+        /// </summary>
574
+        /// <returns></returns>
575
+        public void InvokeServerLiveBroadcastCompate()
576
+        {
577
+            if (serverReturnCode == APP.ServerScuessCode)
578
+            {
579
+                string imagepath = APP.classRoomImagePath();
580
+                if (!Directory.Exists(imagepath))
581
+                {
582
+                    Directory.CreateDirectory(imagepath);
583
+                }
584
+                ToolbarWindow win = new ToolbarWindow();
585
+
586
+                Close();
587
+                win.ShowDialog();
588
+            }
589
+            else
590
+            {
591
+                MessageWindow.Show(APP.ErrorMessage);
592
+            }
593
+        }
594
+        /// <summary>
558 595
         /// 教师任教班级服务-调用
559 596
         /// </summary>
560 597
         /// <returns></returns>

+ 1
- 1
XHZB.Desktop/RollCallWindow.xaml Переглянути файл

@@ -283,7 +283,7 @@
283 283
                     <TextBlock FontSize="30" Text="人抢答" />
284 284
                 </StackPanel>
285 285
             </Grid>
286
-            <Viewbox Grid.Row="3">
286
+            <Viewbox Grid.Row="3" Visibility="Hidden">
287 287
                 <Border
288 288
                     Grid.Row="3"
289 289
                     Margin="33,0,33,0"

+ 23
- 23
XHZB.Desktop/RollCallWindow.xaml.cs Переглянути файл

@@ -19,7 +19,7 @@ namespace XHZB.Desktop
19 19
     /// <summary>
20 20
     /// 点名抢答
21 21
     /// </summary>
22
-    public partial class RollCallWindow : Window/*, ZSocketCallback*/
22
+    public partial class RollCallWindow : Window, SocketCallback
23 23
     {
24 24
         #region 值初始化
25 25
 
@@ -86,7 +86,7 @@ namespace XHZB.Desktop
86 86
             }
87 87
             Initialize();
88 88
 
89
-            //ZSocketServer.getInstance().addWin(this);
89
+            WSocketClient.getInstance().addWin(this);
90 90
         }
91 91
 
92 92
         /// <summary>
@@ -123,13 +123,13 @@ namespace XHZB.Desktop
123 123
                    receiveWsMsg(null);
124 124
                }));
125 125
         }
126
-        public void receiveWsMsg(ZWsMsgVo msg)
126
+        public void receiveWsMsg(SocketModel msg)
127 127
         {
128 128
             if (!isRollCall && !isRushToAnswer)
129 129
             {
130 130
                 initPageData();
131 131
             }
132
-            if (msg != null && msg.type == 402 && isRushToAnswer && msg.body.asktid == APP.askid)
132
+            if (msg != null && msg.c == 2021)
133 133
             {
134 134
                 Console.WriteLine(msg);
135 135
 
@@ -137,7 +137,7 @@ namespace XHZB.Desktop
137 137
                 #region 去重
138 138
                 for (int i = 0; i < pageData.userList.Count; i++)
139 139
                 {
140
-                    if (msg.body.userid.ToString().Equals(pageData.userList[i].ID))
140
+                    if (msg.b.stid.ToString().Equals(pageData.userList[i].ID))
141 141
                     {
142 142
                         return;
143 143
                     }
@@ -197,20 +197,20 @@ namespace XHZB.Desktop
197 197
                 Dispatcher.Invoke(DispatcherPriority.Normal,
198 198
                     new Action(() =>
199 199
                     {
200
-                        try
201
-                        {
202
-                            if (pageData.userList.Count > 0)
203
-                            {
204
-                                if (pageData.userList[pageData.userList.Count - 1].askid != msg.body.asktid)
205
-                                {
206
-                                    pageData.userList.Clear();
207
-                                }
208
-                            }
209
-                        }
210
-                        catch (Exception ex)
211
-                        {
212
-                            LogHelper.WriteErrLog("【抢答】(receiveWsMsg)socket移除askid不一致用户," + ex.Message, ex);
213
-                        }
200
+                        //try
201
+                        //{
202
+                        //    if (pageData.userList.Count > 0)
203
+                        //    {
204
+                        //        if (pageData.userList[pageData.userList.Count - 1].askid != msg.body.asktid)
205
+                        //        {
206
+                        //            pageData.userList.Clear();
207
+                        //        }
208
+                        //    }
209
+                        //}
210
+                        //catch (Exception ex)
211
+                        //{
212
+                        //    LogHelper.WriteErrLog("【抢答】(receiveWsMsg)socket移除askid不一致用户," + ex.Message, ex);
213
+                        //}
214 214
 
215 215
                         //renderView();
216 216
                         returnNum++;
@@ -233,7 +233,7 @@ namespace XHZB.Desktop
233 233
                                 medal = "../Images/RollCall/rollCall_6.png";
234 234
                                 attendance = "../Images/RollCall/attendance_33.png";
235 235
                             }
236
-                            string userpic = msg.body.userpic;
236
+                            string userpic = msg.b.stpic;
237 237
                             if (ZCache.headDic.ContainsKey(userpic.Replace("/", "")))
238 238
                             {
239 239
                                 userpic = ZCache.headDic[userpic.Replace("/", "")];
@@ -244,14 +244,14 @@ namespace XHZB.Desktop
244 244
                             }
245 245
                             pageData.userList.Add(new RollCallPageData()
246 246
                             {
247
-                                Name = msg.body.username,
247
+                                Name = msg.b.stname,
248 248
                                 Attendance_33 = "Collapsed",
249 249
                                 Attendance_3 = "Visible",
250 250
                                 Pic = userpic,
251
-                                ID = msg.body.userid.ToString(),
251
+                                ID = msg.b.stid.ToString(),
252 252
                                 Attendance = attendance,
253 253
                                 Medal = medal,
254
-                                askid = msg.body.asktid
254
+                              
255 255
 
256 256
                             });
257 257
                             stpAnswer.Visibility = Visibility.Visible;

+ 5
- 3
XHZB.Desktop/ToolbarWindow.xaml.cs Переглянути файл

@@ -611,13 +611,15 @@ namespace XHZB.Desktop
611 611
                 //    {
612 612
                 //        MyApp.ZipFile();
613 613
                 //    }
614
-
614
+                //else
615
+                //{
616
+                EndLive();
617
+                //}
615 618
                 WSocketClient.getInstance().SendMessage(SocketMsgManger.NolineMsg());
616 619
                 Dispatcher.Invoke(new Action(() =>
617 620
                 {
618 621
                     System.Environment.Exit(0);
619 622
                 }));
620
-                //}).Start();
621 623
             }
622 624
             catch (Exception ex)
623 625
             {
@@ -831,7 +833,7 @@ namespace XHZB.Desktop
831 833
                 WSocketClient.getInstance().SendMessage(SocketMsgManger.GetIntoMsg());
832 834
 
833 835
 
834
-                NodeKey = "1";
836
+                NodeKey = "live/1";
835 837
                 System.Drawing.Size DesktopSize = PrimaryScreen.DESKTOP;
836 838
                 //开始直播
837 839
                 if(APP.FFmpeg.StartLiveRecordingVideo(APP.RTMPServerPath, NodeKey, DesktopSize,out ErrMessage))

+ 29
- 12
XHZB.Desktop/UserCenterWindow.xaml.cs Переглянути файл

@@ -74,7 +74,24 @@ namespace XHZB.Desktop
74 74
             btnVideo.Foreground = new SolidColorBrush(Colors.Black);
75 75
             btnImage.Foreground = new SolidColorBrush(Colors.Black);
76 76
             btnDoc.Foreground = new SolidColorBrush(Colors.Black);
77
-            initJiaocai();
77
+            new Thread(o =>
78
+            {
79
+                InvokeTsubjectbookListServering();
80
+                Dispatcher.Invoke(new Action(() =>
81
+                {
82
+                    InvokeServerTsubjectbookListCompate();
83
+                }));
84
+
85
+            }).Start();
86
+        }
87
+        /// <summary>
88
+        /// 教师教材列表服务-调用
89
+        /// </summary>
90
+        /// <returns></returns>
91
+        private object InvokeTsubjectbookListServering()
92
+        {
93
+            serverReturnCode = registerController.TsubjectbookList();
94
+            return APP.ErrorMessage;
78 95
         }
79 96
         /// <summary>
80 97
         /// 教师教材列表服务-返回结果
@@ -273,21 +290,21 @@ namespace XHZB.Desktop
273 290
                         if ("doc".Equals(APP.ResourceMyList.obj[i].suffix)
274 291
                             || "docx".Equals(APP.ResourceMyList.obj[i].suffix))
275 292
                         {
276
-                            imgSuffix = "../Images/Resource/DOC.png";
293
+                            imgSuffix = "./Images/Resource/DOC.png";
277 294
                         }
278 295
                         else if ("ppt".Equals(APP.ResourceMyList.obj[i].suffix)
279 296
                             || "pptx".Equals(APP.ResourceMyList.obj[i].suffix))
280 297
                         {
281
-                            imgSuffix = "../Images/Resource/PPT.png";
298
+                            imgSuffix = "./Images/Resource/PPT.png";
282 299
                         }
283 300
                         else if ("pdf".Equals(APP.ResourceMyList.obj[i].suffix))
284 301
                         {
285
-                            imgSuffix = "../Images/Resource/PDF.png";
302
+                            imgSuffix = "./Images/Resource/PDF.png";
286 303
                         }
287 304
                         else if ("excel".Equals(APP.ResourceMyList.obj[i].suffix)
288 305
                             || "xls".Equals(APP.ResourceMyList.obj[i].suffix) || "xlsx".Equals(APP.ResourceMyList.obj[i].suffix))
289 306
                         {
290
-                            imgSuffix = "../Images/Resource/EXCEL.png";
307
+                            imgSuffix = "./Images/Resource/EXCEL.png";
291 308
                         }
292 309
                         else if ("class".Equals(APP.ResourceMyList.obj[i].suffix))
293 310
                         {
@@ -295,12 +312,12 @@ namespace XHZB.Desktop
295 312
                         }
296 313
                         else if ("dsc".Equals(APP.ResourceMyList.obj[i].suffix))
297 314
                         {
298
-                            imgSuffix = "../Images/Resource/DSC.png";
315
+                            imgSuffix = "./Images/Resource/DSC.png";
299 316
                         }
300 317
                         else if ("mp3".Equals(APP.ResourceMyList.obj[i].suffix))
301 318
                         {
302 319
                             visDuration = "Visible";
303
-                            imgSuffix = "../Images/Resource/MP3.png";
320
+                            imgSuffix = "./Images/Resource/MP3.png";
304 321
                         }
305 322
                         else if ("mp4".Equals(APP.ResourceMyList.obj[i].suffix)
306 323
                             || "flv".Equals(APP.ResourceMyList.obj[i].suffix))
@@ -312,26 +329,26 @@ namespace XHZB.Desktop
312 329
                             }
313 330
                             else
314 331
                             {
315
-                                imgSuffix = "../Images/Resource/MP4.png";
332
+                                imgSuffix = "./Images/Resource/MP4.png";
316 333
                             }
317 334
                         }
318 335
                         else if ("png".Equals(APP.ResourceMyList.obj[i].suffix)
319 336
                             || "jpg".Equals(APP.ResourceMyList.obj[i].suffix)
320 337
                             || "jpeg".Equals(APP.ResourceMyList.obj[i].suffix))
321 338
                         {
322
-                            imgSuffix = "../Images/Resource/PNG.png";
339
+                            imgSuffix = "./Images/Resource/PNG.png";
323 340
                         }
324 341
                         else if ("txt".Equals(APP.ResourceMyList.obj[i].suffix))
325 342
                         {
326
-                            imgSuffix = "../Images/Resource/TXT.png";
343
+                            imgSuffix = "./Images/Resource/TXT.png";
327 344
                         }
328 345
                         else if ("txt".Equals(APP.ResourceMyList.obj[i].suffix))
329 346
                         {
330
-                            imgSuffix = "../Images/Resource/FLV.png";
347
+                            imgSuffix = "./Images/Resource/FLV.png";
331 348
                         }
332 349
                         else if ("wav".Equals(APP.ResourceMyList.obj[i].suffix))
333 350
                         {
334
-                            imgSuffix = "../Images/Resource/WAV.png";
351
+                            imgSuffix = "./Images/Resource/WAV.png";
335 352
                         }
336 353
                         string resourcesSuffix = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\" + APP.LoginUser.username + "\\" + APP.ResourceMyList.obj[i].resourcename + "." + APP.ResourceMyList.obj[i].suffix;
337 354
                         if (!string.IsNullOrWhiteSpace(APP.fileStorageAddress))

+ 26
- 0
XHZB.Desktop/Utils/RegisterController.cs Переглянути файл

@@ -40,6 +40,32 @@ namespace XHZB.Desktop.Utils
40 40
             }
41 41
         }
42 42
         /// <summary>
43
+        /// 开始直播
44
+        /// </summary>
45
+        /// <param name="request"></param>
46
+        /// <returns></returns>
47
+        public int UpdateState()  
48
+        {
49
+            string url = APP.apiUrl + "/course/update_state";//地址
50
+            Dictionary<string, int> dic = new Dictionary<string, int>
51
+            {
52
+                { "courseid", 1},
53
+                { "loginpwd", 2}
54
+            };
55
+            string body = JsonHelper.ToJson(dic);
56
+            ResultVo<CisectionidModel> result = HttpHelper.PostAndRespSignle<ResultVo<CisectionidModel>>(url, postData: body);
57
+            if (result != null)
58
+            {
59
+                APP.ErrorMessage = result.msg;
60
+                return result.code;
61
+            }
62
+            else
63
+            {
64
+                APP.ErrorMessage = "网络异常!";
65
+                return 1;
66
+            }
67
+        }
68
+        /// <summary>
43 69
         /// 教师任教班级
44 70
         /// </summary>
45 71
         /// <param name="request"></param>

+ 1
- 1
XHZB.Desktop/WebSocket/SocketCallback.cs Переглянути файл

@@ -4,7 +4,7 @@ namespace XHZB.Desktop.WebSocket
4 4
 {
5 5
     public interface SocketCallback
6 6
     {
7
-        void receiveWsMsg(ZWsMsgVo msg);
7
+        void receiveWsMsg(SocketModel msg);
8 8
         void userListChange();
9 9
     }
10 10
 }

+ 1
- 0
XHZB.Desktop/WebSocket/SocketClient.cs Переглянути файл

@@ -75,6 +75,7 @@ namespace XHZB.Desktop.WebSocket
75 75
                 WinDic.Add(win.GetType(), win);
76 76
             }
77 77
         }
78
+     
78 79
         /// <summary>
79 80
         /// 发送给需要接收的窗口
80 81
         /// </summary>

+ 60
- 2
XHZB.Desktop/WebSocket/WSocketClient.cs Переглянути файл

@@ -135,6 +135,7 @@ namespace XHZB.Desktop.WebSocket
135 135
                             userpic = msgBean.b.stpic
136 136
                         };
137 137
                         APP.OnlineUserList.Add(item);
138
+                        sendUserChangeToWin();
138 139
                     }
139 140
                     else if(msgBean.c == 2002)//下线
140 141
                     {
@@ -145,6 +146,7 @@ namespace XHZB.Desktop.WebSocket
145 146
                                 if (msgBean.b.stid == APP.OnlineUserList[i].userid)
146 147
                                 {
147 148
                                     APP.OnlineUserList.RemoveAt(i);
149
+                                  
148 150
                                     break;
149 151
                                 }
150 152
                             }
@@ -153,12 +155,65 @@ namespace XHZB.Desktop.WebSocket
153 155
                         {
154 156
                             LogHelper.WriteErrLog("(移除)" + ex.Message, ex);
155 157
                         }
158
+                        sendUserChangeToWin();
156 159
                     }
157
-                  
160
+                    sendMsgToWin(msgBean);
158 161
                 }
159 162
             }
160
-
163
+        }
164
+        private static void sendMsgToWin(SocketModel msg)
165
+        {
166
+            foreach (KeyValuePair<Type, object> kvp in WinDic)
167
+            {
168
+                if (kvp.Value is SocketCallback callback)
169
+                {
170
+                    callback.receiveWsMsg(msg);
171
+                }
172
+            }
173
+        }
174
+        /// <summary>
175
+        /// 添加要推送消息的窗口
176
+        /// </summary>
177
+        /// <param name="win"></param>
178
+        public void addWin(object win)
179
+        {
180
+            if (WinDic.ContainsKey(win.GetType()))
181
+            {
182
+                WinDic[win.GetType()] = win;
183
+            }
184
+            else
185
+            {
186
+                WinDic.Add(win.GetType(), win);
187
+            }
161 188
         }
189
+        /// <summary>
190
+        /// 发送给需要接收的窗口
191
+        /// </summary>
192
+        private static void sendUserChangeToWin()
193
+        {
194
+            foreach (KeyValuePair<Type, object> kvp in WinDic)
195
+            {
196
+                if (kvp.Value is SocketCallback callback)
197
+                {
198
+                    callback.userListChange();
199
+                }
200
+            }
201
+        }
202
+        /// <summary>
203
+        /// 移除窗口
204
+        /// </summary>
205
+        /// <param name="win"></param>
206
+        public void removedWin(object win)
207
+        {
208
+            if (WinDic.ContainsKey(win.GetType()))
209
+            {
210
+                WinDic.Remove(win.GetType());
211
+            }
212
+        }
213
+
214
+
215
+
216
+
162 217
         /// <summary>
163 218
         /// Socket关闭事件
164 219
         /// </summary>
@@ -184,8 +239,11 @@ namespace XHZB.Desktop.WebSocket
184 239
         /// <param name="e"></param>
185 240
         void WebSocket_Opened(object sender, EventArgs e)
186 241
         {
242
+            SendMessage(SocketMsgManger.AddMsg());
187 243
             _Logger.Info(" websocket_Opened");
188 244
 
245
+
246
+
189 247
             SendMessage(SocketMsgManger.offlineMsg());
190 248
 
191 249
         }

+ 17
- 1
XHZB.Desktop/XHZB.Desktop.csproj Переглянути файл

@@ -340,6 +340,22 @@
340 340
   <ItemGroup>
341 341
     <Resource Include="Images\RollCall\rollCall_2_1.png" />
342 342
   </ItemGroup>
343
-  <ItemGroup />
343
+  <ItemGroup>
344
+    <Resource Include="Images\Resource\CLASS.png" />
345
+    <Resource Include="Images\Resource\DOC.png" />
346
+    <Resource Include="Images\Resource\DSC.png" />
347
+    <Resource Include="Images\Resource\EXCEL.png" />
348
+    <Resource Include="Images\Resource\FLV.png" />
349
+    <Resource Include="Images\Resource\MP3.png" />
350
+    <Resource Include="Images\Resource\MP4.png" />
351
+    <Resource Include="Images\Resource\PDF.png" />
352
+    <Resource Include="Images\Resource\PNG.png" />
353
+    <Resource Include="Images\Resource\PPT.png" />
354
+    <Resource Include="Images\Resource\resource_0.png" />
355
+    <Resource Include="Images\Resource\resource_1.png" />
356
+    <Resource Include="Images\Resource\resource_2.png" />
357
+    <Resource Include="Images\Resource\TXT.png" />
358
+    <Resource Include="Images\Resource\WAV.png" />
359
+  </ItemGroup>
344 360
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
345 361
 </Project>

+ 13
- 0
XHZB.Model/CisectionidModel.cs Переглянути файл

@@ -0,0 +1,13 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace XHZB.Model
8
+{
9
+    public class CisectionidModel
10
+    {
11
+        public int cisectionid { get; set; }
12
+    }
13
+}

+ 1
- 0
XHZB.Model/XHZB.Model.csproj Переглянути файл

@@ -43,6 +43,7 @@
43 43
   <ItemGroup>
44 44
     <Compile Include="AddSocketMsgModel.cs" />
45 45
     <Compile Include="BodyModel.cs" />
46
+    <Compile Include="CisectionidModel.cs" />
46 47
     <Compile Include="Class1.cs" />
47 48
     <Compile Include="ClassListModel.cs" />
48 49
     <Compile Include="ClassStudentListModel.cs" />

Завантаження…
Відмінити
Зберегти