| @@ -1,4 +1,9 @@ | |||||
| using System.IO; | |||||
| /* Describtion : Class for Binary Serialize and Deserialize | |||||
| * Company : Wuxi Xinje | |||||
| * Author : Somuns | |||||
| * DateTime : 2021/1/18 | |||||
| */ | |||||
| using System.IO; | |||||
| using System.Runtime.Serialization.Formatters.Binary; | using System.Runtime.Serialization.Formatters.Binary; | ||||
| namespace StuMgmLib.MyNameSpace | namespace StuMgmLib.MyNameSpace | ||||
| @@ -1,4 +1,9 @@ | |||||
| using System; | |||||
| /* Describtion : Class for Data Send From Client / Server | |||||
| * Company : Wuxi Xinje | |||||
| * Author : Somuns | |||||
| * DateTime : 2021/1/18 | |||||
| */ | |||||
| using System; | |||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||
| using System.Data; | using System.Data; | ||||
| @@ -9,16 +14,16 @@ namespace StuMgmLib.MyNameSpace | |||||
| [Serializable] | [Serializable] | ||||
| public class ClientSend | public class ClientSend | ||||
| { | { | ||||
| public short account { get; set; } | |||||
| public string password { get; set; } | |||||
| public string[] sqlStr { get; set; } | |||||
| public short Account { get; set; } | |||||
| public string Password { get; set; } | |||||
| public string[] SqlStr { get; set; } | |||||
| } | } | ||||
| [Serializable] | [Serializable] | ||||
| public class ServerSend | public class ServerSend | ||||
| { | { | ||||
| public short permission { get; set; } | |||||
| public DataSet ds { get; set; } | |||||
| public bool sqlSucceed { get; set; } | |||||
| public short Permission { get; set; } | |||||
| public DataSet Ds { get; set; } | |||||
| public bool SqlSucceed { get; set; } | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,4 +1,9 @@ | |||||
| using MySql.Data.MySqlClient; | |||||
| /* Describtion : Class for Data Analyze | |||||
| * Company : Wuxi Xinje | |||||
| * Author : Somuns | |||||
| * DateTime : 2021/1/18 | |||||
| */ | |||||
| using MySql.Data.MySqlClient; | |||||
| using System.Data; | using System.Data; | ||||
| using System.Windows.Forms; | using System.Windows.Forms; | ||||
| @@ -12,8 +17,8 @@ namespace StuMgmLib.MyNameSpace | |||||
| private enum verifyCode : short | private enum verifyCode : short | ||||
| { | { | ||||
| error = -1, | |||||
| notFound = -2, | |||||
| notFound = -1, | |||||
| error = -2, | |||||
| admin = 1, | admin = 1, | ||||
| teacher = 2, | teacher = 2, | ||||
| student = 3, | student = 3, | ||||
| @@ -38,16 +43,16 @@ namespace StuMgmLib.MyNameSpace | |||||
| public static Info.ServerSend ClientSendAnalyze(Info.ClientSend cs) | public static Info.ServerSend ClientSendAnalyze(Info.ClientSend cs) | ||||
| { | { | ||||
| Info.ServerSend ss = new Info.ServerSend(); | Info.ServerSend ss = new Info.ServerSend(); | ||||
| ss.permission = loginVerify(cs.account, cs.password); // 验证身份 | |||||
| if (ss.permission < 0) // 小于0,则权限有误 | |||||
| ss.Permission = loginVerify(cs.Account, cs.Password); // 验证身份 | |||||
| if (ss.Permission < 0) // 小于0,则权限有误 | |||||
| { | { | ||||
| ss.ds = null; | |||||
| ss.Ds = null; | |||||
| return ss; | return ss; | ||||
| } | } | ||||
| string[] tbName; | string[] tbName; | ||||
| bool stuFlag = false; | bool stuFlag = false; | ||||
| switch (ss.permission) | |||||
| switch (ss.Permission) | |||||
| { | { | ||||
| case (short)verifyCode.admin: | case (short)verifyCode.admin: | ||||
| tbName = new string[] { "user_info", "course_info", "user" }; | tbName = new string[] { "user_info", "course_info", "user" }; | ||||
| @@ -63,14 +68,14 @@ namespace StuMgmLib.MyNameSpace | |||||
| break; | break; | ||||
| } | } | ||||
| ss.sqlSucceed = false; | |||||
| if (cs.sqlStr != null) // sql语句为空,则表示仅登录验证;若不为空,则取数据库操作返回值,并返回SS; | |||||
| ss.SqlSucceed = false; | |||||
| if (cs.SqlStr != null) // sql语句为空,则表示仅登录验证;若不为空,则取数据库操作返回值,并返回SS; | |||||
| { | { | ||||
| ss.sqlSucceed = mySqlModify(tbName, cs.sqlStr); | |||||
| ss.SqlSucceed = mySqlModify(tbName, cs.SqlStr); | |||||
| return ss; | return ss; | ||||
| } | } | ||||
| ss.ds = getDataSet(tbName, stuFlag, cs.account); | |||||
| ss.Ds = getDataSet(tbName, stuFlag, cs.Account); | |||||
| return ss; | return ss; | ||||
| } | } | ||||
| @@ -149,7 +154,7 @@ namespace StuMgmLib.MyNameSpace | |||||
| string newStr = str + " " + tbName[index]; | string newStr = str + " " + tbName[index]; | ||||
| if ((stuFlag == true) && (tbName[index] == "user_info")) | if ((stuFlag == true) && (tbName[index] == "user_info")) | ||||
| { | { | ||||
| newStr += "where job_id = " + account.ToString(); | |||||
| newStr += " where job_id = " + account.ToString(); // 学员权限时,返回该学员数据项 | |||||
| } | } | ||||
| MySqlCommand mCmd = new MySqlCommand(newStr, con); | MySqlCommand mCmd = new MySqlCommand(newStr, con); | ||||
| MySqlDataReader mReader = mCmd.ExecuteReader(); | MySqlDataReader mReader = mCmd.ExecuteReader(); | ||||
| @@ -37,7 +37,8 @@ namespace StuMgmLib.MyNameSpace | |||||
| cb.Items.Add(ipAddr.ToString()); | cb.Items.Add(ipAddr.ToString()); | ||||
| } | } | ||||
| } | } | ||||
| cb.Items.Add("127.0.0.1"); | |||||
| if (cb.FindString("127.0.0.1") == -1) | |||||
| cb.Items.Add("127.0.0.1"); | |||||
| } | } | ||||
| #region 开启服务器 | #region 开启服务器 | ||||
| @@ -71,7 +72,7 @@ namespace StuMgmLib.MyNameSpace | |||||
| try | try | ||||
| { | { | ||||
| socketClient = socket.Accept(); // 阻塞等待客户端连接 | socketClient = socket.Accept(); // 阻塞等待客户端连接 | ||||
| return socketClient.RemoteEndPoint.ToString() + " 已连接 \n"; | |||||
| return DateTime.Now.ToLongTimeString() + " : " + socketClient.RemoteEndPoint.ToString() + " 已连接 \n"; | |||||
| } | } | ||||
| catch (Exception) | catch (Exception) | ||||
| { | { | ||||
| @@ -101,12 +102,12 @@ namespace StuMgmLib.MyNameSpace | |||||
| byte[] dataSend = BinaryED.Serialize<Info.ServerSend>(ss); | byte[] dataSend = BinaryED.Serialize<Info.ServerSend>(ss); | ||||
| socketClient.Send(dataSend); | socketClient.Send(dataSend); | ||||
| return reEdPoint + " 断开连接 \n"; | |||||
| return DateTime.Now.ToLongTimeString() + " : " + reEdPoint + " 断开连接 \n"; | |||||
| } | } | ||||
| catch // 客户端断开连接 | catch // 客户端断开连接 | ||||
| { | { | ||||
| if (socketClient != null) | if (socketClient != null) | ||||
| return reEdPoint + " 断开连接 \n"; | |||||
| return DateTime.Now.ToLongTimeString() + " : " + reEdPoint + " 断开连接 \n"; | |||||
| else | else | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -1,124 +0,0 @@ | |||||
| namespace StuMgmLib | |||||
| { | |||||
| partial class Exit | |||||
| { | |||||
| /// <summary> | |||||
| /// Required designer variable. | |||||
| /// </summary> | |||||
| private System.ComponentModel.IContainer components = null; | |||||
| /// <summary> | |||||
| /// Clean up any resources being used. | |||||
| /// </summary> | |||||
| /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> | |||||
| protected override void Dispose(bool disposing) | |||||
| { | |||||
| if (disposing && (components != null)) | |||||
| { | |||||
| components.Dispose(); | |||||
| } | |||||
| base.Dispose(disposing); | |||||
| } | |||||
| #region Windows Form Designer generated code | |||||
| /// <summary> | |||||
| /// Required method for Designer support - do not modify | |||||
| /// the contents of this method with the code editor. | |||||
| /// </summary> | |||||
| private void InitializeComponent() | |||||
| { | |||||
| this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); | |||||
| this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); | |||||
| this.label1 = new System.Windows.Forms.Label(); | |||||
| this.button1 = new System.Windows.Forms.Button(); | |||||
| this.button2 = new System.Windows.Forms.Button(); | |||||
| this.tableLayoutPanel2.SuspendLayout(); | |||||
| this.tableLayoutPanel3.SuspendLayout(); | |||||
| this.SuspendLayout(); | |||||
| // | |||||
| // tableLayoutPanel2 | |||||
| // | |||||
| this.tableLayoutPanel2.ColumnCount = 1; | |||||
| this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); | |||||
| this.tableLayoutPanel2.Controls.Add(this.label1, 0, 1); | |||||
| this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 12); | |||||
| this.tableLayoutPanel2.Name = "tableLayoutPanel2"; | |||||
| this.tableLayoutPanel2.RowCount = 2; | |||||
| this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); | |||||
| this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); | |||||
| this.tableLayoutPanel2.Size = new System.Drawing.Size(232, 123); | |||||
| this.tableLayoutPanel2.TabIndex = 1; | |||||
| // | |||||
| // tableLayoutPanel3 | |||||
| // | |||||
| this.tableLayoutPanel3.ColumnCount = 4; | |||||
| this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15F)); | |||||
| this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35F)); | |||||
| this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35F)); | |||||
| this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15F)); | |||||
| this.tableLayoutPanel3.Controls.Add(this.button1, 1, 0); | |||||
| this.tableLayoutPanel3.Controls.Add(this.button2, 2, 0); | |||||
| this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; | |||||
| this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0); | |||||
| this.tableLayoutPanel3.Name = "tableLayoutPanel3"; | |||||
| this.tableLayoutPanel3.RowCount = 1; | |||||
| this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); | |||||
| this.tableLayoutPanel3.Size = new System.Drawing.Size(302, 193); | |||||
| this.tableLayoutPanel3.TabIndex = 1; | |||||
| // | |||||
| // label1 | |||||
| // | |||||
| this.label1.AutoSize = true; | |||||
| this.label1.Location = new System.Drawing.Point(3, 61); | |||||
| this.label1.Name = "label1"; | |||||
| this.label1.Size = new System.Drawing.Size(56, 23); | |||||
| this.label1.TabIndex = 0; | |||||
| this.label1.Text = "label1"; | |||||
| // | |||||
| // button1 | |||||
| // | |||||
| this.button1.Location = new System.Drawing.Point(48, 3); | |||||
| this.button1.Name = "button1"; | |||||
| this.button1.Size = new System.Drawing.Size(99, 67); | |||||
| this.button1.TabIndex = 1; | |||||
| this.button1.Text = "button1"; | |||||
| this.button1.UseVisualStyleBackColor = true; | |||||
| // | |||||
| // button2 | |||||
| // | |||||
| this.button2.Location = new System.Drawing.Point(129, 11); | |||||
| this.button2.Name = "button2"; | |||||
| this.button2.Size = new System.Drawing.Size(99, 55); | |||||
| this.button2.TabIndex = 2; | |||||
| this.button2.Text = "button2"; | |||||
| this.button2.UseVisualStyleBackColor = true; | |||||
| // | |||||
| // Exit | |||||
| // | |||||
| this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 22F); | |||||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||||
| this.ClientSize = new System.Drawing.Size(302, 193); | |||||
| this.Controls.Add(this.tableLayoutPanel3); | |||||
| this.Controls.Add(this.tableLayoutPanel2); | |||||
| this.Font = new System.Drawing.Font("Calibri", 10.8F); | |||||
| this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); | |||||
| this.Name = "Exit"; | |||||
| this.Text = "Exit"; | |||||
| this.tableLayoutPanel2.ResumeLayout(false); | |||||
| this.tableLayoutPanel2.PerformLayout(); | |||||
| this.tableLayoutPanel3.ResumeLayout(false); | |||||
| this.ResumeLayout(false); | |||||
| } | |||||
| #endregion | |||||
| private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; | |||||
| private System.Windows.Forms.Label label1; | |||||
| private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; | |||||
| private System.Windows.Forms.Button button1; | |||||
| private System.Windows.Forms.Button button2; | |||||
| } | |||||
| } | |||||
| @@ -1,18 +0,0 @@ | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.ComponentModel; | |||||
| using System.Data; | |||||
| using System.Drawing; | |||||
| using System.Text; | |||||
| using System.Windows.Forms; | |||||
| namespace StuMgmLib | |||||
| { | |||||
| public partial class Exit : Form | |||||
| { | |||||
| public Exit() | |||||
| { | |||||
| InitializeComponent(); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -1,120 +0,0 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <root> | |||||
| <!-- | |||||
| Microsoft ResX Schema | |||||
| Version 2.0 | |||||
| The primary goals of this format is to allow a simple XML format | |||||
| that is mostly human readable. The generation and parsing of the | |||||
| various data types are done through the TypeConverter classes | |||||
| associated with the data types. | |||||
| Example: | |||||
| ... ado.net/XML headers & schema ... | |||||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | |||||
| <resheader name="version">2.0</resheader> | |||||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |||||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |||||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |||||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |||||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |||||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | |||||
| </data> | |||||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |||||
| <comment>This is a comment</comment> | |||||
| </data> | |||||
| There are any number of "resheader" rows that contain simple | |||||
| name/value pairs. | |||||
| Each data row contains a name, and value. The row also contains a | |||||
| type or mimetype. Type corresponds to a .NET class that support | |||||
| text/value conversion through the TypeConverter architecture. | |||||
| Classes that don't support this are serialized and stored with the | |||||
| mimetype set. | |||||
| The mimetype is used for serialized objects, and tells the | |||||
| ResXResourceReader how to depersist the object. This is currently not | |||||
| extensible. For a given mimetype the value must be set accordingly: | |||||
| Note - application/x-microsoft.net.object.binary.base64 is the format | |||||
| that the ResXResourceWriter will generate, however the reader can | |||||
| read any of the formats listed below. | |||||
| mimetype: application/x-microsoft.net.object.binary.base64 | |||||
| value : The object must be serialized with | |||||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | |||||
| : and then encoded with base64 encoding. | |||||
| mimetype: application/x-microsoft.net.object.soap.base64 | |||||
| value : The object must be serialized with | |||||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |||||
| : and then encoded with base64 encoding. | |||||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | |||||
| value : The object must be serialized into a byte array | |||||
| : using a System.ComponentModel.TypeConverter | |||||
| : and then encoded with base64 encoding. | |||||
| --> | |||||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |||||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | |||||
| <xsd:element name="root" msdata:IsDataSet="true"> | |||||
| <xsd:complexType> | |||||
| <xsd:choice maxOccurs="unbounded"> | |||||
| <xsd:element name="metadata"> | |||||
| <xsd:complexType> | |||||
| <xsd:sequence> | |||||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | |||||
| </xsd:sequence> | |||||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | |||||
| <xsd:attribute name="type" type="xsd:string" /> | |||||
| <xsd:attribute name="mimetype" type="xsd:string" /> | |||||
| <xsd:attribute ref="xml:space" /> | |||||
| </xsd:complexType> | |||||
| </xsd:element> | |||||
| <xsd:element name="assembly"> | |||||
| <xsd:complexType> | |||||
| <xsd:attribute name="alias" type="xsd:string" /> | |||||
| <xsd:attribute name="name" type="xsd:string" /> | |||||
| </xsd:complexType> | |||||
| </xsd:element> | |||||
| <xsd:element name="data"> | |||||
| <xsd:complexType> | |||||
| <xsd:sequence> | |||||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |||||
| </xsd:sequence> | |||||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | |||||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |||||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |||||
| <xsd:attribute ref="xml:space" /> | |||||
| </xsd:complexType> | |||||
| </xsd:element> | |||||
| <xsd:element name="resheader"> | |||||
| <xsd:complexType> | |||||
| <xsd:sequence> | |||||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
| </xsd:sequence> | |||||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | |||||
| </xsd:complexType> | |||||
| </xsd:element> | |||||
| </xsd:choice> | |||||
| </xsd:complexType> | |||||
| </xsd:element> | |||||
| </xsd:schema> | |||||
| <resheader name="resmimetype"> | |||||
| <value>text/microsoft-resx</value> | |||||
| </resheader> | |||||
| <resheader name="version"> | |||||
| <value>2.0</value> | |||||
| </resheader> | |||||
| <resheader name="reader"> | |||||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
| </resheader> | |||||
| <resheader name="writer"> | |||||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
| </resheader> | |||||
| </root> | |||||
| @@ -38,20 +38,20 @@ | |||||
| this.txtPort = new System.Windows.Forms.TextBox(); | this.txtPort = new System.Windows.Forms.TextBox(); | ||||
| this.lblIP = new System.Windows.Forms.Label(); | this.lblIP = new System.Windows.Forms.Label(); | ||||
| this.cbxIPAddr = new System.Windows.Forms.ComboBox(); | this.cbxIPAddr = new System.Windows.Forms.ComboBox(); | ||||
| this.menuStrip1 = new System.Windows.Forms.MenuStrip(); | |||||
| this.mns1 = new System.Windows.Forms.MenuStrip(); | |||||
| this.菜单ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); | this.菜单ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); | ||||
| this.刷新IPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); | this.刷新IPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); | ||||
| this.tmr = new System.Windows.Forms.Timer(this.components); | this.tmr = new System.Windows.Forms.Timer(this.components); | ||||
| this.tlpAll.SuspendLayout(); | this.tlpAll.SuspendLayout(); | ||||
| this.tlpSettings.SuspendLayout(); | this.tlpSettings.SuspendLayout(); | ||||
| this.menuStrip1.SuspendLayout(); | |||||
| this.mns1.SuspendLayout(); | |||||
| this.SuspendLayout(); | this.SuspendLayout(); | ||||
| // | // | ||||
| // tlpAll | // tlpAll | ||||
| // | // | ||||
| this.tlpAll.ColumnCount = 2; | this.tlpAll.ColumnCount = 2; | ||||
| this.tlpAll.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 27.25581F)); | |||||
| this.tlpAll.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 72.74419F)); | |||||
| this.tlpAll.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 300F)); | |||||
| this.tlpAll.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); | |||||
| this.tlpAll.Controls.Add(this.rtxHistory, 0, 0); | this.tlpAll.Controls.Add(this.rtxHistory, 0, 0); | ||||
| this.tlpAll.Controls.Add(this.tlpSettings, 0, 0); | this.tlpAll.Controls.Add(this.tlpSettings, 0, 0); | ||||
| this.tlpAll.Dock = System.Windows.Forms.DockStyle.Fill; | this.tlpAll.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
| @@ -59,17 +59,17 @@ | |||||
| this.tlpAll.Name = "tlpAll"; | this.tlpAll.Name = "tlpAll"; | ||||
| this.tlpAll.RowCount = 1; | this.tlpAll.RowCount = 1; | ||||
| this.tlpAll.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); | this.tlpAll.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); | ||||
| this.tlpAll.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 409F)); | |||||
| this.tlpAll.Size = new System.Drawing.Size(1075, 409); | |||||
| this.tlpAll.Size = new System.Drawing.Size(882, 425); | |||||
| this.tlpAll.TabIndex = 0; | this.tlpAll.TabIndex = 0; | ||||
| // | // | ||||
| // rtxHistory | // rtxHistory | ||||
| // | // | ||||
| this.rtxHistory.Dock = System.Windows.Forms.DockStyle.Fill; | this.rtxHistory.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
| this.rtxHistory.Font = new System.Drawing.Font("Calibri", 10.8F); | |||||
| this.rtxHistory.Location = new System.Drawing.Point(295, 3); | |||||
| this.rtxHistory.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); | |||||
| this.rtxHistory.Location = new System.Drawing.Point(303, 3); | |||||
| this.rtxHistory.Name = "rtxHistory"; | this.rtxHistory.Name = "rtxHistory"; | ||||
| this.rtxHistory.Size = new System.Drawing.Size(777, 403); | |||||
| this.rtxHistory.ReadOnly = true; | |||||
| this.rtxHistory.Size = new System.Drawing.Size(576, 419); | |||||
| this.rtxHistory.TabIndex = 2; | this.rtxHistory.TabIndex = 2; | ||||
| this.rtxHistory.Text = ""; | this.rtxHistory.Text = ""; | ||||
| // | // | ||||
| @@ -92,7 +92,7 @@ | |||||
| this.tlpSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); | this.tlpSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); | ||||
| this.tlpSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); | this.tlpSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); | ||||
| this.tlpSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); | this.tlpSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); | ||||
| this.tlpSettings.Size = new System.Drawing.Size(286, 178); | |||||
| this.tlpSettings.Size = new System.Drawing.Size(294, 178); | |||||
| this.tlpSettings.TabIndex = 0; | this.tlpSettings.TabIndex = 0; | ||||
| // | // | ||||
| // lblSwiSta | // lblSwiSta | ||||
| @@ -110,9 +110,9 @@ | |||||
| // | // | ||||
| this.btnSerSwitch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); | this.btnSerSwitch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); | ||||
| this.btnSerSwitch.Font = new System.Drawing.Font("Calibri", 10.8F); | this.btnSerSwitch.Font = new System.Drawing.Font("Calibri", 10.8F); | ||||
| this.btnSerSwitch.Location = new System.Drawing.Point(134, 121); | |||||
| this.btnSerSwitch.Location = new System.Drawing.Point(137, 121); | |||||
| this.btnSerSwitch.Name = "btnSerSwitch"; | this.btnSerSwitch.Name = "btnSerSwitch"; | ||||
| this.btnSerSwitch.Size = new System.Drawing.Size(149, 54); | |||||
| this.btnSerSwitch.Size = new System.Drawing.Size(154, 54); | |||||
| this.btnSerSwitch.TabIndex = 2; | this.btnSerSwitch.TabIndex = 2; | ||||
| this.btnSerSwitch.Text = "开启服务器"; | this.btnSerSwitch.Text = "开启服务器"; | ||||
| this.btnSerSwitch.UseVisualStyleBackColor = true; | this.btnSerSwitch.UseVisualStyleBackColor = true; | ||||
| @@ -133,9 +133,9 @@ | |||||
| // | // | ||||
| this.txtPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); | this.txtPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); | ||||
| this.txtPort.Font = new System.Drawing.Font("Calibri", 10.8F); | this.txtPort.Font = new System.Drawing.Font("Calibri", 10.8F); | ||||
| this.txtPort.Location = new System.Drawing.Point(134, 74); | |||||
| this.txtPort.Location = new System.Drawing.Point(137, 74); | |||||
| this.txtPort.Name = "txtPort"; | this.txtPort.Name = "txtPort"; | ||||
| this.txtPort.Size = new System.Drawing.Size(149, 29); | |||||
| this.txtPort.Size = new System.Drawing.Size(154, 29); | |||||
| this.txtPort.TabIndex = 3; | this.txtPort.TabIndex = 3; | ||||
| this.txtPort.Text = "502"; | this.txtPort.Text = "502"; | ||||
| this.txtPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; | this.txtPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; | ||||
| @@ -157,22 +157,21 @@ | |||||
| this.cbxIPAddr.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; | this.cbxIPAddr.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; | ||||
| this.cbxIPAddr.Font = new System.Drawing.Font("Calibri", 10.8F); | this.cbxIPAddr.Font = new System.Drawing.Font("Calibri", 10.8F); | ||||
| this.cbxIPAddr.FormattingEnabled = true; | this.cbxIPAddr.FormattingEnabled = true; | ||||
| this.cbxIPAddr.Location = new System.Drawing.Point(134, 14); | |||||
| this.cbxIPAddr.Location = new System.Drawing.Point(137, 14); | |||||
| this.cbxIPAddr.Name = "cbxIPAddr"; | this.cbxIPAddr.Name = "cbxIPAddr"; | ||||
| this.cbxIPAddr.RightToLeft = System.Windows.Forms.RightToLeft.Yes; | this.cbxIPAddr.RightToLeft = System.Windows.Forms.RightToLeft.Yes; | ||||
| this.cbxIPAddr.Size = new System.Drawing.Size(149, 30); | |||||
| this.cbxIPAddr.Size = new System.Drawing.Size(154, 30); | |||||
| this.cbxIPAddr.TabIndex = 5; | this.cbxIPAddr.TabIndex = 5; | ||||
| // | // | ||||
| // menuStrip1 | |||||
| // mns1 | |||||
| // | // | ||||
| this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); | |||||
| this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { | |||||
| this.mns1.ImageScalingSize = new System.Drawing.Size(20, 20); | |||||
| this.mns1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { | |||||
| this.菜单ToolStripMenuItem}); | this.菜单ToolStripMenuItem}); | ||||
| this.menuStrip1.Location = new System.Drawing.Point(0, 0); | |||||
| this.menuStrip1.Name = "menuStrip1"; | |||||
| this.menuStrip1.Size = new System.Drawing.Size(1075, 28); | |||||
| this.menuStrip1.TabIndex = 1; | |||||
| this.menuStrip1.Text = "menuStrip1"; | |||||
| this.mns1.Location = new System.Drawing.Point(0, 0); | |||||
| this.mns1.Name = "mns1"; | |||||
| this.mns1.Size = new System.Drawing.Size(882, 28); | |||||
| this.mns1.TabIndex = 1; | |||||
| // | // | ||||
| // 菜单ToolStripMenuItem | // 菜单ToolStripMenuItem | ||||
| // | // | ||||
| @@ -198,10 +197,10 @@ | |||||
| // | // | ||||
| this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); | ||||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||
| this.ClientSize = new System.Drawing.Size(1075, 437); | |||||
| this.ClientSize = new System.Drawing.Size(882, 453); | |||||
| this.Controls.Add(this.tlpAll); | this.Controls.Add(this.tlpAll); | ||||
| this.Controls.Add(this.menuStrip1); | |||||
| this.MainMenuStrip = this.menuStrip1; | |||||
| this.Controls.Add(this.mns1); | |||||
| this.MainMenuStrip = this.mns1; | |||||
| this.Name = "Server"; | this.Name = "Server"; | ||||
| this.Text = "Server"; | this.Text = "Server"; | ||||
| this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Server_FormClosing); | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Server_FormClosing); | ||||
| @@ -209,8 +208,8 @@ | |||||
| this.tlpAll.ResumeLayout(false); | this.tlpAll.ResumeLayout(false); | ||||
| this.tlpSettings.ResumeLayout(false); | this.tlpSettings.ResumeLayout(false); | ||||
| this.tlpSettings.PerformLayout(); | this.tlpSettings.PerformLayout(); | ||||
| this.menuStrip1.ResumeLayout(false); | |||||
| this.menuStrip1.PerformLayout(); | |||||
| this.mns1.ResumeLayout(false); | |||||
| this.mns1.PerformLayout(); | |||||
| this.ResumeLayout(false); | this.ResumeLayout(false); | ||||
| this.PerformLayout(); | this.PerformLayout(); | ||||
| @@ -219,7 +218,7 @@ | |||||
| #endregion | #endregion | ||||
| private System.Windows.Forms.TableLayoutPanel tlpAll; | private System.Windows.Forms.TableLayoutPanel tlpAll; | ||||
| private System.Windows.Forms.MenuStrip menuStrip1; | |||||
| private System.Windows.Forms.MenuStrip mns1; | |||||
| private System.Windows.Forms.Label lblSwiSta; | private System.Windows.Forms.Label lblSwiSta; | ||||
| private System.Windows.Forms.TableLayoutPanel tlpSettings; | private System.Windows.Forms.TableLayoutPanel tlpSettings; | ||||
| private System.Windows.Forms.Button btnSerSwitch; | private System.Windows.Forms.Button btnSerSwitch; | ||||
| @@ -2,7 +2,6 @@ | |||||
| using System.Threading; | using System.Threading; | ||||
| using System.Windows.Forms; | using System.Windows.Forms; | ||||
| using StuMgmLib.MyNameSpace; | using StuMgmLib.MyNameSpace; | ||||
| using System.ComponentModel; | |||||
| namespace StuMgmServer | namespace StuMgmServer | ||||
| { | { | ||||
| @@ -117,12 +117,45 @@ | |||||
| <resheader name="writer"> | <resheader name="writer"> | ||||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||
| </resheader> | </resheader> | ||||
| <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||||
| <metadata name="tlpAll.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="rtxHistory.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="tlpSettings.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="lblSwiSta.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="btnSerSwitch.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="lblPort.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="txtPort.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="lblIP.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="cbxIPAddr.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="mns1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||||
| <value>17, 17</value> | <value>17, 17</value> | ||||
| </metadata> | </metadata> | ||||
| <metadata name="mns1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="tmr.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | <metadata name="tmr.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
| <value>159, 17</value> | <value>159, 17</value> | ||||
| </metadata> | </metadata> | ||||
| <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||||
| <value>True</value> | |||||
| </metadata> | |||||
| <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||||
| <value>68</value> | <value>68</value> | ||||
| </metadata> | </metadata> | ||||
| @@ -43,12 +43,6 @@ | |||||
| <Reference Include="System.Xml" /> | <Reference Include="System.Xml" /> | ||||
| </ItemGroup> | </ItemGroup> | ||||
| <ItemGroup> | <ItemGroup> | ||||
| <Compile Include="Exit.cs"> | |||||
| <SubType>Form</SubType> | |||||
| </Compile> | |||||
| <Compile Include="Exit.Designer.cs"> | |||||
| <DependentUpon>Exit.cs</DependentUpon> | |||||
| </Compile> | |||||
| <Compile Include="Server.cs"> | <Compile Include="Server.cs"> | ||||
| <SubType>Form</SubType> | <SubType>Form</SubType> | ||||
| </Compile> | </Compile> | ||||
| @@ -57,9 +51,6 @@ | |||||
| </Compile> | </Compile> | ||||
| <Compile Include="Program.cs" /> | <Compile Include="Program.cs" /> | ||||
| <Compile Include="Properties\AssemblyInfo.cs" /> | <Compile Include="Properties\AssemblyInfo.cs" /> | ||||
| <EmbeddedResource Include="Exit.resx"> | |||||
| <DependentUpon>Exit.cs</DependentUpon> | |||||
| </EmbeddedResource> | |||||
| <EmbeddedResource Include="Properties\Resources.resx"> | <EmbeddedResource Include="Properties\Resources.resx"> | ||||
| <Generator>ResXFileCodeGenerator</Generator> | <Generator>ResXFileCodeGenerator</Generator> | ||||
| <LastGenOutput>Resources.Designer.cs</LastGenOutput> | <LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||||