Procházet zdrojové kódy

Merge remote-tracking branch 'origin/ZhangXueYang'

ZhangXueYang
耀 před 4 roky
rodič
revize
e20512da41

+ 42
- 23
XHZB.Desktop/LoginWindow.xaml.cs Zobrazit soubor

@@ -503,32 +503,51 @@ namespace XHZB.Desktop
503 503
             APP.myloading.Hide();
504 504
             if (serverReturnCode == APP.ServerScuessCode)
505 505
             {
506
-                grLogin.Visibility = Visibility.Collapsed;
507
-                grLoginTwo.Visibility = Visibility.Visible;
508
-                imgBrush.ImageSource = new BitmapImage(new Uri("pack://application:,,,/Images/Login/login2_1.png"));
509
-                txbHeader.Text = APP.LoginUser.username + "老师,您好!";
510
-                version_tb.Visibility = Visibility.Collapsed;
511
-                btnSetUp.Visibility = Visibility.Collapsed;
512
-                UpdateSettingString("userName", txbAccountNumber.Text);
513
-
514
-                new Thread(o =>
506
+                string imagepath = APP.classRoomImagePath();
507
+                if (!Directory.Exists(imagepath))
515 508
                 {
516
-                    InvokeClassListServering();
517
-                    Dispatcher.Invoke(new Action(() =>
518
-                    {
519
-                        InvokeServerClassListCompate();
520
-                    }));
509
+                    Directory.CreateDirectory(imagepath);
510
+                }
511
+                ToolbarWindow win = new ToolbarWindow();
521 512
 
522
-                }).Start();
523
-                new Thread(o =>
524
-                {
525
-                    InvokeTsubjectbookListServering();
526
-                    Dispatcher.Invoke(new Action(() =>
527
-                    {
528
-                        InvokeServerTsubjectbookListCompate();
529
-                    }));
513
+                Close();
514
+                win.ShowDialog();
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+                //grLogin.Visibility = Visibility.Collapsed;
526
+                //grLoginTwo.Visibility = Visibility.Visible;
527
+                //imgBrush.ImageSource = new BitmapImage(new Uri("pack://application:,,,/Images/Login/login2_1.png"));
528
+                //txbHeader.Text = APP.LoginUser.username + "老师,您好!";
529
+                //version_tb.Visibility = Visibility.Collapsed;
530
+                //btnSetUp.Visibility = Visibility.Collapsed;
531
+                //UpdateSettingString("userName", txbAccountNumber.Text);
532
+
533
+                //new Thread(o =>
534
+                //{
535
+                //    InvokeClassListServering();
536
+                //    Dispatcher.Invoke(new Action(() =>
537
+                //    {
538
+                //        InvokeServerClassListCompate();
539
+                //    }));
540
+
541
+                //}).Start();
542
+                //new Thread(o =>
543
+                //{
544
+                //    InvokeTsubjectbookListServering();
545
+                //    Dispatcher.Invoke(new Action(() =>
546
+                //    {
547
+                //        InvokeServerTsubjectbookListCompate();
548
+                //    }));
530 549
 
531
-                }).Start();
550
+                //}).Start();
532 551
             }
533 552
             else
