From ac5d3f717eec450956d262e69ead0d0ebff4ed69 Mon Sep 17 00:00:00 2001
From: "WIN-G7N5C0B818G\\Administrator" <971785472@qq.com>
Date: Tue, 26 Jan 2021 13:09:31 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=A0=91=20=E6=9C=89bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
StuMgmClient/Data.cs | 16 ++-
StuMgmClient/LoginForm.cs | 29 +++--
StuMgmClient/Properties/Resources.Designer.cs | 14 ++-
StuMgmClient/Properties/Resources.resx | 13 ++-
StuMgmClient/Properties/Settings.Designer.cs | 2 +-
StuMgmClient/SelectFrom.designer.cs | 3 +-
StuMgmClient/SelectFrom.resx | 29 ++++-
StuMgmClient/StuMgmClient.csproj | 9 +-
StuMgmClient/StuMgmClient.sln | 6 +
StuMgmClient/StudentForm.cs | 11 +-
StuMgmClient/SystemComm.cs | 6 +-
StuMgmClient/SystemCtrl.cs | 51 +++++----
StuMgmClient/SystemData.cs | 27 ++++-
StuMgmClient/Utility.cs | 7 +-
StuMgmLib/MyNameSpace/CommonData.cs | 106 ++++++++++++++++++
StuMgmLib/StuMgmLib.csproj | 5 +-
16 files changed, 264 insertions(+), 70 deletions(-)
create mode 100644 StuMgmLib/MyNameSpace/CommonData.cs
diff --git a/StuMgmClient/Data.cs b/StuMgmClient/Data.cs
index 9e326fa..62ed029 100644
--- a/StuMgmClient/Data.cs
+++ b/StuMgmClient/Data.cs
@@ -7,7 +7,7 @@ using System.Data;
namespace StuMgmClient
{
- enum ErrCode
+ public enum ErrCode
{
Success,
FailSerial,
@@ -18,7 +18,7 @@ namespace StuMgmClient
ErrData,
}
- public enum FuncCode
+ public enum ClientFunc
{
VerifLogin = 1,
GetCourseInfo,
@@ -36,9 +36,9 @@ namespace StuMgmClient
[Serializable]
public class ClientRequest
{
- public FuncCode Func;
+ public ClientFunc Func;
public object Object;
- public ClientRequest(FuncCode func, object obj)
+ public ClientRequest(ClientFunc func, object obj)
{
Func = func;
Object = obj;
@@ -72,8 +72,12 @@ namespace StuMgmClient
[Serializable]
public enum CourseStatusEnum
{
- lll,
- ...//
+ NoStart=0,
+ Begin,
+ WaitCheckig,
+ CheckigSuccess,
+ CheckigFail,
+ //
}
[Serializable]
diff --git a/StuMgmClient/LoginForm.cs b/StuMgmClient/LoginForm.cs
index dc9c0ec..47d48f8 100644
--- a/StuMgmClient/LoginForm.cs
+++ b/StuMgmClient/LoginForm.cs
@@ -1,5 +1,6 @@
using System;
using System.Windows.Forms;
+using StuMgmLib.MyNameSpace;
namespace StuMgmClient
{
@@ -17,7 +18,7 @@ namespace StuMgmClient
if (SystemData.InitSystemData() != ErrCode.Success)
throw new Exception("初始化异常,请重新启动");
}
-
+
////账号密码正则校验
//public bool RegexUser(string u, string p)
//{
@@ -49,16 +50,16 @@ namespace StuMgmClient
private void btnSubmit_Click(object sender, EventArgs e)
{
- Roles userRole;
- string token;
-
- if (VerifLogin(out userRole, out token) != ErrCode.Success)
+ LvErr userRole;
+ int token;
+ short job_id;
+ if (VerifLogin(out job_id, out userRole, out token) != ErrCode.Success)
return;
switch (userRole)
{
- case Roles.Student:
- ShowStudentForm(token);
+ case LvErr.Student:
+ ShowStudentForm(job_id, token);
break;
default:
MessageBox.Show(userRole.ToString());
@@ -66,18 +67,22 @@ namespace StuMgmClient
}
}
- ErrCode VerifLogin(out Roles userRole, out string token)
+ ErrCode VerifLogin(out short job_id, out LvErr userRole, out int token)
{
- ErrCode errcode = SystemCtrl.VerifLogin(txtUserName.Text, txtPassWord.Text, out userRole, out token);
+ job_id = 01943;
+ //ErrCode errcode = SystemCtrl.VerifLogin(txtUserName.Text, txtPassWord.Text, out userRole, out token);
+
+ ErrCode errcode = SystemCtrl.VerifLogin(job_id, "1", out userRole, out token);
if (errcode != ErrCode.Success)
MessageBox.Show(errcode.ToString());
+ job_id = 01943;
return errcode;
}
-
- void ShowStudentForm(string token)
+
+ void ShowStudentForm(short job_id, int token)
{
this.Hide();
- StudentForm stu = new StudentForm(token);
+ StudentForm stu = new StudentForm(job_id, token);
stu.ShowDialog();
this.Show();
}
diff --git a/StuMgmClient/Properties/Resources.Designer.cs b/StuMgmClient/Properties/Resources.Designer.cs
index b2a5e8c..eb09e7e 100644
--- a/StuMgmClient/Properties/Resources.Designer.cs
+++ b/StuMgmClient/Properties/Resources.Designer.cs
@@ -8,7 +8,7 @@
//
//------------------------------------------------------------------------------
-namespace StuMgmClient.Properties {
+namespace StuMgmLib.Properties {
using System;
@@ -39,7 +39,7 @@ namespace StuMgmClient.Properties {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("StuMgmClient.Properties.Resources", typeof(Resources).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("StuMgmLib.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
@@ -59,5 +59,15 @@ namespace StuMgmClient.Properties {
resourceCulture = value;
}
}
+
+ ///
+ /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ ///
+ internal static System.Drawing.Bitmap 沙漏 {
+ get {
+ object obj = ResourceManager.GetObject("沙漏", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
}
}
diff --git a/StuMgmClient/Properties/Resources.resx b/StuMgmClient/Properties/Resources.resx
index af7dbeb..07b306a 100644
--- a/StuMgmClient/Properties/Resources.resx
+++ b/StuMgmClient/Properties/Resources.resx
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
+
@@ -68,9 +69,10 @@
-
+
+
@@ -85,9 +87,10 @@
-
+
+
@@ -114,4 +117,8 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ..\图片\沙漏.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/StuMgmClient/Properties/Settings.Designer.cs b/StuMgmClient/Properties/Settings.Designer.cs
index 79b3194..9b8e969 100644
--- a/StuMgmClient/Properties/Settings.Designer.cs
+++ b/StuMgmClient/Properties/Settings.Designer.cs
@@ -8,7 +8,7 @@
//
//------------------------------------------------------------------------------
-namespace StuMgmClient.Properties {
+namespace StuMgmLib.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
diff --git a/StuMgmClient/SelectFrom.designer.cs b/StuMgmClient/SelectFrom.designer.cs
index f3f4a26..700093d 100644
--- a/StuMgmClient/SelectFrom.designer.cs
+++ b/StuMgmClient/SelectFrom.designer.cs
@@ -88,7 +88,6 @@
//
this.btnSumit.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btnSumit.BackColor = System.Drawing.Color.Transparent;
- // this.btnSumit.BackgroundImage = global::StuMgmClient.Properties.Resources.提交_01__1_;
this.btnSumit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnSumit.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.btnSumit.FlatAppearance.BorderSize = 0;
@@ -133,7 +132,7 @@
this.picTime.Anchor = System.Windows.Forms.AnchorStyles.None;
this.picTime.BackColor = System.Drawing.Color.Transparent;
this.picTime.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- // this.picTime.Image = global::StuMgmClient.Properties.Resources.沙漏;
+ this.picTime.Image = ((System.Drawing.Image)(resources.GetObject("picTime.Image")));
this.picTime.Location = new System.Drawing.Point(59, 18);
this.picTime.Name = "picTime";
this.picTime.Size = new System.Drawing.Size(60, 53);
diff --git a/StuMgmClient/SelectFrom.resx b/StuMgmClient/SelectFrom.resx
index 31819e2..6d55063 100644
--- a/StuMgmClient/SelectFrom.resx
+++ b/StuMgmClient/SelectFrom.resx
@@ -112,12 +112,12 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwg
@@ -294,6 +294,29 @@
6iigAooooAKbRRQAUUUUAOFLRRQAUUUUAFFFFABRRRQAUUUUAFFFFAFiMYRafRRQAUUUUAFNI4oooAZR
RRQAUUUUAFSCiigBKKKKACiiigAooooAKKKKACnUUUAPooooAbRRRQAUUUUAFFFFABRRRQAlT2x+ZhRR
QBZooooAKgmUDkd6KKAIqKKKACiiigApKKKACiiigAooooAKKKKACiiigAooooAmgctwanoooA//2Q==
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAPsSURBVGhD7VhBaNRAFO1BBA8ePEgR226SLQoKBdGLeCmCgogHDxUE9SxCRUTQY09KEarWTtJS
+ tZ5UClYQrIpoD4JWL7XgRVC8KGpLazczu4rYxj/Jz+5PdtKtzWy3h33wsM77+/6fZCbzk4Y66qgCsux3
+ q2nzToPlulYDM3buAJa2NEDxA0BvNTFr53dieZWhMqg15Z3A8irDYG6P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vy9Cot8YLJ+RqiyhwEx8pYa1pXjYOlho
+ wvIqI/6dcpWwA8urDGjU7igMasr/WlIWE0fhLtyHH/prtdaUHwjkVw4sr4469KGh4R83rROPP3Ze1gAA
+ AABJRU5ErkJggg==
diff --git a/StuMgmClient/StuMgmClient.csproj b/StuMgmClient/StuMgmClient.csproj
index 13a8340..9b7da46 100644
--- a/StuMgmClient/StuMgmClient.csproj
+++ b/StuMgmClient/StuMgmClient.csproj
@@ -7,7 +7,7 @@
{95FDEE92-6C6E-41F1-A1C3-2FCDB1413781}
WinExe
Properties
- StuMgmClient
+ StuMgmLib
StuMgmClient
v2.0
512
@@ -58,7 +58,6 @@
Code
-
Form
@@ -130,6 +129,12 @@
True
+
+
+ {34ad3363-1b1c-4f4a-898c-c1a1f215fddd}
+ StuMgmLib
+
+