diff --git a/CSS_Solution.sln b/CSS_Solution.sln
new file mode 100644
index 0000000..be3c81d
--- /dev/null
+++ b/CSS_Solution.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.9.34607.119
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSS_Solution", "CSS_Solution\CSS_Solution.csproj", "{F33E856E-A528-459E-8B18-5661ED2CFE1B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F33E856E-A528-459E-8B18-5661ED2CFE1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F33E856E-A528-459E-8B18-5661ED2CFE1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F33E856E-A528-459E-8B18-5661ED2CFE1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F33E856E-A528-459E-8B18-5661ED2CFE1B}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {8B6677EC-62A4-4038-8AD6-C1EEA25762C7}
+ EndGlobalSection
+EndGlobal
diff --git a/CSS_Solution/AppSettings.json b/CSS_Solution/AppSettings.json
new file mode 100644
index 0000000..f6f59cf
--- /dev/null
+++ b/CSS_Solution/AppSettings.json
@@ -0,0 +1,69 @@
+{
+ "login_index": "http://sso.jwc.whut.edu.cn/Certification/login.do",
+ "getcode": "http://sso.jwc.whut.edu.cn/Certification/getCode.do",
+ "getIndex_headers": {
+ "User_Agent": "Apifox/1.0.0 (https://apifox.com)",
+ "Accept": "*/*",
+ "Host": "sso.jwc.whut.edu.cn",
+ "Accept_Encoding": "gzip, deflate, br",
+ "Connection": "keep-alive"
+ },
+ "getCode_headers": {
+ "User_Agent": "Apifox/1.0.0 (https://apifox.com)",
+ "Accept": "*/*",
+ "Host": "sso.jwc.whut.edu.cn",
+ "Accept_Encoding": "gzip, deflate, br",
+ "Connection": "keep-alive",
+ "Content_Type": "application/x-www-form-urlencoded",
+ "Content_Length": "42"
+ },
+ "getcode_body": {
+ "webfinger": "b9a7a7901c83c4c0dad90bd2bbf19498"
+ },
+ "login": "http://sso.jwc.whut.edu.cn/Certification/login.do",
+ "login_header": {
+ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Accept_Encoding": "gzip, deflate",
+ "Accept_Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+ "Cache_Control": "max-age=0",
+ "Content_Length": "246",
+ "Content_Type": "application/x-www-form-urlencoded",
+ "Host": "sso.jwc.whut.edu.cn",
+ "Origin": "http://sso.jwc.whut.edu.cn",
+ "Referer": "http://sso.jwc.whut.edu.cn/Certification/login.do",
+ "Upgrade_Insecure_Requests": "1",
+ "Keep_Alive": "timeout=4",
+ "User_Agent": "Apifox/1.0.0 (https://apifox.com)",
+ "Connection": "keep-alive"
+ },
+ "login_body": {
+ "MsgID": "",
+ "KeyID": "",
+ "UserName": "",
+ "Password": "",
+ "rnd": "FromIndex",
+ "return_EncData": "",
+ "code": "FromGetCode",
+ "userName1": "",
+ "password1": "",
+ "webfinger": "b9a7a7901c83c4c0dad90bd2bbf19498",
+ "falg": "",
+ "type": "xs",
+ "userName_": "",
+ "password_": ""
+ },
+ "to_course_header": {
+ "User_Agent": "Apifox/1.0.0 (https://apifox.com)",
+ "Accept": "*/*",
+ "Accept_Encoding": "gzip, deflate",
+ "Accept_Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+ "Referer": "http://sso.jwc.whut.edu.cn/",
+ "Upgrade_Insecure_Requests": "1",
+ "Connection": "keep-alive"
+ },
+ "to_course": "http://218.197.102.183/Course",
+ "Suggest_Client_count": "4",
+ "Etc": {
+ "StartTime_Str": "2004-1-1-1-1-1"
+ }
+}
diff --git a/CSS_Solution/CSS_Solution.csproj b/CSS_Solution/CSS_Solution.csproj
new file mode 100644
index 0000000..da91d00
--- /dev/null
+++ b/CSS_Solution/CSS_Solution.csproj
@@ -0,0 +1,60 @@
+
+
+
+ Exe
+ net8.0-windows8.0
+ enable
+ True
+ enable
+ False
+ False
+
+
+
+ False
+ True
+
+
+
+ False
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
\ No newline at end of file
diff --git a/CSS_Solution/ExceptionHandler.cs b/CSS_Solution/ExceptionHandler.cs
new file mode 100644
index 0000000..786133c
--- /dev/null
+++ b/CSS_Solution/ExceptionHandler.cs
@@ -0,0 +1,54 @@
+using Microsoft.Extensions.Logging;
+using System.Configuration;
+
+namespace CSS_Solution
+{
+ internal class ExceptionHandler
+ {
+ ILogger? exception_logger;
+ public ExceptionHandler()
+ {
+ exception_logger = Initialize.loggerFactory?.CreateLogger("Global exception");
+ if(exception_logger == null)
+ throw new Exception("logger create failed");
+ }
+ public void ApplicationThreadExceptionHandler(object sender, System.Threading.ThreadExceptionEventArgs e)
+ {
+ Exception exception = e.Exception;
+ if (exception_logger == null)
+ {
+ exception_logger = Initialize.default_logger != null ? Initialize.default_logger : LoggerFactory.Create(builder =>
+ {
+ Console.WriteLine(builder);
+ builder.AddConsole();
+ }).CreateLogger("Global exception");
+ if (exception_logger == null)
+ {
+ Console.WriteLine($"[{DateTime.Now}] Weird!! Logger can't be initialized!");
+ Console.WriteLine($"[{DateTime.Now}] However, an exception has been caught");
+ Console.WriteLine($"[{DateTime.Now}] Message:\n{exception.Message}\nStackTrace:\n{exception.StackTrace}\n");
+ Program.mainForm?.Close();
+ return;
+ }
+ else
+ exception_logger.LogWarning($"[{DateTime.Now}] Something wrong with the exception logger, you should check it out.");
+ }
+ if (exception == null)
+ {
+ exception_logger.LogWarning($"[{DateTime.Now}] Weird!! Null exception catched");
+ return;
+ }
+ string info = $"[{DateTime.Now}] Message:\n{exception.Message}\nStackTrace:\n{exception.StackTrace}\n";
+ switch (exception)
+ {
+ case ConfigurationErrorsException:
+ exception_logger.LogError(info);
+ break;
+ default:
+ exception_logger.LogWarning(info);
+ break;
+ }
+ }
+ }
+
+}
diff --git a/CSS_Solution/Forms/Change_Task_Form.Designer.cs b/CSS_Solution/Forms/Change_Task_Form.Designer.cs
new file mode 100644
index 0000000..17062e5
--- /dev/null
+++ b/CSS_Solution/Forms/Change_Task_Form.Designer.cs
@@ -0,0 +1,59 @@
+namespace CSS_Solution.Forms
+{
+ partial class Change_Task_Form
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ label1 = new Label();
+ SuspendLayout();
+ //
+ // label1
+ //
+ label1.AutoSize = true;
+ label1.Location = new Point(12, 9);
+ label1.Name = "label1";
+ label1.Size = new Size(22, 24);
+ label1.TabIndex = 1;
+ label1.Text = "b";
+ //
+ // Change_Task_Form
+ //
+ AutoScaleDimensions = new SizeF(11F, 24F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(800, 450);
+ Controls.Add(label1);
+ Name = "Change_Task_Form";
+ Text = "Change_Task_Form";
+ ResumeLayout(false);
+ PerformLayout();
+ }
+
+ #endregion
+
+ private Label label1;
+ }
+}
\ No newline at end of file
diff --git a/CSS_Solution/Forms/Change_Task_Form.cs b/CSS_Solution/Forms/Change_Task_Form.cs
new file mode 100644
index 0000000..2fa46bc
--- /dev/null
+++ b/CSS_Solution/Forms/Change_Task_Form.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace CSS_Solution.Forms
+{
+ public partial class Change_Task_Form : Form
+ {
+ public Change_Task_Form()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/CSS_Solution/Forms/Change_Task_Form.resx b/CSS_Solution/Forms/Change_Task_Form.resx
new file mode 100644
index 0000000..af32865
--- /dev/null
+++ b/CSS_Solution/Forms/Change_Task_Form.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/CSS_Solution/Forms/Countdown.Designer.cs b/CSS_Solution/Forms/Countdown.Designer.cs
new file mode 100644
index 0000000..d5f57b9
--- /dev/null
+++ b/CSS_Solution/Forms/Countdown.Designer.cs
@@ -0,0 +1,136 @@
+namespace CSS_Solution.Forms
+{
+ partial class Countdown
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region 组件设计器生成的代码
+
+ ///
+ /// 设计器支持所需的方法 - 不要修改
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ Title = new Label();
+ Delta_Time = new Label();
+ millisecond = new Label();
+ inaccuracies = new Label();
+ info2 = new Label();
+ info1 = new Label();
+ refresh = new System.Windows.Forms.Timer(components);
+ SuspendLayout();
+ //
+ // Title
+ //
+ Title.AutoSize = true;
+ Title.Font = new Font("Microsoft YaHei UI", 28F, FontStyle.Regular, GraphicsUnit.Point, 134);
+ Title.ForeColor = Color.White;
+ Title.Location = new Point(0, 0);
+ Title.Name = "Title";
+ Title.Size = new Size(163, 75);
+ Title.TabIndex = 12;
+ Title.Text = "Time";
+ //
+ // Delta_Time
+ //
+ Delta_Time.Font = new Font("Microsoft YaHei UI", 42F, FontStyle.Regular, GraphicsUnit.Point, 134);
+ Delta_Time.ForeColor = Color.White;
+ Delta_Time.Location = new Point(-8, 54);
+ Delta_Time.Name = "Delta_Time";
+ Delta_Time.Size = new Size(430, 110);
+ Delta_Time.TabIndex = 13;
+ Delta_Time.Text = "00:00:00";
+ //
+ // millisecond
+ //
+ millisecond.AutoSize = true;
+ millisecond.ForeColor = Color.White;
+ millisecond.Location = new Point(348, 122);
+ millisecond.Name = "millisecond";
+ millisecond.Size = new Size(32, 24);
+ millisecond.TabIndex = 14;
+ millisecond.Text = "00";
+ //
+ // inaccuracies
+ //
+ inaccuracies.AutoSize = true;
+ inaccuracies.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
+ inaccuracies.ForeColor = Color.White;
+ inaccuracies.Location = new Point(343, 67);
+ inaccuracies.Name = "inaccuracies";
+ inaccuracies.Size = new Size(42, 31);
+ inaccuracies.TabIndex = 15;
+ inaccuracies.Text = "+-";
+ //
+ // info2
+ //
+ info2.AutoSize = true;
+ info2.ForeColor = Color.White;
+ info2.Location = new Point(11, 191);
+ info2.Name = "info2";
+ info2.Size = new Size(273, 24);
+ info2.TabIndex = 16;
+ info2.Text = "START OF COURSE SELECTION";
+ //
+ // info1
+ //
+ info1.AutoSize = true;
+ info1.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
+ info1.ForeColor = Color.White;
+ info1.Location = new Point(8, 155);
+ info1.Name = "info1";
+ info1.Size = new Size(131, 31);
+ info1.TabIndex = 17;
+ info1.Text = "EXPECTED";
+ //
+ // refresh
+ //
+ refresh.Interval = 10;
+ refresh.Tick += refresh_Tick;
+ //
+ // Countdown
+ //
+ AutoScaleDimensions = new SizeF(11F, 24F);
+ AutoScaleMode = AutoScaleMode.Font;
+ BackColor = Color.FromArgb(25, 25, 25);
+ Controls.Add(Title);
+ Controls.Add(info1);
+ Controls.Add(info2);
+ Controls.Add(millisecond);
+ Controls.Add(inaccuracies);
+ Controls.Add(Delta_Time);
+ Name = "Countdown";
+ Size = new Size(390, 226);
+ ResumeLayout(false);
+ PerformLayout();
+ }
+
+ #endregion
+
+ private Label Title;
+ private Label Delta_Time;
+ private Label millisecond;
+ private Label inaccuracies;
+ private Label info2;
+ private Label info1;
+ private System.Windows.Forms.Timer refresh;
+ }
+}
diff --git a/CSS_Solution/Forms/Countdown.cs b/CSS_Solution/Forms/Countdown.cs
new file mode 100644
index 0000000..2539a3a
--- /dev/null
+++ b/CSS_Solution/Forms/Countdown.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using CSS_Solution;
+namespace CSS_Solution.Forms
+{
+ public partial class Countdown : UserControl
+ {
+ public Countdown()
+ {
+ InitializeComponent();
+ refresh.Enabled = true;
+ }
+ public void Start_Timer() => millisecond.Enabled = true;
+
+ private void refresh_Tick(object sender, EventArgs e)
+ {
+ if(DesignMode) return;
+ DateTime start = DateTime.Now;
+ DateTime end = Settings.etc.StartTime;
+ //DateTime end = DateTime.Now;
+ TimeSpan duration = end - start;
+ if (duration < TimeSpan.Zero)
+ {
+ refresh.Enabled = false;
+ Delta_Time.Text = "00:00:00";
+ millisecond.Text = "00";
+ }
+ Delta_Time.Text = duration.ToString(@"hh\:mm\:ss");
+ millisecond.Text = duration.ToString(@"fff").Remove(2);
+ }
+ }
+}
diff --git a/CSS_Solution/Forms/Countdown.resx b/CSS_Solution/Forms/Countdown.resx
new file mode 100644
index 0000000..fcecb8f
--- /dev/null
+++ b/CSS_Solution/Forms/Countdown.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/CSS_Solution/Forms/Form_Adjustment.cs b/CSS_Solution/Forms/Form_Adjustment.cs
new file mode 100644
index 0000000..9760cbe
--- /dev/null
+++ b/CSS_Solution/Forms/Form_Adjustment.cs
@@ -0,0 +1,199 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CSS_Solution.Forms
+{
+ partial class MainForm
+ {
+ private Point mPoint;
+ private void Title_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ Location = new Point(Location.X + e.X - mPoint.X, Location.Y + e.Y - mPoint.Y);
+ }
+ private void Title_MouseDown(object sender, MouseEventArgs e)
+ {
+ mPoint = new Point(e.X, e.Y);
+ }
+ //enum Adjustment_position
+ //{
+ // LeftTop = 0,
+ // Top = 1,
+ // RightTop = 2,
+ // Right = 3,
+ // RightBottom = 4,
+ // Bottom = 5,
+ // LeftBottom = 6,
+ // Left = 7,
+ // Middle = 8
+ //}
+ //Adjustment_position adjustment_Position = Adjustment_position.Middle;
+ //private void Main_MouseMove(object sender, MouseEventArgs e)
+ //{
+
+ // if (e.Button == MouseButtons.Left)
+ // {
+ // switch (adjustment_Position)
+ // {
+ // case Adjustment_position.LeftTop:
+ // {
+ // int endx = Left + Width;
+ // Left = MousePosition.X;
+ // Width = endx - Left;
+ // int endy = Top + Height;
+ // Top = MousePosition.Y;
+ // Height = endy - Top;
+ // break;
+ // }
+ // case Adjustment_position.Top:
+ // {
+ // int endy = Top + Height;
+ // Top = MousePosition.Y;
+ // Height = endy - Top;
+ // break;
+ // }
+ // case Adjustment_position.RightTop:
+ // {
+ // int endy = Top + Height;
+ // Top = MousePosition.Y;
+ // Width = MousePosition.X - Left;
+ // Height = endy - Top;
+ // break;
+ // }
+ // case Adjustment_position.Right:
+ // {
+ // Width = MousePosition.X - Left;
+ // break;
+ // }
+ // case Adjustment_position.RightBottom:
+ // {
+ // Width = MousePosition.X - Left;
+ // Height = MousePosition.Y - Top;
+ // break;
+ // }
+ // case Adjustment_position.Bottom:
+ // {
+ // Height = MousePosition.Y - Top;
+ // break;
+ // }
+ // case Adjustment_position.LeftBottom:
+ // {
+ // int endx = Left + Width;
+ // Left = MousePosition.X;
+ // Width = endx - Left;
+ // Height = MousePosition.Y - Top;
+ // break;
+ // }
+ // case Adjustment_position.Left:
+ // {
+ // int endx = Left + Width;
+ // Left = MousePosition.X;
+ // Width = endx - Left;
+ // break;
+ // }
+ // }
+ // }
+ // if (e.Location.X >= Width - 4 && e.Location.Y >= Height - 4)
+ // {
+ // Cursor = Cursors.SizeNWSE; //RightBottom
+ // adjustment_Position = Adjustment_position.RightBottom;
+ // }
+ // else if (e.Location.X >= Width - 4 && e.Location.Y <= 4)
+ // {
+ // Cursor = Cursors.SizeNESW; //RightTop
+ // adjustment_Position = Adjustment_position.RightTop;
+ // }
+ // else if (e.Location.X <= 4 && e.Location.Y >= Height - 4)
+ // {
+ // Cursor = Cursors.SizeNESW; //LeftBottom
+ // adjustment_Position = Adjustment_position.LeftBottom;
+ // }
+ // else if (e.Location.X <= 4 && e.Location.Y <= 4)
+ // {
+ // Cursor = Cursors.SizeNWSE; //LeftTop
+ // adjustment_Position = Adjustment_position.LeftTop;
+ // }
+ // else if (e.Location.X >= Width - 4)
+ // {
+ // Cursor = Cursors.SizeWE; //Right
+ // adjustment_Position = Adjustment_position.Right;
+ // }
+ // else if (e.Location.X <= 4)
+ // {
+ // Cursor = Cursors.SizeWE; //Left
+ // adjustment_Position = Adjustment_position.Left;
+ // }
+ // else if (e.Location.Y >= Height - 4)
+ // {
+ // Cursor = Cursors.SizeNS; //Bottom
+ // adjustment_Position = Adjustment_position.Bottom;
+ // }
+ // else if (e.Location.Y <= 4)
+ // {
+ // Cursor = Cursors.SizeNS; //Top
+ // adjustment_Position = Adjustment_position.Top;
+ // }
+ // else
+ // {
+ // Cursor = Cursors.Arrow; //Middle
+ // adjustment_Position = Adjustment_position.Middle;
+ // }
+ //}
+
+ //private void Main_Leave(object sender, EventArgs e)
+ //{
+ // Cursor = Cursors.Arrow;// 移出窗体变为正常
+ //}
+ #region 支持改变窗体大小
+ private const int Guying_HTLEFT = 10;
+ private const int Guying_HTRIGHT = 11;
+ private const int Guying_HTTOP = 12;
+ private const int Guying_HTTOPLEFT = 13;
+ private const int Guying_HTTOPRIGHT = 14;
+ private const int Guying_HTBOTTOM = 15;
+ private const int Guying_HTBOTTOMLEFT = 0x10;
+ private const int Guying_HTBOTTOMRIGHT = 17;
+ protected override void WndProc(ref Message m)
+ {
+ switch (m.Msg)
+ {
+ case 0x0084:
+ base.WndProc(ref m);
+ Point vPoint = new Point((int)m.LParam & 0xFFFF, (int)m.LParam >> 16 & 0xFFFF);
+ vPoint = PointToClient(vPoint);
+ if (vPoint.X <= 5)
+ if (vPoint.Y <= 5)
+ m.Result = (IntPtr)Guying_HTTOPLEFT;
+ else if (vPoint.Y >= ClientSize.Height - 5)
+ m.Result = (IntPtr)Guying_HTBOTTOMLEFT;
+ else
+ m.Result = (IntPtr)Guying_HTLEFT;
+ else if (vPoint.X >= ClientSize.Width - 5)
+ if (vPoint.Y <= 5)
+ m.Result = (IntPtr)Guying_HTTOPRIGHT;
+ else if (vPoint.Y >= ClientSize.Height - 5)
+ m.Result = (IntPtr)Guying_HTBOTTOMRIGHT;
+ else
+ m.Result = (IntPtr)Guying_HTRIGHT;
+ else if (vPoint.Y <= 5)
+ m.Result = (IntPtr)Guying_HTTOP;
+ else if (vPoint.Y >= ClientSize.Height - 5)
+ m.Result = (IntPtr)Guying_HTBOTTOM;
+ break;
+ case 0x0201://鼠标左键按下的消息
+ m.Msg = 0x00A1;//更改消息为非客户区按下鼠标
+ m.LParam = IntPtr.Zero; //默认值
+ m.WParam = new IntPtr(2);//鼠标放在标题栏内
+ base.WndProc(ref m);
+ break;
+ default:
+ base.WndProc(ref m);
+ break;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/CSS_Solution/Forms/MainForm.Designer.cs b/CSS_Solution/Forms/MainForm.Designer.cs
new file mode 100644
index 0000000..840ce84
--- /dev/null
+++ b/CSS_Solution/Forms/MainForm.Designer.cs
@@ -0,0 +1,268 @@
+namespace CSS_Solution.Forms
+{
+ partial class MainForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ MainPanel = new Panel();
+ FunctionPanel = new Panel();
+ SideBar = new Panel();
+ SettingsPanel = new Panel();
+ SettingsPicture = new PictureBox();
+ HomePanel = new Panel();
+ HomePicture = new PictureBox();
+ RunTaskPanel = new Panel();
+ RunTaskPicture = new PictureBox();
+ SetTaskPanel = new Panel();
+ SetTaskPicture = new PictureBox();
+ Title = new Panel();
+ Title_name = new Label();
+ statusStrip = new StatusStrip();
+ timer1 = new System.Windows.Forms.Timer(components);
+ MainPanel.SuspendLayout();
+ SideBar.SuspendLayout();
+ SettingsPanel.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)SettingsPicture).BeginInit();
+ HomePanel.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)HomePicture).BeginInit();
+ RunTaskPanel.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)RunTaskPicture).BeginInit();
+ SetTaskPanel.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)SetTaskPicture).BeginInit();
+ Title.SuspendLayout();
+ SuspendLayout();
+ //
+ // MainPanel
+ //
+ MainPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ MainPanel.BackColor = Color.FromArgb(25, 25, 25);
+ MainPanel.Controls.Add(FunctionPanel);
+ MainPanel.Controls.Add(SideBar);
+ MainPanel.Controls.Add(Title);
+ MainPanel.Controls.Add(statusStrip);
+ MainPanel.ForeColor = Color.White;
+ MainPanel.Location = new Point(3, 3);
+ MainPanel.Margin = new Padding(0);
+ MainPanel.Name = "MainPanel";
+ MainPanel.Size = new Size(1484, 814);
+ MainPanel.TabIndex = 5;
+ //
+ // FunctionPanel
+ //
+ FunctionPanel.Dock = DockStyle.Fill;
+ FunctionPanel.Location = new Point(81, 56);
+ FunctionPanel.Name = "FunctionPanel";
+ FunctionPanel.Size = new Size(1403, 736);
+ FunctionPanel.TabIndex = 2;
+ //
+ // SideBar
+ //
+ SideBar.BackColor = Color.FromArgb(26, 32, 45);
+ SideBar.Controls.Add(SettingsPanel);
+ SideBar.Controls.Add(HomePanel);
+ SideBar.Controls.Add(RunTaskPanel);
+ SideBar.Controls.Add(SetTaskPanel);
+ SideBar.Dock = DockStyle.Left;
+ SideBar.Location = new Point(0, 56);
+ SideBar.Name = "SideBar";
+ SideBar.Size = new Size(81, 736);
+ SideBar.TabIndex = 1;
+ //
+ // SettingsPanel
+ //
+ SettingsPanel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
+ SettingsPanel.Controls.Add(SettingsPicture);
+ SettingsPanel.Location = new Point(10, 637);
+ SettingsPanel.Name = "SettingsPanel";
+ SettingsPanel.Size = new Size(61, 61);
+ SettingsPanel.TabIndex = 4;
+ SettingsPanel.Click += SwitchPanels_Click;
+ SettingsPanel.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // SettingsPicture
+ //
+ SettingsPicture.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ SettingsPicture.Image = Properties.Resources.settings;
+ SettingsPicture.Location = new Point(15, 15);
+ SettingsPicture.Name = "SettingsPicture";
+ SettingsPicture.Size = new Size(31, 31);
+ SettingsPicture.SizeMode = PictureBoxSizeMode.Zoom;
+ SettingsPicture.TabIndex = 1;
+ SettingsPicture.TabStop = false;
+ SettingsPicture.Click += SwitchPanels_Click;
+ SettingsPicture.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // HomePanel
+ //
+ HomePanel.Controls.Add(HomePicture);
+ HomePanel.Location = new Point(10, 10);
+ HomePanel.Name = "HomePanel";
+ HomePanel.Size = new Size(61, 61);
+ HomePanel.TabIndex = 3;
+ HomePanel.Click += SwitchPanels_Click;
+ HomePanel.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // HomePicture
+ //
+ HomePicture.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ HomePicture.Image = Properties.Resources.home;
+ HomePicture.Location = new Point(15, 15);
+ HomePicture.Name = "HomePicture";
+ HomePicture.Size = new Size(31, 31);
+ HomePicture.SizeMode = PictureBoxSizeMode.Zoom;
+ HomePicture.TabIndex = 2;
+ HomePicture.TabStop = false;
+ HomePicture.Click += SwitchPanels_Click;
+ HomePicture.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // RunTaskPanel
+ //
+ RunTaskPanel.Controls.Add(RunTaskPicture);
+ RunTaskPanel.Location = new Point(10, 152);
+ RunTaskPanel.Name = "RunTaskPanel";
+ RunTaskPanel.Size = new Size(61, 61);
+ RunTaskPanel.TabIndex = 2;
+ RunTaskPanel.Click += SwitchPanels_Click;
+ RunTaskPanel.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // RunTaskPicture
+ //
+ RunTaskPicture.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ RunTaskPicture.Image = Properties.Resources.Run;
+ RunTaskPicture.Location = new Point(15, 15);
+ RunTaskPicture.Name = "RunTaskPicture";
+ RunTaskPicture.Size = new Size(31, 31);
+ RunTaskPicture.SizeMode = PictureBoxSizeMode.Zoom;
+ RunTaskPicture.TabIndex = 1;
+ RunTaskPicture.TabStop = false;
+ RunTaskPicture.Click += SwitchPanels_Click;
+ RunTaskPicture.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // SetTaskPanel
+ //
+ SetTaskPanel.Controls.Add(SetTaskPicture);
+ SetTaskPanel.Location = new Point(10, 81);
+ SetTaskPanel.Name = "SetTaskPanel";
+ SetTaskPanel.Size = new Size(61, 61);
+ SetTaskPanel.TabIndex = 1;
+ SetTaskPanel.Click += SwitchPanels_Click;
+ SetTaskPanel.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // SetTaskPicture
+ //
+ SetTaskPicture.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ SetTaskPicture.Image = Properties.Resources.input;
+ SetTaskPicture.Location = new Point(15, 15);
+ SetTaskPicture.Name = "SetTaskPicture";
+ SetTaskPicture.Size = new Size(31, 31);
+ SetTaskPicture.SizeMode = PictureBoxSizeMode.Zoom;
+ SetTaskPicture.TabIndex = 0;
+ SetTaskPicture.TabStop = false;
+ SetTaskPicture.Click += SwitchPanels_Click;
+ SetTaskPicture.MouseEnter += SwitchPanels_MouseEnter;
+ //
+ // Title
+ //
+ Title.BackColor = Color.FromArgb(26, 32, 45);
+ Title.Controls.Add(Title_name);
+ Title.Dock = DockStyle.Top;
+ Title.Location = new Point(0, 0);
+ Title.Name = "Title";
+ Title.Size = new Size(1484, 56);
+ Title.TabIndex = 0;
+ Title.MouseDown += Title_MouseDown;
+ Title.MouseMove += Title_MouseMove;
+ //
+ // Title_name
+ //
+ Title_name.AutoSize = true;
+ Title_name.Font = new Font("Microsoft YaHei UI", 16F, FontStyle.Bold, GraphicsUnit.Point, 134);
+ Title_name.Location = new Point(5, 5);
+ Title_name.Name = "Title_name";
+ Title_name.Size = new Size(686, 42);
+ Title_name.TabIndex = 2;
+ Title_name.Text = "Course selection system Solution (C.s.s.S)";
+ //
+ // statusStrip
+ //
+ statusStrip.BackColor = Color.FromArgb(0, 122, 204);
+ statusStrip.ImageScalingSize = new Size(24, 24);
+ statusStrip.Location = new Point(0, 792);
+ statusStrip.Name = "statusStrip";
+ statusStrip.Size = new Size(1484, 22);
+ statusStrip.TabIndex = 3;
+ statusStrip.Text = "statusStrip1";
+ //
+ // MainForm
+ //
+ AutoScaleDimensions = new SizeF(11F, 24F);
+ AutoScaleMode = AutoScaleMode.Font;
+ BackColor = Color.FromArgb(0, 122, 204);
+ ClientSize = new Size(1490, 820);
+ Controls.Add(MainPanel);
+ DoubleBuffered = true;
+ FormBorderStyle = FormBorderStyle.None;
+ MinimumSize = new Size(775, 378);
+ Name = "MainForm";
+ Text = "MainForm";
+ MainPanel.ResumeLayout(false);
+ MainPanel.PerformLayout();
+ SideBar.ResumeLayout(false);
+ SettingsPanel.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)SettingsPicture).EndInit();
+ HomePanel.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)HomePicture).EndInit();
+ RunTaskPanel.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)RunTaskPicture).EndInit();
+ SetTaskPanel.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)SetTaskPicture).EndInit();
+ Title.ResumeLayout(false);
+ Title.PerformLayout();
+ ResumeLayout(false);
+ }
+
+ #endregion
+ private Panel Title;
+ private FlowLayoutPanel flowLayoutPanel1;
+ private Panel top;
+ private Panel MainPanel;
+ private Panel SideBar;
+ private Label Title_name;
+ private PictureBox SetTaskPicture;
+ private Panel SetTaskPanel;
+ private Panel FunctionPanel;
+ private PictureBox RunTaskPicture;
+ private Panel RunTaskPanel;
+ private Panel HomePanel;
+ private PictureBox HomePicture;
+ private Panel SettingsPanel;
+ private PictureBox SettingsPicture;
+ private StatusStrip statusStrip;
+ private System.Windows.Forms.Timer timer1;
+ }
+}
\ No newline at end of file
diff --git a/CSS_Solution/Forms/MainForm.cs b/CSS_Solution/Forms/MainForm.cs
new file mode 100644
index 0000000..46971a6
--- /dev/null
+++ b/CSS_Solution/Forms/MainForm.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Linq;
+using System.Net.Http;
+using System.Reflection.Emit;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+namespace CSS_Solution.Forms
+{
+
+
+ partial class MainForm : Form
+ {
+ public MainForm()
+ {
+ InitializeComponent();
+ switch_panels = new List<(Panel, PictureBox)> { (HomePanel,HomePicture),(SetTaskPanel, SetTaskPicture), (RunTaskPanel, RunTaskPicture) ,(SettingsPanel,SettingsPicture)};
+ change_form(function_forms[0]);
+ }
+ //private void MainForm_Load(object sender, EventArgs e)
+ //{
+ // AllocConsole();
+ //}
+ //[DllImport("kernel32.dll", SetLastError = true)]
+ //[return: MarshalAs(UnmanagedType.Bool)]
+ //static extern bool AllocConsole();
+ private List