├── .gitignore
├── C#
├── Calculator
│ ├── Calculator.sln
│ └── Calculator
│ │ ├── App.config
│ │ ├── Calculator.csproj
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── History.Designer.cs
│ │ ├── History.cs
│ │ ├── History.resx
│ │ ├── LeftInfo.Designer.cs
│ │ ├── LeftInfo.cs
│ │ ├── LeftInfo.resx
│ │ ├── LeftMenu.Designer.cs
│ │ ├── LeftMenu.cs
│ │ ├── LeftMenu.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── Standard.Designer.cs
│ │ ├── Standard.cs
│ │ ├── Standard.resx
│ │ └── pic
│ │ ├── calculator_128px_1171129_easyicon.net.ico
│ │ ├── menu.png
│ │ ├── setting.png
│ │ └── trash.png
├── README.md
├── StrangeChat
│ ├── App2
│ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ ├── MainActivity.cs
│ │ ├── Maneger.cs
│ │ ├── Properties
│ │ │ ├── AndroidManifest.xml
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources
│ │ │ ├── AboutResources.txt
│ │ │ ├── Resource.Designer.cs
│ │ │ ├── drawable
│ │ │ │ ├── Icon.png
│ │ │ │ ├── back.png
│ │ │ │ ├── start.jpg
│ │ │ │ └── uesr.png
│ │ │ ├── layout
│ │ │ │ ├── Chat.axml
│ │ │ │ ├── Login.axml
│ │ │ │ ├── LoginPage.axml
│ │ │ │ ├── Main.axml
│ │ │ │ └── Register.axml
│ │ │ └── values
│ │ │ │ └── Strings.xml
│ │ └── StrangeChat.csproj
│ ├── StrangeChat.sln
│ ├── chatClient
│ │ ├── App.config
│ │ ├── Client.Designer.cs
│ │ ├── Client.cs
│ │ ├── Client.resx
│ │ ├── Maneger.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ └── chatClient.csproj
│ └── chatServer
│ │ ├── App.config
│ │ ├── Manager.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── Server.Designer.cs
│ │ ├── Server.cs
│ │ ├── Server.resx
│ │ └── chatServer.csproj
└── pic
│ ├── 1.PNG
│ ├── 2.PNG
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ └── 7.png
├── Computer Networks
├── ChatRoom
│ ├── ChatRoom.sln
│ ├── ChatRoom
│ │ ├── App.config
│ │ ├── ChatRoom.Designer.cs
│ │ ├── ChatRoom.cs
│ │ ├── ChatRoom.csproj
│ │ ├── ChatRoom.resx
│ │ ├── Login.Designer.cs
│ │ ├── Login.cs
│ │ ├── Login.resx
│ │ ├── Message.Designer.cs
│ │ ├── Message.cs
│ │ ├── Message.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── StatusEnum.cs
│ │ ├── UserName.Designer.cs
│ │ ├── UserName.cs
│ │ ├── UserName.resx
│ │ └── timg.jpg
│ └── Server
│ │ ├── App.config
│ │ ├── Maneger.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── Server.Designer.cs
│ │ ├── Server.cs
│ │ ├── Server.csproj
│ │ ├── Server.resx
│ │ └── StatusEnum.cs
├── Gobang
│ ├── Gobang.sln
│ ├── Gobang
│ │ ├── App.config
│ │ ├── ChessEnum.cs
│ │ ├── Gobang.Designer.cs
│ │ ├── Gobang.cs
│ │ ├── Gobang.csproj
│ │ ├── Gobang.resx
│ │ ├── GobangManeger.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── Referee.cs
│ │ ├── SendMessage.cs
│ │ └── StatusEnum.cs
│ └── Server
│ │ ├── App.config
│ │ ├── Maneger.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── Server.Designer.cs
│ │ ├── Server.cs
│ │ ├── Server.csproj
│ │ ├── Server.resx
│ │ └── StatusEnum.cs
├── PortScanner
│ ├── PortScanner.sln
│ └── PortScanner
│ │ ├── App.config
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── PortScanner.csproj
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ └── Resource
│ │ ├── 停止 (1).png
│ │ ├── 停止.png
│ │ ├── 开始 (1).png
│ │ └── 开始.png
├── README.md
└── pic
│ ├── 1.png
│ ├── 2.png
│ └── 3.png
├── Data Base
├── LibraryManagement
│ ├── LibraryManagement.sln
│ └── LibraryManagement
│ │ ├── AddBook.Designer.cs
│ │ ├── AddBook.cs
│ │ ├── AddBook.resx
│ │ ├── AddStudent.Designer.cs
│ │ ├── AddStudent.cs
│ │ ├── AddStudent.resx
│ │ ├── AdminForm.Designer.cs
│ │ ├── AdminForm.cs
│ │ ├── AdminForm.resx
│ │ ├── App.config
│ │ ├── Borrow.Designer.cs
│ │ ├── Borrow.cs
│ │ ├── Borrow.resx
│ │ ├── ChangePwd.Designer.cs
│ │ ├── ChangePwd.cs
│ │ ├── ChangePwd.resx
│ │ ├── DataType.cs
│ │ ├── Form1.Designer.cs
│ │ ├── LibraryManagement.csproj
│ │ ├── Login.cs
│ │ ├── Login.resx
│ │ ├── MainForm.Designer.cs
│ │ ├── MainForm.cs
│ │ ├── MainForm.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── SQLHelper.cs
│ │ ├── SearchBooks.Designer.cs
│ │ ├── SearchBooks.cs
│ │ ├── SearchBooks.resx
│ │ ├── SearchBorrow.Designer.cs
│ │ ├── SearchBorrow.cs
│ │ ├── SearchBorrow.resx
│ │ ├── SerchStudent.Designer.cs
│ │ ├── SerchStudent.cs
│ │ ├── SerchStudent.resx
│ │ └── pic
│ │ ├── AddStudent.jpg
│ │ ├── Addbook.jpg
│ │ ├── AdminForm.jpg
│ │ ├── Library.ico
│ │ ├── login.jpeg
│ │ └── mainform.jpg
├── README.md
└── pic
│ ├── 1.png
│ ├── 10.png
│ ├── 11.png
│ ├── 12.png
│ ├── 13.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ ├── 7.png
│ ├── 8.png
│ └── 9.png
├── Digital Image Processing
├── README.md
├── Untitled.m
├── image.bmp
└── pic
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ └── 6.png
├── Network Safety Course Design
├── DigitalSignature
│ ├── Client
│ │ ├── App.config
│ │ ├── Client.Designer.cs
│ │ ├── Client.cs
│ │ ├── Client.csproj
│ │ ├── Client.resx
│ │ ├── Program.cs
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ ├── DigitalSignature.sln
│ ├── DigitalSignature
│ │ ├── App.config
│ │ ├── DigitalSignature.csproj
│ │ ├── Encrypter.cs
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── StatusEnum.cs
│ │ ├── myMD5.cs
│ │ └── myRSA.cs
│ └── Server
│ │ ├── App.config
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── Server.Designer.cs
│ │ ├── Server.cs
│ │ ├── Server.csproj
│ │ └── Server.resx
├── README.md
└── pic
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ ├── 7.png
│ ├── 8.png
│ └── 9.png
├── Operating System
├── OS
│ ├── OS.sln
│ └── WindowsForms
│ │ ├── App.config
│ │ ├── BlockQueue.cs
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Form2.Designer.cs
│ │ ├── Form2.cs
│ │ ├── Form2.resx
│ │ ├── PCB.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── ReadyQueue.cs
│ │ ├── State.cs
│ │ └── WindowsForms.csproj
├── README.md
└── pic
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ ├── 7.png
│ └── 8.png
└── README.md
/C#/Calculator/Calculator.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calculator", "Calculator\Calculator.csproj", "{17E4D5F7-AE0F-4783-B349-BD75DE29638C}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {17E4D5F7-AE0F-4783-B349-BD75DE29638C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {17E4D5F7-AE0F-4783-B349-BD75DE29638C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {17E4D5F7-AE0F-4783-B349-BD75DE29638C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {17E4D5F7-AE0F-4783-B349-BD75DE29638C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/History.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace Calculator
12 | {
13 | public partial class History : UserControl
14 | {
15 | public History(string equation, string result)
16 | {
17 | InitializeComponent();
18 | this.label1.Text = equation;
19 | this.label2.Text = result;
20 | }
21 |
22 | private void History_MouseDown(object sender, MouseEventArgs e)
23 | {
24 | //this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
25 | this.BackColor = System.Drawing.Color.Silver;
26 | }
27 |
28 | private void History_MouseUp(object sender, MouseEventArgs e)
29 | {
30 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
31 | this.BackColor = System.Drawing.Color.LightGray;
32 | }
33 |
34 | private void History_MouseEnter(object sender, EventArgs e)
35 | {
36 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
37 | this.BackColor = System.Drawing.Color.LightGray;
38 | }
39 |
40 | private void History_MouseLeave(object sender, EventArgs e)
41 | {
42 | //this.BackColor = System.Drawing.SystemColors.Control;
43 | this.BackColor = System.Drawing.Color.White;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/LeftInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace Calculator
12 | {
13 | public partial class LeftInfo : UserControl
14 | {
15 | public LeftInfo()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void btn_Click(object sender, EventArgs e)
21 | {
22 | this.Dispose();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/LeftMenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace Calculator
12 | {
13 | public partial class LeftMenu : UserControl
14 | {
15 | public LeftMenu()
16 | {
17 | InitializeComponent();
18 |
19 | panelMenu.HorizontalScroll.Maximum = 0;
20 | panelMenu.AutoScroll = true;
21 | }
22 |
23 | private void button1_Click(object sender, EventArgs e)
24 | {
25 | this.Visible = false;
26 | }
27 |
28 | #region Menu Mouse Event
29 | private void Menu_MouseDown(object sender, MouseEventArgs e)
30 | {
31 | Label lab = new Label();
32 | lab = (Label)sender;
33 | //this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
34 | lab.BackColor = System.Drawing.Color.Silver;
35 | }
36 |
37 | private void Menu_MouseUp(object sender, MouseEventArgs e)
38 | {
39 | Label lab = new Label();
40 | lab = (Label)sender;
41 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
42 | lab.BackColor = System.Drawing.Color.LightGray;
43 | }
44 |
45 | private void Menu_MouseEnter(object sender, EventArgs e)
46 | {
47 | Label lab = new Label();
48 | lab = (Label)sender;
49 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
50 | lab.BackColor = System.Drawing.Color.LightGray;
51 | }
52 |
53 | private void Menu_MouseLeave(object sender, EventArgs e)
54 | {
55 | Label lab = new Label();
56 | lab = (Label)sender;
57 | //this.BackColor = System.Drawing.SystemColors.Control;
58 | lab.BackColor = System.Drawing.Color.Transparent;
59 | }
60 | #endregion
61 |
62 | #region Setting Mouse Event
63 | private void Setting_MouseDown(object sender, MouseEventArgs e)
64 | {
65 | panelSetting.BackColor = System.Drawing.Color.Silver;
66 | }
67 |
68 | private void Setting_MouseUp(object sender, MouseEventArgs e)
69 | {
70 | panelSetting.BackColor = System.Drawing.Color.LightGray;
71 | }
72 |
73 | private void Setting_MouseEnter(object sender, EventArgs e)
74 | {
75 | panelSetting.BackColor = System.Drawing.Color.LightGray;
76 | }
77 |
78 | private void Setting_MouseLeave(object sender, EventArgs e)
79 | {
80 | panelSetting.BackColor = System.Drawing.Color.Transparent;
81 | }
82 | #endregion
83 |
84 | private void labSetting_Click(object sender, EventArgs e)
85 | {
86 | LeftInfo li = new LeftInfo();
87 | li.Dock = System.Windows.Forms.DockStyle.Fill;
88 | this.Controls.Add(li);
89 | li.BringToFront();
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Calculator
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Calculator());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Calculator")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Calculator")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("17e4d5f7-ae0f-4783-b349-bd75de29638c")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Calculator.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Calculator.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
65 | ///
66 | internal static System.Drawing.Bitmap menu {
67 | get {
68 | object obj = ResourceManager.GetObject("menu", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
75 | ///
76 | internal static System.Drawing.Bitmap setting {
77 | get {
78 | object obj = ResourceManager.GetObject("setting", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
85 | ///
86 | internal static System.Drawing.Bitmap trash {
87 | get {
88 | object obj = ResourceManager.GetObject("trash", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Calculator.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/pic/calculator_128px_1171129_easyicon.net.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/Calculator/Calculator/pic/calculator_128px_1171129_easyicon.net.ico
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/pic/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/Calculator/Calculator/pic/menu.png
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/pic/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/Calculator/Calculator/pic/setting.png
--------------------------------------------------------------------------------
/C#/Calculator/Calculator/pic/trash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/Calculator/Calculator/pic/trash.png
--------------------------------------------------------------------------------
/C#/README.md:
--------------------------------------------------------------------------------
1 | # C Sharp
2 |
3 | ## 高仿计算器
4 |
5 | 练习使用UserControl和布局。
6 |
7 |
8 |
9 |
10 |
11 |
12 | ## Xamarin
13 |
14 | 学习使用Xamarin,简易聊天软件,没有实现注册和登陆功能,点击开始聊天后随机指定聊天对象,结束聊天后不保存聊天对象。
15 | 模仿[omegle](http://www.omegle.com/)。
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Maneger.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Net;
6 | using System.Net.Sockets;
7 | using System.Text;
8 | using System.Threading;
9 | using System.Threading.Tasks;
10 |
11 | namespace StrangeChat
12 | {
13 | class Maneger : Activity
14 | {
15 | Socket socket;
16 | Thread thread;
17 |
18 | public delegate void DGSendMsg(string str);
19 | DGSendMsg dgSendMsg;
20 |
21 | public Maneger(DGSendMsg dgSendMsg)
22 | {
23 | this.dgSendMsg = dgSendMsg;
24 | //IPAddress ip = IPAddress.Parse("123.206.24.215");
25 | //IPAddress ip = IPAddress.Parse("127.0.0.1");
26 | IPAddress ip = IPAddress.Parse("10.0.2.22");
27 | int port = 8990;
28 | socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
29 | IPEndPoint endpoint = new IPEndPoint(ip, port);
30 | socket.Connect(endpoint);
31 |
32 | thread = new Thread(ReceMsg);
33 | thread.IsBackground = true;//设置后台线程
34 | thread.Start();
35 |
36 | socket.Send(Encoding.UTF8.GetBytes("!--LOGIN--!"));
37 | dgSendMsg("正在匹配,请稍后...");
38 | }
39 |
40 | private void ReceMsg()
41 | {
42 | //FIXED: RunOnUiThread
43 | try
44 | {
45 | while (true)
46 | {
47 | byte[] buffer = new byte[1024 * 1024];
48 | int length = socket.Receive(buffer);
49 | string ReceiveMsg = Encoding.UTF8.GetString(buffer, 0, length);
50 | if (ReceiveMsg == "!--LOGIN SUCCESS--!")
51 | {
52 | RunOnUiThread(() => dgSendMsg("匹配成功。"));
53 | }
54 | else if (ReceiveMsg == "!--OFFLINE--!")
55 | {
56 | RunOnUiThread(() => dgSendMsg("正在重新匹配,请稍后..."));
57 | }
58 | else
59 | {
60 | RunOnUiThread(() => dgSendMsg("[RECV] " + ReceiveMsg));
61 | }
62 | }
63 | }
64 | catch (Exception ex)
65 | {
66 | byte[] buffer = Encoding.UTF8.GetBytes("Rcv Err " + ex.Message);
67 | socket.Send(buffer);//发送新数组中的数据
68 | throw;
69 | }
70 | }
71 |
72 | public void finished()
73 | {
74 | //this.thread.Abort();
75 | //this.socket.Close();
76 | }
77 |
78 | public void SendMsg(string str)
79 | {
80 | try
81 | {
82 | dgSendMsg("[SEND] " + str);
83 | byte[] buffer = Encoding.UTF8.GetBytes(str);
84 | socket.Send(buffer);//发送新数组中的数据
85 | }
86 | catch (Exception ex)
87 | {
88 | byte[] buffer = Encoding.UTF8.GetBytes("Send Err " + ex.Message);
89 | socket.Send(buffer);//发送新数组中的数据
90 | throw;
91 | }
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("App2")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("App2")]
14 | [assembly: AssemblyCopyright("Copyright © 2016")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/drawable/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/StrangeChat/App2/Resources/drawable/Icon.png
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/drawable/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/StrangeChat/App2/Resources/drawable/back.png
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/drawable/start.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/StrangeChat/App2/Resources/drawable/start.jpg
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/drawable/uesr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/StrangeChat/App2/Resources/drawable/uesr.png
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/layout/Chat.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
13 |
20 |
31 |
38 |
39 |
52 |
58 |
64 |
69 |
70 |
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/layout/Login.axml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
17 |
25 |
26 |
33 |
40 |
47 |
48 |
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/layout/Main.axml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
17 |
25 |
26 |
33 |
39 |
40 |
--------------------------------------------------------------------------------
/C#/StrangeChat/App2/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, Click Me!
4 | App2
5 |
6 |
--------------------------------------------------------------------------------
/C#/StrangeChat/StrangeChat.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chatServer", "chatServer\chatServer.csproj", "{E403FB35-9A43-4FB6-B3DA-834BA53E65C9}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chatClient", "chatClient\chatClient.csproj", "{9F50C04A-650E-4FD2-BD59-A10C4C6C0BF3}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StrangeChat", "App2\StrangeChat.csproj", "{B5EEBCF5-C9C1-443F-B563-D1A8E7FE2878}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {E403FB35-9A43-4FB6-B3DA-834BA53E65C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {E403FB35-9A43-4FB6-B3DA-834BA53E65C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {E403FB35-9A43-4FB6-B3DA-834BA53E65C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {E403FB35-9A43-4FB6-B3DA-834BA53E65C9}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {9F50C04A-650E-4FD2-BD59-A10C4C6C0BF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {9F50C04A-650E-4FD2-BD59-A10C4C6C0BF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {9F50C04A-650E-4FD2-BD59-A10C4C6C0BF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {9F50C04A-650E-4FD2-BD59-A10C4C6C0BF3}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {B5EEBCF5-C9C1-443F-B563-D1A8E7FE2878}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {B5EEBCF5-C9C1-443F-B563-D1A8E7FE2878}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {B5EEBCF5-C9C1-443F-B563-D1A8E7FE2878}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
29 | {B5EEBCF5-C9C1-443F-B563-D1A8E7FE2878}.Release|Any CPU.ActiveCfg = Release|Any CPU
30 | {B5EEBCF5-C9C1-443F-B563-D1A8E7FE2878}.Release|Any CPU.Build.0 = Release|Any CPU
31 | {B5EEBCF5-C9C1-443F-B563-D1A8E7FE2878}.Release|Any CPU.Deploy.0 = Release|Any CPU
32 | EndGlobalSection
33 | GlobalSection(SolutionProperties) = preSolution
34 | HideSolutionNode = FALSE
35 | EndGlobalSection
36 | EndGlobal
37 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/Client.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace chatClient
12 | {
13 | public partial class Client : Form
14 | {
15 | public Client()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | Maneger man;
21 |
22 | private void Client_Load(object sender, EventArgs e)
23 | {
24 | CheckForIllegalCrossThreadCalls = false;
25 | man = new Maneger(AddMsg);
26 | }
27 |
28 | void AddMsg(string str)
29 | {
30 | if (str.Equals("正在重新匹配,请稍后...") || str.Equals("匹配成功。"))
31 | {
32 | tbMsgAll.Text = "";
33 | }
34 | tbMsgAll.AppendText("[TIME] " + DateTime.Now.ToString() + "\r\n");
35 | tbMsgAll.AppendText(str + "\r\n\r\n");
36 | }
37 |
38 | private void button_Click(object sender, EventArgs e)
39 | {
40 | man.SendMsg(tbMsg.Text);
41 | tbMsg.Text = "";
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/Maneger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Net;
5 | using System.Net.Sockets;
6 | using System.Text;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 |
10 | namespace chatClient
11 | {
12 | class Maneger
13 | {
14 | Socket socket;
15 | Thread thread;
16 |
17 | public delegate void DGSendMsg(string str);
18 | DGSendMsg dgSendMsg;
19 |
20 | public Maneger(DGSendMsg dgSendMsg)
21 | {
22 | this.dgSendMsg = dgSendMsg;
23 | //IPAddress ip = IPAddress.Parse("123.206.24.215");
24 | IPAddress ip = IPAddress.Parse("127.0.0.1");
25 | int port = 8990;
26 | socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
27 | IPEndPoint endpoint = new IPEndPoint(ip, port);
28 | socket.Connect(endpoint);
29 |
30 | thread = new Thread(ReceMsg);
31 | thread.IsBackground = true;//设置后台线程
32 | thread.Start();
33 |
34 | socket.Send(Encoding.UTF8.GetBytes("!--LOGIN--!"));
35 | dgSendMsg("正在匹配,请稍后...");
36 | }
37 |
38 | private void ReceMsg()
39 | {
40 | while (true)
41 | {
42 | byte[] buffer = new byte[1024 * 1024];
43 | int length = socket.Receive(buffer);
44 | string ReceiveMsg = Encoding.UTF8.GetString(buffer, 0, length);
45 | if (ReceiveMsg == "!--LOGIN SUCCESS--!")
46 | {
47 | dgSendMsg("匹配成功。");
48 | }
49 | else if (ReceiveMsg == "!--OFFLINE--!")
50 | {
51 | dgSendMsg("正在重新匹配,请稍后...");
52 | }
53 | else
54 | {
55 | dgSendMsg("[RECV] " + ReceiveMsg);
56 | }
57 | }
58 | }
59 |
60 | public void SendMsg(string str)
61 | {
62 | dgSendMsg("[SEND] " + str);
63 | byte[] buffer = Encoding.UTF8.GetBytes(str);
64 | socket.Send(buffer);//发送新数组中的数据
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace chatClient
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Client());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("chatClient")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("chatClient")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("9f50c04a-650e-4fd2-bd59-a10c4c6c0bf3")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace chatClient.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("chatClient.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace chatClient.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatClient/chatClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {9F50C04A-650E-4FD2-BD59-A10C4C6C0BF3}
8 | WinExe
9 | Properties
10 | chatClient
11 | chatClient
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | Form
51 |
52 |
53 | Client.cs
54 |
55 |
56 |
57 |
58 |
59 | Client.cs
60 |
61 |
62 | ResXFileCodeGenerator
63 | Resources.Designer.cs
64 | Designer
65 |
66 |
67 | True
68 | Resources.resx
69 |
70 |
71 | SettingsSingleFileGenerator
72 | Settings.Designer.cs
73 |
74 |
75 | True
76 | Settings.settings
77 | True
78 |
79 |
80 |
81 |
82 |
83 |
84 |
91 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatServer/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatServer/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace chatServer
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Server());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatServer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("chatServer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("chatServer")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("e403fb35-9a43-4fb6-b3da-834ba53e65c9")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatServer/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace chatServer.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("chatServer.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatServer/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace chatServer.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatServer/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/C#/StrangeChat/chatServer/chatServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {E403FB35-9A43-4FB6-B3DA-834BA53E65C9}
8 | WinExe
9 | Properties
10 | chatServer
11 | chatServer
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | Form
52 |
53 |
54 | Server.cs
55 |
56 |
57 |
58 |
59 | ResXFileCodeGenerator
60 | Resources.Designer.cs
61 | Designer
62 |
63 |
64 | True
65 | Resources.resx
66 |
67 |
68 | Server.cs
69 |
70 |
71 | SettingsSingleFileGenerator
72 | Settings.Designer.cs
73 |
74 |
75 | True
76 | Settings.settings
77 | True
78 |
79 |
80 |
81 |
82 |
83 |
84 |
91 |
--------------------------------------------------------------------------------
/C#/pic/1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/pic/1.PNG
--------------------------------------------------------------------------------
/C#/pic/2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/pic/2.PNG
--------------------------------------------------------------------------------
/C#/pic/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/pic/3.png
--------------------------------------------------------------------------------
/C#/pic/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/pic/4.png
--------------------------------------------------------------------------------
/C#/pic/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/pic/5.png
--------------------------------------------------------------------------------
/C#/pic/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/pic/6.png
--------------------------------------------------------------------------------
/C#/pic/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/C#/pic/7.png
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatRoom", "ChatRoom\ChatRoom.csproj", "{3BABEDB7-4BB3-480D-91D8-011462CB6305}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{8214CCED-943F-45FA-92D5-E7197F40BEC3}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3BABEDB7-4BB3-480D-91D8-011462CB6305}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {3BABEDB7-4BB3-480D-91D8-011462CB6305}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {3BABEDB7-4BB3-480D-91D8-011462CB6305}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {3BABEDB7-4BB3-480D-91D8-011462CB6305}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Login.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace ChatRoom
12 | {
13 | public partial class Login : Form
14 | {
15 | public Login()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void button1_Click(object sender, EventArgs e)
21 | {
22 | if (this.textBox1.Text.Trim() != "")
23 | {
24 | byte[] arr = null;
25 | arr = System.Text.Encoding.UTF8.GetBytes(textBox1.Text.Trim());
26 | if (arr.Length > 50)
27 | {
28 | MessageBox.Show("用户名过长");
29 | }
30 | else
31 | {
32 | ChatRoom f = new ChatRoom(textBox1.Text.Trim());
33 | f.Show();
34 | this.Hide();
35 | }
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Message.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChatRoom
2 | {
3 | partial class Message
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.label2 = new System.Windows.Forms.Label();
33 | this.SuspendLayout();
34 | //
35 | // label1
36 | //
37 | this.label1.BackColor = System.Drawing.Color.Transparent;
38 | this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
39 | this.label1.Location = new System.Drawing.Point(5, 0);
40 | this.label1.Margin = new System.Windows.Forms.Padding(15, 0, 15, 0);
41 | this.label1.Name = "label1";
42 | this.label1.Size = new System.Drawing.Size(420, 23);
43 | this.label1.TabIndex = 0;
44 | this.label1.Text = "1234567890";
45 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
46 | this.label1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.History_MouseDown);
47 | this.label1.MouseEnter += new System.EventHandler(this.History_MouseEnter);
48 | this.label1.MouseLeave += new System.EventHandler(this.History_MouseLeave);
49 | this.label1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.History_MouseUp);
50 | //
51 | // label2
52 | //
53 | this.label2.BackColor = System.Drawing.Color.Transparent;
54 | this.label2.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
55 | this.label2.Location = new System.Drawing.Point(4, 21);
56 | this.label2.Name = "label2";
57 | this.label2.Size = new System.Drawing.Size(421, 29);
58 | this.label2.TabIndex = 1;
59 | this.label2.Text = "1234567890";
60 | this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
61 | this.label2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.History_MouseDown);
62 | this.label2.MouseEnter += new System.EventHandler(this.History_MouseEnter);
63 | this.label2.MouseLeave += new System.EventHandler(this.History_MouseLeave);
64 | this.label2.MouseUp += new System.Windows.Forms.MouseEventHandler(this.History_MouseUp);
65 | //
66 | // Message
67 | //
68 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
69 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
70 | this.BackColor = System.Drawing.Color.White;
71 | this.Controls.Add(this.label2);
72 | this.Controls.Add(this.label1);
73 | this.Name = "Message";
74 | this.Size = new System.Drawing.Size(440, 50);
75 | this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.History_MouseDown);
76 | this.MouseEnter += new System.EventHandler(this.History_MouseEnter);
77 | this.MouseLeave += new System.EventHandler(this.History_MouseLeave);
78 | this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.History_MouseUp);
79 | this.ResumeLayout(false);
80 |
81 | }
82 |
83 | #endregion
84 |
85 | private System.Windows.Forms.Label label1;
86 | private System.Windows.Forms.Label label2;
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Message.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace ChatRoom
12 | {
13 | public partial class Message : UserControl
14 | {
15 | private Message()
16 | {
17 | InitializeComponent();
18 | this.label1.ForeColor = Color.ForestGreen;
19 |
20 | CheckForIllegalCrossThreadCalls = false;
21 | }
22 |
23 | public Message(string name, string msg, bool b) : this()
24 | {
25 | this.label1.Text = name +" "+ DateTime.Now.ToString();
26 | this.label2.Text = msg;
27 | if (b == true)
28 | {
29 | this.label1.TextAlign = ContentAlignment.MiddleRight;
30 | this.label1.ForeColor = Color.Red;
31 |
32 | this.label2.TextAlign = ContentAlignment.MiddleRight;
33 | }
34 | }
35 |
36 | private void History_MouseDown(object sender, MouseEventArgs e)
37 | {
38 | //this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
39 | this.BackColor = System.Drawing.Color.Silver;
40 | }
41 |
42 | private void History_MouseUp(object sender, MouseEventArgs e)
43 | {
44 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
45 | this.BackColor = System.Drawing.Color.LightGray;
46 | }
47 |
48 | private void History_MouseEnter(object sender, EventArgs e)
49 | {
50 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
51 | this.BackColor = System.Drawing.Color.LightGray;
52 | }
53 |
54 | private void History_MouseLeave(object sender, EventArgs e)
55 | {
56 | //this.BackColor = System.Drawing.SystemColors.Control;
57 | this.BackColor = System.Drawing.Color.White;
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace ChatRoom
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Login());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("ChatRoom")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ChatRoom")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("3babedb7-4bb3-480d-91d8-011462cb6305")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ChatRoom.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ChatRoom.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
65 | ///
66 | internal static System.Drawing.Bitmap timg {
67 | get {
68 | object obj = ResourceManager.GetObject("timg", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ChatRoom.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/StatusEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace ChatRoom
8 | {
9 | enum StatusEnum
10 | {
11 | login,
12 | users,
13 | message
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/UserName.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ChatRoom
2 | {
3 | partial class UserName
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label = new System.Windows.Forms.Label();
32 | this.SuspendLayout();
33 | //
34 | // label
35 | //
36 | this.label.BackColor = System.Drawing.Color.Transparent;
37 | this.label.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
38 | this.label.Location = new System.Drawing.Point(0, 0);
39 | this.label.Name = "label";
40 | this.label.Size = new System.Drawing.Size(146, 20);
41 | this.label.TabIndex = 2;
42 | this.label.Text = "1234567890";
43 | this.label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
44 | this.label.MouseDown += new System.Windows.Forms.MouseEventHandler(this.History_MouseDown);
45 | this.label.MouseEnter += new System.EventHandler(this.History_MouseEnter);
46 | this.label.MouseLeave += new System.EventHandler(this.History_MouseLeave);
47 | this.label.MouseUp += new System.Windows.Forms.MouseEventHandler(this.History_MouseUp);
48 | //
49 | // UserName
50 | //
51 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
52 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
53 | this.Controls.Add(this.label);
54 | this.Name = "UserName";
55 | this.Size = new System.Drawing.Size(146, 20);
56 | this.ResumeLayout(false);
57 |
58 | }
59 |
60 | #endregion
61 |
62 | private System.Windows.Forms.Label label;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/UserName.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace ChatRoom
12 | {
13 | public partial class UserName : UserControl
14 | {
15 | private UserName()
16 | {
17 | InitializeComponent();
18 |
19 | CheckForIllegalCrossThreadCalls = false;
20 | }
21 |
22 | public UserName(string name) : this()
23 | {
24 | this.label.Text = name;
25 | }
26 |
27 | private void History_MouseDown(object sender, MouseEventArgs e)
28 | {
29 | //this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
30 | this.BackColor = System.Drawing.Color.Silver;
31 | }
32 |
33 | private void History_MouseUp(object sender, MouseEventArgs e)
34 | {
35 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
36 | this.BackColor = System.Drawing.Color.LightGray;
37 | }
38 |
39 | private void History_MouseEnter(object sender, EventArgs e)
40 | {
41 | //this.BackColor = System.Drawing.SystemColors.ControlDark;
42 | this.BackColor = System.Drawing.Color.LightGray;
43 | }
44 |
45 | private void History_MouseLeave(object sender, EventArgs e)
46 | {
47 | //this.BackColor = System.Drawing.SystemColors.Control;
48 | this.BackColor = System.Drawing.Color.White;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/ChatRoom/timg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/ChatRoom/ChatRoom/timg.jpg
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Server
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Server());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Server")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Server")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("8214cced-943f-45fa-92d5-e7197f40bec3")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Server.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Server.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Server.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/Server.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}
8 | WinExe
9 | Properties
10 | Server
11 | Server
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | Form
52 |
53 |
54 | Server.cs
55 |
56 |
57 |
58 |
59 |
60 | ResXFileCodeGenerator
61 | Resources.Designer.cs
62 | Designer
63 |
64 |
65 | True
66 | Resources.resx
67 |
68 |
69 | Server.cs
70 |
71 |
72 | SettingsSingleFileGenerator
73 | Settings.Designer.cs
74 |
75 |
76 | True
77 | Settings.settings
78 | True
79 |
80 |
81 |
82 |
83 |
84 |
85 |
92 |
--------------------------------------------------------------------------------
/Computer Networks/ChatRoom/Server/StatusEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Server
8 | {
9 | enum StatusEnum
10 | {
11 | login, //登陆
12 | users, //获取用户列表
13 | message //普通消息
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gobang", "Gobang\Gobang.csproj", "{C7BB986B-3342-443B-9245-67EF38AC4A00}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{8214CCED-943F-45FA-92D5-E7197F40BEC3}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {C7BB986B-3342-443B-9245-67EF38AC4A00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {C7BB986B-3342-443B-9245-67EF38AC4A00}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {C7BB986B-3342-443B-9245-67EF38AC4A00}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {C7BB986B-3342-443B-9245-67EF38AC4A00}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/ChessEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Gobang
9 | {
10 | enum ChessEnum
11 | {
12 | none,
13 | white,
14 | black
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/GobangManeger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Net;
5 | using System.Net.Sockets;
6 | using System.Text;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace Gobang
12 | {
13 | class GobangManeger
14 | {
15 | Socket socket;
16 | Thread thread;
17 |
18 | #region delegete
19 | public delegate void DGReceiveMessage(byte[] buffer, int length);
20 | DGReceiveMessage dgReceiveMessage;
21 | #endregion
22 |
23 | public GobangManeger(DGReceiveMessage dgReceiveMessage)
24 | {
25 | this.dgReceiveMessage = dgReceiveMessage;
26 |
27 | #region socket
28 | //IPAddress ip = IPAddress.Parse("123.206.24.215"); //服务器
29 | IPAddress ip = IPAddress.Parse("127.0.0.1"); //本机
30 | int port = 8990;
31 | socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
32 | IPEndPoint endpoint = new IPEndPoint(ip, port);
33 | socket.Connect(endpoint);
34 | #endregion
35 |
36 | thread = new Thread(ReceMsg);
37 | thread.IsBackground = true;//设置后台线程
38 | thread.Start();
39 |
40 | byte[] buffer = SendMessage.MakeArrWithFlag(0);
41 |
42 | socket.Send(buffer);
43 | }
44 |
45 | private void ReceMsg()
46 | {
47 | while (true)
48 | {
49 | try
50 | {
51 | byte[] buffer = new byte[1024 * 1024];
52 | int length = socket.Receive(buffer);
53 |
54 | this.dgReceiveMessage(buffer, length);
55 | }
56 | catch (Exception e)
57 | {
58 | MessageBox.Show("ReceMsg throw :" + e.Message);
59 | }
60 | }
61 | }
62 |
63 | public void SendMsg(string str)
64 | {
65 | byte[] buffer = SendMessage.MakeArrWithFlag(str);
66 | socket.Send(buffer);
67 | }
68 |
69 | public void SendCheckerboard(int flag, int x, int y, int[,] cboard)
70 | {
71 | byte[] buffer = SendMessage.MakeArrWithFlag(flag, x, y, cboard);
72 | // 先发送再处理
73 | socket.Send(buffer);
74 | this.dgReceiveMessage(buffer, buffer.Length);
75 | }
76 |
77 | public void Dispose()
78 | {
79 | this.socket.Close();
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Gobang
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Gobang());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Gobang")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Gobang")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("c7bb986b-3342-443b-9245-67ef38ac4a00")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Gobang.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Gobang.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Gobang.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/Referee.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Gobang
8 | {
9 | ///
10 | /// 落子后判断输赢
11 | ///
12 | class Referee
13 | {
14 | private const int CHESS = 5;
15 | private static int[,] cboard;
16 | public static bool Result(int flag, int x, int y, int[,] cboard)
17 | {
18 | Referee.cboard = cboard;
19 | int temp;
20 | // 竖
21 | temp = cc(0, -1, flag, x, y, 0) + cc(0, 1, flag, x, y, 0) - 1;
22 | if (temp == CHESS) { return true; }
23 | // 横
24 | temp = cc(-1, 0, flag, x, y, 0) + cc(1, 0, flag, x, y, 0) - 1;
25 | if (temp == CHESS) { return true; }
26 | // 右斜
27 | temp = cc(-1, -1, flag, x, y, 0) + cc(1, 1, flag, x, y, 0) - 1;
28 | if (temp == CHESS) { return true; }
29 | // 左斜
30 | temp = cc(1, -1, flag, x, y, 0) + cc(-1, 1, flag, x, y, 0) - 1;
31 | if (temp == CHESS) { return true; }
32 |
33 | return false;
34 | }
35 |
36 | private static int cc(int posx, int posy, int flag, int x, int y, int tot)
37 | {
38 | if (cboard[x, y] == flag)
39 | {
40 | return cc(posx, posy, flag, x + posx, y + posy, tot + 1);
41 | }
42 | else
43 | return tot;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Gobang/StatusEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Gobang
8 | {
9 | enum StatusEnum
10 | {
11 | login,
12 | wait,
13 | getwhite,
14 | getblack,
15 | whitechess,
16 | blackchess,
17 | whitewin,
18 | blackwin,
19 | message
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Server
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Server());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Server")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Server")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("8214cced-943f-45fa-92d5-e7197f40bec3")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Server.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Server.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Server.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/Server.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8214CCED-943F-45FA-92D5-E7197F40BEC3}
8 | WinExe
9 | Properties
10 | Server
11 | Server
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | Form
52 |
53 |
54 | Server.cs
55 |
56 |
57 |
58 |
59 |
60 | ResXFileCodeGenerator
61 | Resources.Designer.cs
62 | Designer
63 |
64 |
65 | True
66 | Resources.resx
67 |
68 |
69 | Server.cs
70 |
71 |
72 | SettingsSingleFileGenerator
73 | Settings.Designer.cs
74 |
75 |
76 | True
77 | Settings.settings
78 | True
79 |
80 |
81 |
82 |
83 |
84 |
85 |
92 |
--------------------------------------------------------------------------------
/Computer Networks/Gobang/Server/StatusEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Server
8 | {
9 | enum StatusEnum
10 | {
11 | login,
12 | wait,
13 | getwhite,
14 | getblack,
15 | whitechess,
16 | blackchess,
17 | whitewin,
18 | blackwin,
19 | message
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortScanner", "PortScanner\PortScanner.csproj", "{C5CE3EC4-B258-4B21-8109-537ED0815763}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {C5CE3EC4-B258-4B21-8109-537ED0815763}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {C5CE3EC4-B258-4B21-8109-537ED0815763}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {C5CE3EC4-B258-4B21-8109-537ED0815763}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {C5CE3EC4-B258-4B21-8109-537ED0815763}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace PortScanner
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("PortScanner")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("PortScanner")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("c5ce3ec4-b258-4b21-8109-537ed0815763")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PortScanner.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PortScanner.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
65 | ///
66 | internal static System.Drawing.Bitmap 停止 {
67 | get {
68 | object obj = ResourceManager.GetObject("停止", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
75 | ///
76 | internal static System.Drawing.Bitmap 停止__1_ {
77 | get {
78 | object obj = ResourceManager.GetObject("停止__1_", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
85 | ///
86 | internal static System.Drawing.Bitmap 开始 {
87 | get {
88 | object obj = ResourceManager.GetObject("开始", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
95 | ///
96 | internal static System.Drawing.Bitmap 开始__1_ {
97 | get {
98 | object obj = ResourceManager.GetObject("开始__1_", resourceCulture);
99 | return ((System.Drawing.Bitmap)(obj));
100 | }
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PortScanner.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Resource/停止 (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/PortScanner/PortScanner/Resource/停止 (1).png
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Resource/停止.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/PortScanner/PortScanner/Resource/停止.png
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Resource/开始 (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/PortScanner/PortScanner/Resource/开始 (1).png
--------------------------------------------------------------------------------
/Computer Networks/PortScanner/PortScanner/Resource/开始.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/PortScanner/PortScanner/Resource/开始.png
--------------------------------------------------------------------------------
/Computer Networks/README.md:
--------------------------------------------------------------------------------
1 | # 计算机网络
2 |
3 | ## 五子棋
4 | 
5 |
6 | ## 聊天室
7 | 
8 |
9 | ## 端口扫描
10 | 
--------------------------------------------------------------------------------
/Computer Networks/pic/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/pic/1.png
--------------------------------------------------------------------------------
/Computer Networks/pic/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/pic/2.png
--------------------------------------------------------------------------------
/Computer Networks/pic/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Computer Networks/pic/3.png
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryManagement", "LibraryManagement\LibraryManagement.csproj", "{EF771139-DEE1-438C-BB29-465D76DE7900}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {EF771139-DEE1-438C-BB29-465D76DE7900}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {EF771139-DEE1-438C-BB29-465D76DE7900}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {EF771139-DEE1-438C-BB29-465D76DE7900}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {EF771139-DEE1-438C-BB29-465D76DE7900}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/Borrow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Data.SqlClient;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace LibraryManagement
13 | {
14 | public partial class Borrow : Form
15 | {
16 | string id;
17 |
18 | public Borrow()
19 | {
20 | InitializeComponent();
21 | }
22 |
23 | public Borrow(string id) : this()
24 | {
25 | this.id = id;
26 | this.labID.Text = id;
27 | }
28 |
29 | private void button2_Click(object sender, EventArgs e)
30 | {
31 | this.Close();
32 | }
33 |
34 | private void btnSearch_Click(object sender, EventArgs e)
35 | {
36 | DataTable dt = SQLHelper.ExecuteQuery("select * from Books where bName=@name", new System.Data.SqlClient.SqlParameter("@name", this.textBox1.Text.Trim()));
37 | if (dt.Rows.Count == 0)
38 | {
39 | this.labISBN.Text = "不存在";
40 | }
41 | else
42 | {
43 | this.labISBN.Text = dt.Rows[0]["bISBN"].ToString();
44 | }
45 | }
46 |
47 | private void button1_Click(object sender, EventArgs e)
48 | {
49 | if (this.labISBN.Text == "" || this.labISBN.Text == "不存在")
50 | return;
51 | DialogResult dr = MessageBox.Show("是否借书?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
52 | if (dr == DialogResult.OK)
53 | {
54 | DataTable dtNum = SQLHelper.ExecuteQuery("select bNumber from Books where bISBN=@isbn", new SqlParameter("@isbn", this.labISBN.Text.Trim()));
55 | int num = Convert.ToInt32(dtNum.Rows[0]["bNumber"].ToString());
56 | if (num == 0)
57 | {
58 | MessageBox.Show("未成功,此书已无剩余。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);
59 | }
60 | else
61 | {
62 | SQLHelper.ExecuteNonQuery("update Books set bNumber=@number where bISBN=@bISBN",
63 | new SqlParameter("@number", num - 1),
64 | new SqlParameter("@bISBN", labISBN.Text.Trim()));
65 | int res = SQLHelper.ExecuteNonQuery("insert into Borrow values('" + labID.Text.Trim() + "','" + labISBN.Text.Trim() + "',GETDATE())");
66 | if (res == 0)
67 | MessageBox.Show("未成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);
68 | else
69 | {
70 | MessageBox.Show("成功", "提示", MessageBoxButtons.OK);
71 | this.Close();
72 | }
73 | }
74 | }
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/ChangePwd.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Data.SqlClient;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace LibraryManagement
13 | {
14 | public partial class ChangePwd : Form
15 | {
16 | MainForm m;
17 |
18 | public ChangePwd()
19 | {
20 | InitializeComponent();
21 | }
22 | public ChangePwd(MainForm m) : this()
23 | {
24 | this.m = m;
25 | }
26 | public ChangePwd(MainForm m, string stuID) : this()
27 | {
28 | this.m = m;
29 | this.txtId.Text = stuID;
30 | this.txtId.Enabled = false;
31 | }
32 |
33 | public ChangePwd(string stuID) : this()
34 | {
35 | this.txtId.Text = stuID;
36 | this.txtId.Enabled = false;
37 | }
38 |
39 | private void button2_Click(object sender, EventArgs e)
40 | {
41 | this.Close();
42 | }
43 |
44 | private void button1_Click(object sender, EventArgs e)
45 | {
46 | txtId.Text = txtId.Text.Trim();
47 | txtPwd.Text = txtPwd.Text.Trim();
48 | txtPwd2.Text = txtPwd2.Text.Trim();
49 | if (txtId.Text == "" || txtPwd.Text == "" || txtPwd2.Text == "")
50 | {
51 | return;
52 | }
53 | if (this.txtId.Enabled == true)
54 | {
55 |
56 | }
57 | if (this.txtPwd.Text != this.txtPwd2.Text)
58 | {
59 | MessageBox.Show("密码输入不一致,请重新输入。", "失败", MessageBoxButtons.OK, MessageBoxIcon.Warning);
60 | txtPwd.Text = "";
61 | txtPwd2.Text = "";
62 | return;
63 | }
64 | int res = SQLHelper.ExecuteNonQuery("update Login set Password=@pwd where ID=@id",
65 | new SqlParameter("@pwd", txtPwd.Text),
66 | new SqlParameter("@id", txtId.Text));
67 | if (res == 1)
68 | {
69 | MessageBox.Show("修改成功。", "成功");
70 | if (m != null)
71 | m.Close();
72 | else
73 | this.Close();
74 | }
75 | else
76 | {
77 | MessageBox.Show("修改失败,请再次尝试。", "失败", MessageBoxButtons.OK, MessageBoxIcon.Warning);
78 | txtPwd.Text = "";
79 | txtPwd2.Text = "";
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/DataType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace LibraryManagement
8 | {
9 | public enum DataType
10 | {
11 | Books,
12 | Students,
13 | Borrow
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/Login.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Data.SqlClient;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace LibraryManagement
13 | {
14 | public partial class Login : Form
15 | {
16 | public Login()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | private void btnLogin_Click(object sender, EventArgs e)
22 | {
23 | if (tbPwd.Text == "" || tbID.Text == "")
24 | {
25 | return;
26 | }
27 | // admin
28 | DataTable dt = SQLHelper.ExecuteQuery("select * from Admin where ID=@name and Password=@pwd",
29 | new SqlParameter("@name", this.tbID.Text),
30 | new SqlParameter("@pwd", this.tbPwd.Text));
31 | if (dt.DefaultView.Count == 1)
32 | {
33 | AdminForm f = new AdminForm(this);
34 | f.Show();
35 | this.Hide();
36 | }
37 | else
38 | {
39 | // student
40 | dt = SQLHelper.ExecuteQuery("select * from Login where ID=@name and Password=@pwd",
41 | new SqlParameter("@name", this.tbID.Text),
42 | new SqlParameter("@pwd", this.tbPwd.Text));
43 | if (dt.DefaultView.Count == 1)
44 | {
45 | MainForm mf = new MainForm(this, dt.Rows[0]["ID"].ToString());
46 | mf.Show();
47 | this.Hide();
48 | }
49 | else
50 | {
51 | MessageBox.Show("您输入的账号或密码有误,请核对后仔细输入。", "失败", MessageBoxButtons.OK, MessageBoxIcon.Warning);
52 | this.tbPwd.Text = "";
53 | }
54 | }
55 | }
56 |
57 | private void timer1_Tick(object sender, EventArgs e)
58 | {
59 | this.label.Left = (this.label.Left + 1) % 450;
60 | }
61 |
62 | public void back()
63 | {
64 | this.Show();
65 | this.tbPwd.Text = "";
66 | this.tbID.Text = "";
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/MainForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Data.SqlClient;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace LibraryManagement
13 | {
14 | public partial class MainForm : Form
15 | {
16 | DataTable dtBooks;
17 | DataTable dt;
18 | Login l;
19 |
20 | public MainForm(Login l, string strID)
21 | {
22 | InitializeComponent();
23 | this.l = l;
24 | dt = SQLHelper.ExecuteQuery("select * from Student where sID=@id", new SqlParameter("@id", strID));
25 | dtBooks = SQLHelper.ExecuteQuery("select name,date,residue from Books_Borrow where id=@id", new SqlParameter("@id", strID));
26 | }
27 |
28 | private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
29 | {
30 | l.back();
31 | }
32 |
33 | private void MainForm_Load(object sender, EventArgs e)
34 | {
35 | this.labName.Text = dt.Rows[0]["sName"].ToString();
36 | this.labID.Text = dt.Rows[0]["sID"].ToString();
37 | this.labDep.Text = dt.Rows[0]["sDepartment"].ToString();
38 | this.labSpe.Text = dt.Rows[0]["sSpecialty"].ToString();
39 | this.dataGridView1.DataSource = dtBooks.DefaultView;
40 | }
41 |
42 | private void button1_Click(object sender, EventArgs e)
43 | {
44 | ChangePwd cp = new ChangePwd(this, this.labID.Text);
45 | cp.ShowDialog();
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace LibraryManagement
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Login());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("LibraryManagement")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("LibraryManagement")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("ef771139-dee1-438c-bb29-465d76de7900")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace LibraryManagement.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/SQLHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.SqlClient;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace LibraryManagement
10 | {
11 | public class SQLHelper
12 | {
13 | private static SqlConnection conn = null;
14 | private static SqlCommand cmd = null;
15 | private static SqlDataReader sdr = null;
16 |
17 | static SQLHelper()
18 | {
19 | conn = new SqlConnection(Properties.Resources.strSQL);
20 | }
21 |
22 | private static SqlConnection GetConn()
23 | {
24 | if (conn.State == ConnectionState.Closed)
25 | {
26 | conn.Open();
27 | }
28 | return conn;
29 | }
30 |
31 | ///
32 | ///执行不带参数的增删改SQL语句或存储过程
33 | ///
34 | /// 增删改SQL语句或存储过程
35 | /// 命令类型
36 | ///
37 | public static int ExecuteNonQuery(string cmdText)
38 | {
39 | int res;
40 | using (cmd = new SqlCommand(cmdText, GetConn()))
41 | {
42 | //cmd.CommandType = ct;
43 | res = cmd.ExecuteNonQuery();
44 | }
45 | return res;
46 | }
47 |
48 | ///
49 | ///执行不带参数的查询SQL语句或存储过程
50 | ///
51 | /// 查询SQL语句或存储过程
52 | /// 命令类型
53 | ///
54 | public static DataTable ExecuteQuery(string cmdText)
55 | {
56 | DataTable dt = new DataTable();
57 | cmd = new SqlCommand(cmdText, GetConn());
58 | //cmd.CommandType = ct;
59 | using (sdr = cmd.ExecuteReader(CommandBehavior.CloseConnection))
60 | {
61 | dt.Load(sdr);
62 | }
63 | return dt;
64 | }
65 |
66 | ///
67 | ///执行带参数的增删改SQL语句或存储过程
68 | ///
69 | /// 增删改SQL语句或存储过程
70 | /// 命令类型
71 | ///
72 | public static int ExecuteNonQuery(string cmdText, params SqlParameter[] paras)
73 | {
74 | int res;
75 | using (cmd = new SqlCommand(cmdText, GetConn()))
76 | {
77 | //cmd.CommandType = ct;
78 | cmd.Parameters.AddRange(paras);
79 | res = cmd.ExecuteNonQuery();
80 | }
81 | return res;
82 | }
83 |
84 | ///
85 | ///执行带参数的查询SQL语句或存储过程
86 | ///
87 | /// 查询SQL语句或存储过程
88 | /// 参数集合
89 | /// 命令类型
90 | ///
91 | public static DataTable ExecuteQuery(string cmdText, params SqlParameter[] paras)
92 | {
93 | DataTable dt = new DataTable();
94 | cmd = new SqlCommand(cmdText, GetConn());
95 | //cmd.CommandType = ct;
96 | cmd.Parameters.AddRange(paras);
97 | using (sdr = cmd.ExecuteReader(CommandBehavior.CloseConnection))
98 | {
99 | dt.Load(sdr);
100 | }
101 | return dt;
102 | }
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/SearchBooks.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace LibraryManagement
12 | {
13 | public partial class SearchBooks : Form
14 | {
15 | AdminForm f;
16 |
17 | public SearchBooks()
18 | {
19 | InitializeComponent();
20 | }
21 |
22 | public SearchBooks(AdminForm f) : this()
23 | {
24 | this.f = f;
25 | }
26 |
27 | private void button2_Click(object sender, EventArgs e)
28 | {
29 | this.Close();
30 | }
31 |
32 | private void button1_Click(object sender, EventArgs e)
33 | {
34 | DataTable dt = new DataTable();
35 | txtName.Text = txtName.Text.Trim();
36 | if (txtName.Text == "")
37 | {
38 | string strSql = "select bISBN as 'ISBN',bName as '书名',bPlace as '位置',bNumber as '剩余数量' from Books";
39 | dt = SQLHelper.ExecuteQuery(strSql);
40 | }
41 | else
42 | {
43 | string strSql = "select bISBN as 'ISBN',bName as '书名',bPlace as '位置',bNumber as '剩余数量' from Books where bName=@name";
44 | dt = SQLHelper.ExecuteQuery(strSql, new System.Data.SqlClient.SqlParameter("@name", txtName.Text));
45 | }
46 | f.SetDT(dt, DataType.Books);
47 | this.Close();
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/SearchBorrow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Data.SqlClient;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace LibraryManagement
13 | {
14 | public partial class SearchBorrow : Form
15 | {
16 | AdminForm f;
17 |
18 | public SearchBorrow()
19 | {
20 | InitializeComponent();
21 | }
22 |
23 | public SearchBorrow(AdminForm f) : this()
24 | {
25 | this.f = f;
26 | }
27 |
28 | private void button2_Click(object sender, EventArgs e)
29 | {
30 | this.Close();
31 | }
32 |
33 | private void button1_Click(object sender, EventArgs e)
34 | {
35 | DataTable dt = new DataTable();
36 | txtID.Text = txtID.Text.Trim();
37 | txtName.Text = txtName.Text.Trim();
38 | if (txtID.Text == "" && txtName.Text == "")
39 | {
40 | dt = SQLHelper.ExecuteQuery("select id as '图书证号',ISBN,sName as '姓名',name as '书名',date as '借书日期',residue as '剩余日期' from Books_Borrow");
41 | }
42 | else if (txtID.Text != "" && txtName.Text == "")
43 | {
44 | dt = SQLHelper.ExecuteQuery("select id as '图书证号',ISBN,sName as '姓名',name as '书名',date as '借书日期',residue as '剩余日期' from Books_Borrow where id=@id", new SqlParameter("@id", txtID.Text));
45 | }
46 | else if (txtID.Text == "" && txtName.Text != "")
47 | {
48 | dt = SQLHelper.ExecuteQuery("select id as '图书证号',ISBN,sName as '姓名',name as '书名',date as '借书日期',residue as '剩余日期' from Books_Borrow where sName=@name", new SqlParameter("@name", txtName.Text));
49 | }
50 | else if (txtID.Text != "" && txtName.Text != "")
51 | {
52 | dt = SQLHelper.ExecuteQuery("select id as '图书证号',ISBN,sName as '姓名',name as '书名',date as '借书日期',residue as '剩余日期' from Books_Borrow where sName=@name and id=@id",
53 | new SqlParameter("@name", txtName.Text),
54 | new SqlParameter("@id", txtID.Text));
55 | }
56 | f.SetDT(dt, DataType.Borrow);
57 | this.Close();
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/SerchStudent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Data.SqlClient;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace LibraryManagement
13 | {
14 | public partial class SerchStudent : Form
15 | {
16 | AdminForm f;
17 |
18 | public SerchStudent()
19 | {
20 | InitializeComponent();
21 | }
22 |
23 | public SerchStudent(AdminForm f) : this()
24 | {
25 | this.f = f;
26 | }
27 |
28 | private void button2_Click(object sender, EventArgs e)
29 | {
30 | this.Close();
31 | }
32 |
33 | private void button1_Click(object sender, EventArgs e)
34 | {
35 | DataTable dt = new DataTable();
36 | txtID.Text = txtID.Text.Trim();
37 | txtName.Text = txtName.Text.Trim();
38 | if (txtID.Text == "" && txtName.Text == "")
39 | {
40 | dt = SQLHelper.ExecuteQuery("select sID as '图书证号',sName as '姓名',sDepartment as '学院',sSpecialty as '专业' from Student");
41 | }
42 | else if (txtID.Text != "" && txtName.Text == "")
43 | {
44 | dt = SQLHelper.ExecuteQuery("select sID as '图书证号',sName as '姓名',sDepartment as '学院',sSpecialty as '专业' from Student where sID=@id", new SqlParameter("@id", txtID.Text));
45 | }
46 | else if (txtID.Text == "" && txtName.Text != "")
47 | {
48 | dt = SQLHelper.ExecuteQuery("select sID as '图书证号',sName as '姓名',sDepartment as '学院',sSpecialty as '专业' from Student where sName=@name", new SqlParameter("@name", txtName.Text));
49 | }
50 | else if (txtID.Text != "" && txtName.Text != "")
51 | {
52 | dt = SQLHelper.ExecuteQuery("select sID as '图书证号',sName as '姓名',sDepartment as '学院',sSpecialty as '专业' from Student where sName=@name and sID=@id",
53 | new SqlParameter("@name", txtName.Text),
54 | new SqlParameter("@id", txtID.Text));
55 | }
56 | f.SetDT(dt, DataType.Students);
57 | this.Close();
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/pic/AddStudent.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/LibraryManagement/LibraryManagement/pic/AddStudent.jpg
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/pic/Addbook.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/LibraryManagement/LibraryManagement/pic/Addbook.jpg
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/pic/AdminForm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/LibraryManagement/LibraryManagement/pic/AdminForm.jpg
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/pic/Library.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/LibraryManagement/LibraryManagement/pic/Library.ico
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/pic/login.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/LibraryManagement/LibraryManagement/pic/login.jpeg
--------------------------------------------------------------------------------
/Data Base/LibraryManagement/LibraryManagement/pic/mainform.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/LibraryManagement/LibraryManagement/pic/mainform.jpg
--------------------------------------------------------------------------------
/Data Base/README.md:
--------------------------------------------------------------------------------
1 | # 数据库
2 |
3 | 模拟图书馆,进行增删改查练习,借书以前查询是否欠费。
4 |
5 | 
6 |
7 | ## 学生登陆
8 | 
9 | 
10 |
11 | ## 管理员登陆
12 | 
13 |
14 | ### 查询学生和操作
15 | 
16 | 
17 | 
18 | 
19 |
20 | ### 查询图书和操作
21 | 
22 | 
23 |
24 | ### 借书查询
25 | 
26 |
27 | ### 导出Excel
28 | 
29 | 
30 |
--------------------------------------------------------------------------------
/Data Base/pic/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/1.png
--------------------------------------------------------------------------------
/Data Base/pic/10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/10.png
--------------------------------------------------------------------------------
/Data Base/pic/11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/11.png
--------------------------------------------------------------------------------
/Data Base/pic/12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/12.png
--------------------------------------------------------------------------------
/Data Base/pic/13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/13.png
--------------------------------------------------------------------------------
/Data Base/pic/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/2.png
--------------------------------------------------------------------------------
/Data Base/pic/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/3.png
--------------------------------------------------------------------------------
/Data Base/pic/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/4.png
--------------------------------------------------------------------------------
/Data Base/pic/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/5.png
--------------------------------------------------------------------------------
/Data Base/pic/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/6.png
--------------------------------------------------------------------------------
/Data Base/pic/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/7.png
--------------------------------------------------------------------------------
/Data Base/pic/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/8.png
--------------------------------------------------------------------------------
/Data Base/pic/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Data Base/pic/9.png
--------------------------------------------------------------------------------
/Digital Image Processing/README.md:
--------------------------------------------------------------------------------
1 | # 数字图像处理
2 | 
3 |
4 | 
5 |
6 | 
7 |
8 | 
9 |
10 | 
11 |
12 | 
13 |
--------------------------------------------------------------------------------
/Digital Image Processing/Untitled.m:
--------------------------------------------------------------------------------
1 | % imread() : Read image from graphics file.
2 | I = imread('image.bmp');
3 | % figure : Creates a new figure window, and returns its handle.
4 | figure;
5 | % imshow() : Displays the grayscale image.
6 | subplot(121);imshow(I);title('image.bmp');
7 | % imhist() : Display histogram of image data.
8 | subplot(122);imhist(I);title('Histogram');
9 |
10 |
11 | % histeq() : Enhance contrast using histogram equalization.
12 | J = histeq(I);
13 | figure;
14 | subplot(121);imshow(J);title('Histogram Equalization');
15 | subplot(122);imhist(J);title('Histogram');
16 |
17 |
18 | % using "Median filtering" because of the "salt-and-pepper noise".
19 | % medfilt2() : Perform 2-D median filtering.
20 | K = medfilt2(J);
21 | % my "Median filtering"
22 | % convert the picture to double.
23 | pic_double = im2double(J);
24 | % mask is 3
25 | m = 3;
26 | % get the size fo the picture
27 | [x,y] = size(pic_double);
28 | % create a new picture to store the result
29 | pic_new = zeros(x-m+1, y-m+1);
30 | % foreach every pixel,find the median in every mask
31 | for i=1:x-m+1
32 | for j=1:y-m+1
33 | temp = pic_double(i:i+m-1,j:j+m-1);
34 | pic_new(i,j) = median(temp(:));
35 | end;
36 | end;
37 | figure;
38 | subplot(121);imshow(K);title('Median filtering');
39 | subplot(122);imshow(pic_new);title('My Median filtering');
40 |
41 |
42 | % graythresh() : Compute global image threshold using Otsu's method.
43 | thresh = graythresh(K);
44 | % BW = IM2BW(I,LEVEL) converts the intensity image I to black and white.
45 | K1 = im2bw(K,thresh);
46 | % my Binarization image
47 | K2 = zeros(x,y);
48 | for i=1:x
49 | for j=1:y
50 | if (K(i,j)>200 || K(i,j)<50)
51 | K2(i,j) = 255;
52 | end;
53 | end;
54 | end;
55 | K2 = K2 .* double(K);
56 | figure;
57 | subplot(121);imshow(K1);title('Binarization image');
58 | subplot(122);imshow(K2);title('My Binarization image');
59 |
60 | % strel() : Create morphological structuring element.
61 | % SE = STREL('disk',R,N) creates a flat disk-shaped structuring element
62 | % with the specified radius, R. R must be a nonnegative integer. N must
63 | % be 0, 4, 6, or 8.
64 | se = strel('disk',3);
65 | % IM2 = IMDILATE(IM,SE) dilates the grayscale, binary, or packed binary
66 | % image IM, returning the dilated image, IM2. SE is a structuring element
67 | % object, or array of structuring element objects, returned by the STREL
68 | % function.
69 | E = imdilate(K2,se);
70 | figure;imshow(E);title('dilation');
71 |
72 |
73 | % IM2 = IMERODE(IM,SE) erodes the grayscale, binary, or packed binary image
74 | % IM, returning the eroded image, IM2. SE is a structuring element
75 | % object, or array of structuring element objects, returned by the
76 | % STREL function.
77 | E2 = imerode(E,se);
78 | figure;imshow(E2);title('erosion');
--------------------------------------------------------------------------------
/Digital Image Processing/image.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Digital Image Processing/image.bmp
--------------------------------------------------------------------------------
/Digital Image Processing/pic/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Digital Image Processing/pic/1.png
--------------------------------------------------------------------------------
/Digital Image Processing/pic/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Digital Image Processing/pic/2.png
--------------------------------------------------------------------------------
/Digital Image Processing/pic/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Digital Image Processing/pic/3.png
--------------------------------------------------------------------------------
/Digital Image Processing/pic/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Digital Image Processing/pic/4.png
--------------------------------------------------------------------------------
/Digital Image Processing/pic/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Digital Image Processing/pic/5.png
--------------------------------------------------------------------------------
/Digital Image Processing/pic/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Digital Image Processing/pic/6.png
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Client/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Client/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Client
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Client());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Client/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Client")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Client")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("ec209785-772f-4aa2-bbe5-d6c09e7ca0be")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Client/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Client.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Client.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Client/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Client.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Client/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DigitalSignature", "DigitalSignature\DigitalSignature.csproj", "{5617581A-69EB-4E80-8E17-1D8C1ABD90F0}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{A38FDC46-4C77-4AE3-9D41-506F0347B6CC}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{EC209785-772F-4AA2-BBE5-D6C09E7CA0BE}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {5617581A-69EB-4E80-8E17-1D8C1ABD90F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {5617581A-69EB-4E80-8E17-1D8C1ABD90F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {5617581A-69EB-4E80-8E17-1D8C1ABD90F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {5617581A-69EB-4E80-8E17-1D8C1ABD90F0}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {A38FDC46-4C77-4AE3-9D41-506F0347B6CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {A38FDC46-4C77-4AE3-9D41-506F0347B6CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {A38FDC46-4C77-4AE3-9D41-506F0347B6CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {A38FDC46-4C77-4AE3-9D41-506F0347B6CC}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {EC209785-772F-4AA2-BBE5-D6C09E7CA0BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {EC209785-772F-4AA2-BBE5-D6C09E7CA0BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {EC209785-772F-4AA2-BBE5-D6C09E7CA0BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {EC209785-772F-4AA2-BBE5-D6C09E7CA0BE}.Release|Any CPU.Build.0 = Release|Any CPU
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace DigitalSignature
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("DigitalSignature")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DigitalSignature")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("5617581a-69eb-4e80-8e17-1d8c1abd90f0")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DigitalSignature.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DigitalSignature.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DigitalSignature.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/DigitalSignature/StatusEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace DigitalSignature
8 | {
9 | public enum StatusEnum
10 | {
11 | getdetail,
12 | getfile,
13 | file,
14 | detail,
15 | getRSAPub,
16 | RSAPub
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Server/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Server/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Server
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Server());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Server/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Server")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Server")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("a38fdc46-4c77-4ae3-9d41-506f0347b6cc")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Server/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Server.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Server.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Server/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Server.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Network Safety Course Design/DigitalSignature/Server/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Network Safety Course Design/README.md:
--------------------------------------------------------------------------------
1 | # 数字签名
2 |
3 | 服务器端
4 |
5 | 
6 |
7 | ------
8 |
9 | 客户端
10 |
11 | 
12 |
13 | ------
14 | 获取可下载文件
15 |
16 | 
17 |
18 | ------
19 | 获取文件和签名
20 |
21 | 
22 |
23 | ------
24 | 获取公钥
25 |
26 | 
27 |
28 | ------
29 | 验证
30 |
31 | 
32 |
--------------------------------------------------------------------------------
/Network Safety Course Design/pic/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Network Safety Course Design/pic/4.png
--------------------------------------------------------------------------------
/Network Safety Course Design/pic/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Network Safety Course Design/pic/5.png
--------------------------------------------------------------------------------
/Network Safety Course Design/pic/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Network Safety Course Design/pic/6.png
--------------------------------------------------------------------------------
/Network Safety Course Design/pic/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Network Safety Course Design/pic/7.png
--------------------------------------------------------------------------------
/Network Safety Course Design/pic/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Network Safety Course Design/pic/8.png
--------------------------------------------------------------------------------
/Network Safety Course Design/pic/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Network Safety Course Design/pic/9.png
--------------------------------------------------------------------------------
/Operating System/OS/OS.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25123.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsForms", "WindowsForms\WindowsForms.csproj", "{42AFF81C-2EFE-452C-9C83-B85DED9D65DD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {42AFF81C-2EFE-452C-9C83-B85DED9D65DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {42AFF81C-2EFE-452C-9C83-B85DED9D65DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {42AFF81C-2EFE-452C-9C83-B85DED9D65DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {42AFF81C-2EFE-452C-9C83-B85DED9D65DD}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/BlockQueue.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WindowsForms
8 | {
9 | ///
10 | /// 阻塞队列类
11 | ///
12 | class BlockQueue
13 | {
14 | static public PCB pcbStart { set; get; }
15 | static public PCB pcbEnd { set; get; }
16 |
17 | static BlockQueue()
18 | {
19 | pcbStart = null;
20 | pcbEnd = null;
21 | }
22 |
23 | ///
24 | /// 增加进阻塞队列
25 | ///
26 | public static void Add(PCB pcb)
27 | {
28 | pcb.State = emState.block;
29 | if (pcbEnd == null && pcbStart == null)
30 | {
31 | pcbStart = pcb;
32 | pcbEnd = pcb;
33 | }
34 | else
35 | {
36 | pcbEnd.next = pcb;
37 | pcbEnd = pcb;
38 | }
39 | pcbEnd.next = null;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/Form2.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WindowsForms
2 | {
3 | partial class Form2
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2));
32 | this.listView = new System.Windows.Forms.ListView();
33 | this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
34 | this.textBox = new System.Windows.Forms.TextBox();
35 | this.SuspendLayout();
36 | //
37 | // listView
38 | //
39 | this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
40 | this.columnHeader1});
41 | this.listView.FullRowSelect = true;
42 | this.listView.Location = new System.Drawing.Point(12, 12);
43 | this.listView.MultiSelect = false;
44 | this.listView.Name = "listView";
45 | this.listView.Size = new System.Drawing.Size(158, 269);
46 | this.listView.TabIndex = 0;
47 | this.listView.UseCompatibleStateImageBehavior = false;
48 | this.listView.View = System.Windows.Forms.View.Details;
49 | this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
50 | //
51 | // columnHeader1
52 | //
53 | this.columnHeader1.Text = "文件名";
54 | this.columnHeader1.Width = 150;
55 | //
56 | // textBox
57 | //
58 | this.textBox.AcceptsReturn = true;
59 | this.textBox.Location = new System.Drawing.Point(176, 12);
60 | this.textBox.Multiline = true;
61 | this.textBox.Name = "textBox";
62 | this.textBox.ReadOnly = true;
63 | this.textBox.Size = new System.Drawing.Size(279, 269);
64 | this.textBox.TabIndex = 1;
65 | //
66 | // Form2
67 | //
68 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
69 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
70 | this.ClientSize = new System.Drawing.Size(467, 293);
71 | this.Controls.Add(this.textBox);
72 | this.Controls.Add(this.listView);
73 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
74 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
75 | this.MaximizeBox = false;
76 | this.MinimizeBox = false;
77 | this.Name = "Form2";
78 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
79 | this.Text = "结果";
80 | this.Load += new System.EventHandler(this.Form2_Load);
81 | this.ResumeLayout(false);
82 | this.PerformLayout();
83 |
84 | }
85 |
86 | #endregion
87 |
88 | private System.Windows.Forms.ListView listView;
89 | private System.Windows.Forms.ColumnHeader columnHeader1;
90 | private System.Windows.Forms.TextBox textBox;
91 | }
92 | }
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/Form2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 |
12 | namespace WindowsForms
13 | {
14 | ///
15 | /// 单例模式 生成新窗口
16 | ///
17 | public partial class Form2 : System.Windows.Forms.Form
18 | {
19 | private static Form2 f;
20 |
21 | public static Form2 GetSingle()
22 | {
23 | if (f == null || f.IsDisposed)
24 | {
25 | f = new Form2();
26 | }
27 | return f;
28 | }
29 |
30 | private Form2()
31 | {
32 | InitializeComponent();
33 | }
34 |
35 | private void Form2_Load(object sender, EventArgs e)
36 | {
37 | //载入时 读入目录树
38 | string path = @"../data";
39 | this.listView.Items.Clear();
40 | string[] files = Directory.GetFiles(path);
41 | ListViewItem item = new ListViewItem();
42 | foreach (string file in files)
43 | {
44 | item = new ListViewItem();
45 | item.Text = Path.GetFileName(file);
46 | item.Tag = Path.GetFullPath(file);
47 | this.listView.Items.Add(item);
48 | }
49 | }
50 |
51 | private void listView_SelectedIndexChanged(object sender, EventArgs e)
52 | {
53 | //点击时 查看内容
54 | if (this.listView.SelectedItems.Count > 0)
55 | {
56 | string path = this.listView.FocusedItem.Tag.ToString();
57 | using (FileStream stream = new FileStream(path, FileMode.Open))
58 | {
59 | byte[] buffer = new byte[1024 * 10];
60 | stream.Read(buffer, 0, buffer.Length);
61 | this.textBox.Text = Encoding.Default.GetString(buffer);
62 | }
63 | }
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/PCB.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.IO;
7 |
8 | namespace WindowsForms
9 | {
10 | class PCB
11 | {
12 | ///
13 | /// 数据缓冲 寄存器
14 | ///
15 | public int DR { set; get; }
16 | ///
17 | /// 进程标识符 只读
18 | ///
19 | public string Name { get; }
20 | ///
21 | /// 进程编号 只读
22 | ///
23 | public int Number { get; }
24 | ///
25 | /// 指令位置
26 | ///
27 | public int PC { get; set; }
28 | ///
29 | /// 进程状态
30 | ///
31 | public emState State { get; set; }
32 | ///
33 | /// 阻塞原因
34 | ///
35 | public char Event { get; set; }
36 | ///
37 | /// 时间片
38 | ///
39 | public int Timer { get; set; }
40 | ///
41 | /// 下一进程
42 | ///
43 | public PCB next { get; set; }
44 | ///
45 | /// 程序内容 只读
46 | ///
47 | public string Program { get; }
48 | ///
49 | /// 路径 只读
50 | ///
51 | public string path { get; }
52 |
53 | public PCB(string path,int number)
54 | {
55 | this.Name = Path.GetFileName(path);
56 | this.Number = number;
57 | this.State = emState.ready;
58 | using (FileStream stream=new FileStream(path,FileMode.Open))
59 | {
60 | this.path = path;
61 | byte[] buffer = new byte[1024 * 10];
62 | stream.Read(buffer, 0, buffer.Length);
63 | this.Program = Encoding.Default.GetString(buffer).Replace("\n", "").Replace("\r", "").Trim();
64 | }
65 | this.PC = 0;
66 | this.DR = 0;
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace WindowsForms
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("WindowsForms")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("WindowsForms")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("42aff81c-2efe-452c-9c83-b85ded9d65dd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowsForms.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsForms.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowsForms.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/ReadyQueue.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WindowsForms
8 | {
9 | ///
10 | /// 就绪队列类
11 | ///
12 | class ReadyQueue
13 | {
14 | static public PCB pcbStart { set; get; }
15 | static public PCB pcbEnd { set; get; }
16 |
17 | ///
18 | /// 静态构造函数
19 | ///
20 | static ReadyQueue()
21 | {
22 | pcbStart = null;
23 | pcbEnd = null;
24 | }
25 |
26 | ///
27 | /// 增加进就绪队列
28 | ///
29 | public static void Add(PCB pcb)
30 | {
31 | pcb.State = emState.ready;
32 | if (pcbEnd == null && pcbStart == null)
33 | {
34 | pcbStart = pcb;
35 | pcbEnd = pcb;
36 | }
37 | else
38 | {
39 | pcbEnd.next = pcb;
40 | pcbEnd = pcb;
41 | }
42 | pcbEnd.next = null;
43 | }
44 | ///
45 | /// 从就绪队列移除
46 | ///
47 | ///
48 | public static PCB Get()
49 | {
50 | if (pcbEnd == null && pcbStart == null)
51 | {
52 | return null;
53 | }
54 | else
55 | {
56 | PCB pcbTemp = pcbStart;
57 | pcbStart = pcbStart.next;
58 | if (pcbStart == null) pcbEnd = null;
59 | return pcbTemp;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Operating System/OS/WindowsForms/State.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WindowsForms
8 | {
9 | ///
10 | /// 进程状态 枚举
11 | ///
12 | enum emState
13 | {
14 | operation,
15 | ready,
16 | block
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Operating System/README.md:
--------------------------------------------------------------------------------
1 | # 操作系统
2 |
3 | 
4 |
5 | 首先点击重新生成文件按钮,重新生成进程文件:
6 |
7 | 
8 |
9 | 然后点击开机,程序开始运行:
10 |
11 | 
12 |
13 | 点击相应的进程,则可把进程加入就绪队列:
14 |
15 | 
16 | 
17 |
18 | 当程序执行结束,可点击查看结果按钮查看结果:
19 |
20 | 
21 |
22 | 经测试,运行结果均正确。例如0.in的结果0.out:
23 |
24 | 
25 |
--------------------------------------------------------------------------------
/Operating System/pic/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/1.png
--------------------------------------------------------------------------------
/Operating System/pic/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/2.png
--------------------------------------------------------------------------------
/Operating System/pic/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/3.png
--------------------------------------------------------------------------------
/Operating System/pic/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/4.png
--------------------------------------------------------------------------------
/Operating System/pic/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/5.png
--------------------------------------------------------------------------------
/Operating System/pic/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/6.png
--------------------------------------------------------------------------------
/Operating System/pic/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/7.png
--------------------------------------------------------------------------------
/Operating System/pic/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yichengsu/HomeworkCode/6649ea9404bc2f1526744c77d02f9a1dbdf5e5a0/Operating System/pic/8.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HomeworkCode
2 |
3 | 本科各个学期的期末作业小项目集合,包括:
4 | * C语言程序设计
5 | * 模拟航班管理
6 | * 操作系统
7 | * 模拟操作系统的进程管理(时间片)
8 | * C#
9 | * **模仿WIN10风格计算器**
10 | * **基于Xamarin的简易Android聊天软件,模仿[omegle](http://www.omegle.com/)。**
11 | * 数据库
12 | * 图书馆管理
13 | * 数字图像处理
14 | * 计算机网络
15 | * 简易网络五子棋
16 | * 简易多人聊天室
17 | * 多线程端口扫描
18 | * 网络安全课程设计
19 | * **数字签名(C#重写MD5算法)**
20 |
21 | # 示意图
22 |
23 |
24 |
25 | 模仿Win10风格计算器
26 |
27 |
28 |
29 |
30 | 模拟操作系统的进程管理(时间片)
31 |
32 |
--------------------------------------------------------------------------------