├── .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 |