534 553
             {

+ 19
- 3
XHZB.Desktop/RollCallWindow.xaml.cs Zobrazit soubor

@@ -11,6 +11,7 @@ using System.Windows;
11 11
 using System.Windows.Input;
12 12
 using System.Windows.Threading;
13 13
 using XHZB.Desktop.Utils;
14
+using XHZB.Desktop.WebSocket;
14 15
 using XHZB.Model;
15 16
 
16 17
 namespace XHZB.Desktop
@@ -363,6 +364,12 @@ namespace XHZB.Desktop
363 364
         /// <param name="e"></param>
364 365
         private void btnRandomRollCall_Click(object sender, RoutedEventArgs e)
365 366
         {
367
+          
368
+
369
+
370
+
371
+
372
+
366 373
             if (!IsRandomRollCallButton)
367 374
             {
368 375
                 IsRandomRollCallButton = true;
@@ -571,6 +578,7 @@ namespace XHZB.Desktop
571 578
             if ("重新点名".Equals(text))
572 579
             {
573 580
                 returnNum = 0;
581
+                WSocketClient.getInstance().SendMessage(SocketMsgManger.RandomRollCallEndMsg());
574 582
                 //ZSocketServer.getInstance().SendMessage(ZSocketMsgManger.qiangdaEnd());
575 583
                 initPageData();
576 584
                 IsRandomRollCallButton = true;
@@ -588,7 +596,7 @@ namespace XHZB.Desktop
588 596
                 useridsss = string.Empty;
589 597
                 isRollCall = false;
590 598
                 isRushToAnswer = false;
591
-                //ZSocketServer.getInstance().SendMessage(ZSocketMsgManger.qiangdaEnd());
599
+                WSocketClient.getInstance().SendMessage(SocketMsgManger.RandomRollCallEndMsg());
592 600
                 IsRandomRollCallButton = false;
593 601
                 //ToolbarWindow.IsOpenRollCallWindow = false;
594 602
                 Hide();
@@ -607,6 +615,11 @@ namespace XHZB.Desktop
607 615
         /// <param name="e"></param>
608 616
         private void btnDown_Click(object sender, RoutedEventArgs e)
609 617
         {
618
+            WSocketClient.getInstance().SendMessage(SocketMsgManger.RushToAnswerEndMsg());
619
+
620
+
621
+
622
+
610 623
             //ToolbarWindow.IsNotOperation = false;
611 624
             APP.myloading.Show();
612 625
             new Thread(o =>
@@ -646,6 +659,10 @@ namespace XHZB.Desktop
646 659
         /// <param name="e"></param>
647 660
         private void btnAnswer_Click(object sender, RoutedEventArgs e)
648 661
         {
662
+            WSocketClient.getInstance().SendMessage(SocketMsgManger.RushToAnswerMsg());
663
+
664
+
665
+
649 666
             if (!IsRandomRollCallButton)
650 667
             {
651 668
                 returnNum = 0;
@@ -781,8 +798,7 @@ namespace XHZB.Desktop
781 798
             //    json = ZJsonHelper.ToJson(askstudent),
782 799
             //    askid = askteacher.asktid
783 800
             //});
784
-            //string msg = ZSocketMsgManger.dianmingBegin(ZCommonData.askid, user.userid);
785
-            //ZSocketServer.getInstance().SendMessage(msg);
801
+            WSocketClient.getInstance().SendMessage(SocketMsgManger.RandomRollCallMsg(user.userid));
786 802
             //ZSqliteManger.insertClassAction(new ClassAction()
787 803
             //{
788 804
             //    unix = DataProvider.TimestampTotalSeconds(),

+ 12
- 12
XHZB.Desktop/ToolbarWindow.xaml.cs Zobrazit soubor

@@ -18,6 +18,7 @@ using XHZB.Desktop.Utils;
18 18
 using Common.system;
19 19
 using System.Windows.Media.Animation;
20 20
 using System.Threading;
21
+using XHZB.Desktop.WebSocket;
21 22
 
22 23
 namespace XHZB.Desktop
23 24
 {
@@ -168,14 +169,13 @@ namespace XHZB.Desktop
168 169
                         MessageWindow.Show(ErrMessage);
169 170
                     }
170 171
                 }
171
-                else
172
-                {
173
-                    //tongpingEnd();
174
-                    EndLive();
175
-                    pageData.menuList[1].Pic = "../Images/ToolBar/直播@2x.png";
176
-                    pageData.menuList[1].Name = "直播";
177
-                    APP.W_CameraWindow.Hide();
178
-                }
172
+                //else
173
+                //{
174
+                //    EndLive();
175
+                //    pageData.menuList[1].Pic = "../Images/ToolBar/直播@2x.png";
176
+                //    pageData.menuList[1].Name = "直播";
177
+                //    APP.W_CameraWindow.Hide();
178
+                //}
179 179
             }
180 180
             else if (clickindex == 2)//抢答点名
181 181
             {
@@ -612,7 +612,7 @@ namespace XHZB.Desktop
612 612
                 //        MyApp.ZipFile();
613 613
                 //    }
614 614
 
615
-
615
+                WSocketClient.getInstance().SendMessage(SocketMsgManger.NolineMsg());
616 616
                 Dispatcher.Invoke(new Action(() =>
617 617
                 {
618 618
                     System.Environment.Exit(0);
@@ -813,7 +813,7 @@ namespace XHZB.Desktop
813 813
         /// </summary>
814 814
         private void startSocket()
815 815
         {
816
-            //ZSocketServer.getInstance().startWsServer();
816
+            WSocketClient.getInstance().StartWsClient();
817 817
         }
818 818
         #endregion
819 819
         #region 直播
@@ -828,10 +828,10 @@ namespace XHZB.Desktop
828 828
         {
829 829
             try
830 830
             {
831
+                WSocketClient.getInstance().SendMessage(SocketMsgManger.GetIntoMsg());
831 832
 
832 833
 
833
-
834
-                //NodeKey=Node+Key;
834
+                NodeKey = "1";
835 835
                 System.Drawing.Size DesktopSize = PrimaryScreen.DESKTOP;
836 836
                 //开始直播
837 837
                 if(APP.FFmpeg.StartLiveRecordingVideo(APP.RTMPServerPath, NodeKey, DesktopSize,out ErrMessage))

+ 17
- 3
XHZB.Desktop/UserCenterWindow.xaml.cs Zobrazit soubor

@@ -62,8 +62,8 @@ namespace XHZB.Desktop
62 62
             //ZJConfigUtil.init();
63 63
             isInitial = true;
64 64
             Resourceclass = 0;
65
-            Lsbid = APP.REQStartClass.lsbid;
66
-            Directorid = APP.REQStartClass.directorid;
65
+            Lsbid = 0;
66
+            Directorid = 0;
67 67
             borAll.Background = new SolidColorBrush(Colors.DodgerBlue);
68 68
             borAudio.Background = new SolidColorBrush(Colors.Transparent);
69 69
             borVideo.Background = new SolidColorBrush(Colors.Transparent);
@@ -76,7 +76,21 @@ namespace XHZB.Desktop
76 76
             btnDoc.Foreground = new SolidColorBrush(Colors.Black);
77 77
             initJiaocai();
78 78
         }
79
-
79
+        /// <summary>
80
+        /// 教师教材列表服务-返回结果
81
+        /// </summary>
82
+        /// <returns></returns>
83
+        public void InvokeServerTsubjectbookListCompate()
84
+        {
85
+            if (serverReturnCode == APP.ServerScuessCode)
86
+            {
87
+                initJiaocai();
88
+            }
89
+            else
90
+            {
91
+                MessageWindow.Show(APP.ErrorMessage);
92
+            }
93
+        }
80 94
         private void initJiaocai()
81 95
         {
82 96
             System.Collections.Generic.List<TsubjectbookListModel> list = APP.TsubjectbookList;

+ 23
- 23
XHZB.Desktop/WebSocket/SocketClient.cs Zobrazit soubor

@@ -21,30 +21,30 @@ namespace XHZB.Desktop.WebSocket
21 21
             return instance;
22 22
         }
23 23
 
24
-        static void Starts() 
24
+        public static void StartWsClient()  
25 25
         {
26
-            //新建客户端类 
27
-            //服务端IP地址 ws://192.168.1.13 如果服务端开启了ssl或者tsl 这里前缀应该改成 wss:/
28
-            //服务端监听端口 1234
29
-            //自定义的地址参数 可以根据地址参数来区分客户端 /lcj控制台
30
-            //WSocketClient client = new WSocketClient("wss://a.lcj888.ml:54645/lcj控制台");
31
-            WSocketClient client = new WSocketClient("ws://schoolwstest.xhkjedu.com/ws");
32
-            //注册消息接收事件,接收服务端发送的数据
33
-            client.MessageReceived += (data) => {
34
-                Console.WriteLine(data);
35
-            };
36
-            //开始链接
37
-            client.Start();
38
-
39
-            Console.WriteLine("输入“c”,退出");
40
-            var input = "";
41
-            do
42
-            {
43
-                input = Console.ReadLine();
44
-                //客户端发送消息到服务端
45
-                client.SendMessage(input);
46
-            } while (input != "c");
47
-            client.Dispose();
26
+            ////新建客户端类 
27
+            ////服务端IP地址 ws://192.168.1.13 如果服务端开启了ssl或者tsl 这里前缀应该改成 wss:/
28
+            ////服务端监听端口 1234
29
+            ////自定义的地址参数 可以根据地址参数来区分客户端 /lcj控制台
30
+            ////WSocketClient client = new WSocketClient("wss://a.lcj888.ml:54645/lcj控制台");
31
+            //WSocketClient client = new WSocketClient("ws://schoolwstest.xhkjedu.com/ws");
32
+            ////注册消息接收事件,接收服务端发送的数据
33
+            //client.MessageReceived += (data) => {
34
+            //    Console.WriteLine(data);
35
+            //};
36
+            ////开始链接
37
+            //client.Start();
38
+
39
+            //Console.WriteLine("输入“c”,退出");
40
+            //var input = "";
41
+            //do
42
+            //{
43
+            //    input = Console.ReadLine();
44
+            //    //客户端发送消息到服务端
45
+            //    client.SendMessage(input);
46
+            //} while (input != "c");
47
+            //client.Dispose();
48 48
         }
49 49
 
50 50
 

+ 152
- 6
XHZB.Desktop/WebSocket/SocketMsgManger.cs Zobrazit soubor

@@ -1,16 +1,16 @@
1 1
 using Newtonsoft.Json;
2
-using System;
3 2
 using System.Collections.Generic;
4
-using System.Linq;
5
-using System.Text;
6
-using System.Threading.Tasks;
7 3
 using XHZB.Model;
8 4
 
9 5
 namespace XHZB.Desktop.WebSocket
10 6
 {
11 7
     internal class SocketMsgManger
12 8
     {
13
-        public static string offlineMsg(int userid)
9
+        /// <summary>
10
+        /// 创建直播
11
+        /// </summary>
12
+        /// <returns></returns>
13
+        public static string offlineMsg()
14 14
         {
15 15
             SocketModel msg = new SocketModel
16 16
             {
@@ -18,14 +18,160 @@ namespace XHZB.Desktop.WebSocket
18 18
                 rid = 1,
19 19
                 d = "pc",
20 20
                 u = 1,
21
+                s=1,
21 22
                 b = new BodyModel
22 23
                 {
23
-                    
24
+                    stname = APP.LoginUser.username,
25
+                    stid = APP.LoginUser.userid,
26
+                    stpic=APP.LoginUser.headpic
24 27
                 },
28
+
29
+
25 30
                 f = APP.LoginUser.userid,
26 31
                 t = new List<int>()
27 32
             };
28 33
             return JsonConvert.SerializeObject(msg);
29 34
         }
35
+        /// <summary>
36
+        /// 进入直播
37
+        /// </summary>
38
+        /// <returns></returns>
39
+        public static string GetIntoMsg() 
40
+        {
41
+            SocketModel msg = new SocketModel
42
+            {
43
+                c = 2001,
44
+                rid = 1,
45
+                d = "pc",
46
+                u = 1,
47
+                s = 1,
48
+                b = new BodyModel
49
+                {
50
+                    stname = APP.LoginUser.username,
51
+                    stid = APP.LoginUser.userid,
52
+                    stpic = APP.LoginUser.headpic
53
+                },
54
+
55
+
56
+                f = APP.LoginUser.userid,
57
+                t = new List<int>()
58
+            };
59
+            return JsonConvert.SerializeObject(msg);
60
+        }
61
+        /// <summary>
62
+        /// 关闭直播
63
+        /// </summary>
64
+        /// <returns></returns>
65
+        public static string NolineMsg() 
66
+        {
67
+            SocketModel msg = new SocketModel
68
+            {
69
+                c = 1002,
70
+                rid = 1,
71
+                d = "pc",
72
+                u = 1,
73
+                s = 1,
74
+                b = new BodyModel(),
75
+                f = APP.LoginUser.userid,
76
+                t = new List<int>()
77
+            };
78
+            return JsonConvert.SerializeObject(msg);
79
+        }
80
+        /// <summary>
81
+        /// 抢答
82
+        /// </summary>
83
+        /// <returns></returns>
84
+        public static string RushToAnswerMsg()
85
+        {
86
+            SocketModel msg = new SocketModel
87
+            {
88
+                c = 1021,
89
+                rid = 1,
90
+                d = "pc",
91
+                u = 1,
92
+                s = 1,
93
+                b = new BodyModel(),
94
+                f = APP.LoginUser.userid,
95
+                t = new List<int>()
96
+            };
97
+            return JsonConvert.SerializeObject(msg);
98
+        }
99
+        /// <summary>
100
+        /// 结束抢答
101
+        /// </summary>
102
+        /// <returns></returns>
103
+        public static string RushToAnswerEndMsg() 
104
+        {
105
+            SocketModel msg = new SocketModel
106
+            {
107
+                c = 1022,
108
+                rid = 1,
109
+                d = "pc",
110
+                u = 1,
111
+                s = 1,
112
+                b = new BodyModel(),
113
+                f = APP.LoginUser.userid,
114
+                t = new List<int>()
115
+            };
116
+            return JsonConvert.SerializeObject(msg);
117
+        }
118
+        /// <summary>
119
+        /// 随机点名
120
+        /// </summary>
121
+        /// <returns></returns>
122
+        public static string RandomRollCallMsg(int userid)
123
+        {
124
+            SocketModel msg = new SocketModel
125
+            {
126
+                c = 1031,
127
+                rid = 1,
128
+                d = "pc",
129
+                u = 1,
130
+                s = 1,
131
+                b = new BodyModel(),
132
+                f = APP.LoginUser.userid,
133
+                t = new List<int>(),
134
+            };
135
+            msg.t.Add(userid);
136
+            return JsonConvert.SerializeObject(msg);
137
+        }
138
+        /// <summary>
139
+        /// 随机点名结束
140
+        /// </summary>
141
+        /// <returns></returns>
142
+        public static string RandomRollCallEndMsg()
143
+        {
144
+            SocketModel msg = new SocketModel
145
+            {
146
+                c = 1032,
147
+                rid = 1,
148
+                d = "pc",
149
+                u = 1,
150
+                s = 1,
151
+                b = new BodyModel(),
152
+                f = APP.LoginUser.userid,
153
+                t = new List<int>(),
154
+            };
155
+            return JsonConvert.SerializeObject(msg);
156
+        }
157
+        /// <summary>
158
+        /// 获取消息
159
+        /// </summary>
160
+        /// <returns></returns>
161
+        public static string AddMsg()
162
+        {
163
+            SocketModel msg = new SocketModel
164
+            {
165
+                c = 1040,
166
+                rid = 1,
167
+                d = "pc",
168
+                u = 1,
169
+                s = 1,
170
+                b = new BodyModel(),
171
+                f = APP.LoginUser.userid,
172
+                t = new List<int>(),
173
+            };
174
+            return JsonConvert.SerializeObject(msg);
175
+        }
30 176
     }
31 177
 }

+ 94
- 6
XHZB.Desktop/WebSocket/WSocketClient.cs Zobrazit soubor

@@ -1,13 +1,33 @@
1
-using SuperSocket.ClientEngine;
1
+using Common.system;
2
+using SuperSocket.ClientEngine;
2 3
 using System;
4
+using System.Collections.Generic;
3 5
 using System.Threading;
4 6
 using System.Threading.Tasks;
5 7
 using WebSocket4Net;
8
+using XHZB.Model;
6 9
 
7 10
 namespace XHZB.Desktop.WebSocket
8 11
 {
9 12
     public class WSocketClient : IDisposable
10 13
     {
14
+        // 打开的窗口列表
15
+        private static readonly Dictionary<Type, object> WinDic = new Dictionary<Type, object>();
16
+        private static WSocketClient instance;
17
+        public static WSocketClient getInstance()
18
+        {
19
+            if (instance == null)
20
+            {
21
+                instance = new WSocketClient();
22
+            }
23
+            return instance;
24
+        }
25
+
26
+
27
+
28
+
29
+
30
+
11 31
         public static NLog.Logger _Logger = NLog.LogManager.GetCurrentClassLogger();
12 32
 
13 33
         #region 向外传递数据事件
@@ -25,16 +45,45 @@ namespace XHZB.Desktop.WebSocket
25 45
         /// </summary>
26 46
         public string ServerPath { get; set; }
27 47
 
28
-        public WSocketClient(string url)
48
+        //public WSocketClient()
49
+        //{
50
+        //    string url = "ws://schoolwstest.xhkjedu.com/ws";
51
+        //    ServerPath = url;
52
+        //    this._webSocket = new WebSocket4Net.WebSocket(url);
53
+        //    this._webSocket.Opened += WebSocket_Opened;
54
+        //    this._webSocket.Error += WebSocket_Error;
55
+        //    this._webSocket.Closed += WebSocket_Closed;
56
+        //    this._webSocket.MessageReceived += WebSocket_MessageReceived;
57
+
58
+        //    //注册消息接收事件,接收服务端发送的数据
59
+        //    MessageReceived += (data) => {
60
+        //        Console.WriteLine(data);
61
+        //    };
62
+        //    //开始链接
63
+        //    Start();
64
+        //    SendMessage(SocketMsgManger.offlineMsg());
65
+        //}
66
+
67
+
68
+        public void StartWsClient()
29 69
         {
70
+            string url = "ws://schoolwstest.xhkjedu.com/ws";
30 71
             ServerPath = url;
31 72
             this._webSocket = new WebSocket4Net.WebSocket(url);
32 73
             this._webSocket.Opened += WebSocket_Opened;
33 74
             this._webSocket.Error += WebSocket_Error;
34 75
             this._webSocket.Closed += WebSocket_Closed;
35 76
             this._webSocket.MessageReceived += WebSocket_MessageReceived;
36
-        }
37 77
 
78
+            //注册消息接收事件,接收服务端发送的数据
79
+            MessageReceived += (data) =>
80
+            {
81
+                Console.WriteLine(data);
82
+            };
83
+            //开始链接
84
+            Start();
85
+            SendMessage(SocketMsgManger.offlineMsg());
86
+        }
38 87
         #region "web socket "
39 88
         /// <summary>
40 89
         /// 连接方法
@@ -67,12 +116,47 @@ namespace XHZB.Desktop.WebSocket
67 116
             _Logger.Info(" Received:" + e.Message);
68 117
             MessageReceived?.Invoke(e.Message);
69 118
 
119
+            Console.WriteLine("WS:消息收到:" + e.Message);
70 120
 
71 121
 
122
+            SocketModel msgBean = JsonHelper.JsonToObj<SocketModel>(e.Message);
72 123
 
73
-
74
-
75
-
124
+            if (msgBean != null && msgBean.b != null)
125
+            {
126
+                if (msgBean.c != 0&& msgBean.u == 2)
127
+                {
128
+                    if (msgBean.c == 2001)//上线
129
+                    {
130
+                        OnlineUserModel item = new OnlineUserModel
131
+                        {
132
+                            usertype = msgBean.c,
133
+                            userid = msgBean.b.stid,
134
+                            username = msgBean.b.stname,
135
+                            userpic = msgBean.b.stpic
136
+                        };
137
+                        APP.OnlineUserList.Add(item);
138
+                    }
139
+                    else if(msgBean.c == 2002)//下线
140
+                    {
141
+                        try
142
+                        {
143
+                            for (int i = 0; i < APP.OnlineUserList.Count; i++)
144
+                            {
145
+                                if (msgBean.b.stid == APP.OnlineUserList[i].userid)
146
+                                {
147
+                                    APP.OnlineUserList.RemoveAt(i);
148
+                                    break;
149
+                                }
150
+                            }
151
+                        }
152
+                        catch (Exception ex)
153
+                        {
154
+                            LogHelper.WriteErrLog("(移除)" + ex.Message, ex);
155
+                        }
156
+                    }
157
+                  
158
+                }
159
+            }
76 160
 
77 161
         }
78 162
         /// <summary>
@@ -101,6 +185,9 @@ namespace XHZB.Desktop.WebSocket
101 185
         void WebSocket_Opened(object sender, EventArgs e)
102 186
         {
103 187
             _Logger.Info(" websocket_Opened");
188
+
189
+            SendMessage(SocketMsgManger.offlineMsg());
190
+
104 191
         }
105 192
         /// <summary>
106 193
         /// 检查重连线程
@@ -139,6 +226,7 @@ namespace XHZB.Desktop.WebSocket
139 226
                 if (_webSocket != null && _webSocket.State == WebSocket4Net.WebSocketState.Open)
140 227
                 {
141 228
                     this._webSocket.Send(Message);
229
+                    Console.WriteLine("WS:发送消息:" + Message);
142 230
                 }
143 231
             });
144 232
         }

+ 16
- 0
XHZB.Model/AddSocketMsgModel.cs Zobrazit soubor

@@ -0,0 +1,16 @@
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 AddSocketMsgModel
10
+    {
11
+        /// <summary>
12
+        /// 获取学生在线消息
13
+        /// </summary>
14
+        public List<SocketModel> addSocketMsg { get; set; } 
15
+    }
16
+}

+ 4
- 4
XHZB.Model/BodyModel.cs Zobrazit soubor

@@ -8,10 +8,10 @@ namespace XHZB.Model
8 8
 {
9 9
     public class BodyModel
10 10
     {
11
-        public string rtmp { get; set; }
12
-        public string cn { get; set; }
13
-        public string mac { get; set; }
14
-        public int stnum { get; set; }
11
+        //public string rtmp { get; set; }
12
+        //public string cn { get; set; }
13
+        //public string mac { get; set; }
14
+        //public int stnum { get; set; }
15 15
         public string stname { get; set; }
16 16
         public int stid { get; set; }
17 17
         public string stpic { get; set; }

+ 1
- 1
XHZB.Model/SocketModel.cs Zobrazit soubor

@@ -35,7 +35,7 @@ namespace XHZB.Model
35 35
         /// <summary>
36 36
         /// 错误信息
37 37
         /// </summary>
38
-        public int m { get; set; }
38
+        public string m { get; set; }
39 39
         /// <summary>
40 40
         /// 是否群发 0不发 1发
41 41
         /// </summary>

+ 1
- 0
XHZB.Model/XHZB.Model.csproj Zobrazit soubor

@@ -41,6 +41,7 @@
41 41
     <Reference Include="System.Xml" />
42 42
   </ItemGroup>
43 43
   <ItemGroup>
44
+    <Compile Include="AddSocketMsgModel.cs" />
44 45
     <Compile Include="BodyModel.cs" />
45 46
     <Compile Include="Class1.cs" />
46 47
     <Compile Include="ClassListModel.cs" />

Načítá se…
Zrušit
Uložit