From 9e971056c52434d1120c455d6e1dd13824821cc0 Mon Sep 17 00:00:00 2001 From: ramble111 <1836413225@qq.com> Date: Tue, 1 Oct 2019 01:18:59 +0800 Subject: [PATCH] 201731024210 --- .../WindowsFormsApp1/DaoLayer/DaoLayer.csproj | 64 +++++ .../DaoLayer/Properties/AssemblyInfo.cs | 36 +++ .../WindowsFormsApp1/DaoLayer/StudentDAO.cs | 26 ++ .../WindowsFormsApp1/DataBase/DataBase.csproj | 60 ++++ .../DataBase/Properties/AssemblyInfo.cs | 36 +++ .../DataBase/StudentDataset.cs | 236 ++++++++++++++++ .../WindowsFormsApp1/Entity/Entity.csproj | 54 ++++ .../Entity/Properties/AssemblyInfo.cs | 36 +++ .../WindowsFormsApp1/Entity/Student.cs | 36 +++ .../Properties/AssemblyInfo.cs | 20 ++ .../UnitTestProject1/UnitTest1.cs | 20 ++ .../UnitTestProject1/UnitTestProject1.csproj | 89 ++++++ .../UnitTestProject1/packages.config | 5 + .../WindowsFormsApp1/WinformControlUse.sln | 85 ++++++ .../WinformControlUse/FrmStudent.Designer.cs | 259 ++++++++++++++++++ .../WinformControlUse/FrmStudent.cs | 97 +++++++ .../WinformControlUse/FrmStudent.resx | 132 +++++++++ .../WinformControlUse/Program.cs | 21 ++ .../Properties/AssemblyInfo.cs | 36 +++ .../Properties/Resources.Designer.cs | 71 +++++ .../Properties/Resources.resx | 117 ++++++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../WinformControlUse.csproj | 97 +++++++ 24 files changed, 1670 insertions(+) create mode 100644 201731024210/WindowsFormsApp1/DaoLayer/DaoLayer.csproj create mode 100644 201731024210/WindowsFormsApp1/DaoLayer/Properties/AssemblyInfo.cs create mode 100644 201731024210/WindowsFormsApp1/DaoLayer/StudentDAO.cs create mode 100644 201731024210/WindowsFormsApp1/DataBase/DataBase.csproj create mode 100644 201731024210/WindowsFormsApp1/DataBase/Properties/AssemblyInfo.cs create mode 100644 201731024210/WindowsFormsApp1/DataBase/StudentDataset.cs create mode 100644 201731024210/WindowsFormsApp1/Entity/Entity.csproj create mode 100644 201731024210/WindowsFormsApp1/Entity/Properties/AssemblyInfo.cs create mode 100644 201731024210/WindowsFormsApp1/Entity/Student.cs create mode 100644 201731024210/WindowsFormsApp1/UnitTestProject1/Properties/AssemblyInfo.cs create mode 100644 201731024210/WindowsFormsApp1/UnitTestProject1/UnitTest1.cs create mode 100644 201731024210/WindowsFormsApp1/UnitTestProject1/UnitTestProject1.csproj create mode 100644 201731024210/WindowsFormsApp1/UnitTestProject1/packages.config create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse.sln create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.Designer.cs create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.cs create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.resx create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/Program.cs create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/Properties/AssemblyInfo.cs create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.Designer.cs create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.resx create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.Designer.cs create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.settings create mode 100644 201731024210/WindowsFormsApp1/WinformControlUse/WinformControlUse.csproj diff --git a/201731024210/WindowsFormsApp1/DaoLayer/DaoLayer.csproj b/201731024210/WindowsFormsApp1/DaoLayer/DaoLayer.csproj new file mode 100644 index 0000000..a937684 --- /dev/null +++ b/201731024210/WindowsFormsApp1/DaoLayer/DaoLayer.csproj @@ -0,0 +1,64 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {1D140515-0ED0-4999-851F-FC291A6F3EB2} + Library + Properties + DaoLayer + DaoLayer + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + {0E823200-986C-403E-B45B-EAF7A73F1FBC} + DataBase + + + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC} + Entity + + + + + \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/DaoLayer/Properties/AssemblyInfo.cs b/201731024210/WindowsFormsApp1/DaoLayer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3540fa3 --- /dev/null +++ b/201731024210/WindowsFormsApp1/DaoLayer/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("DaoLayer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("DaoLayer")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("c6917861-9e67-497d-be51-ce47915de44a")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/201731024210/WindowsFormsApp1/DaoLayer/StudentDAO.cs b/201731024210/WindowsFormsApp1/DaoLayer/StudentDAO.cs new file mode 100644 index 0000000..b1a47bd --- /dev/null +++ b/201731024210/WindowsFormsApp1/DaoLayer/StudentDAO.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using DataBase; +using Entity; + +namespace DaoLayer +{ + public class StudentDAO + { + public int getStudentRecordsNums() + { + List studengList=StudentDataset.getAll(); + return studengList.Count; + } + + public List getAllStudents() + { + List studengList = StudentDataset.getAll(); + return studengList; + } + + } +} diff --git a/201731024210/WindowsFormsApp1/DataBase/DataBase.csproj b/201731024210/WindowsFormsApp1/DataBase/DataBase.csproj new file mode 100644 index 0000000..d5600db --- /dev/null +++ b/201731024210/WindowsFormsApp1/DataBase/DataBase.csproj @@ -0,0 +1,60 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {0E823200-986C-403E-B45B-EAF7A73F1FBC} + Library + Properties + DataBase + DataBase + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC} + Entity + + + + + \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/DataBase/Properties/AssemblyInfo.cs b/201731024210/WindowsFormsApp1/DataBase/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..af1d0e7 --- /dev/null +++ b/201731024210/WindowsFormsApp1/DataBase/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("DataBase")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("DataBase")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("0e1c468f-9c15-4d2b-84b0-cbd53a46096a")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/201731024210/WindowsFormsApp1/DataBase/StudentDataset.cs b/201731024210/WindowsFormsApp1/DataBase/StudentDataset.cs new file mode 100644 index 0000000..f60e496 --- /dev/null +++ b/201731024210/WindowsFormsApp1/DataBase/StudentDataset.cs @@ -0,0 +1,236 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections.ObjectModel; +using System.Collections; +using Entity; + +namespace DataBase +{ + public class StudentDataset + { + //模拟数据库中的学生集合 + + private static List studengList; + + + public static List getAll() + { + studengList=new List(); + + Student stu1 = new Student("001", "王川"); + studengList.Add(stu1); + Student stu2 = new Student("002", "于丁"); + studengList.Add(stu2); + + Student stu3 = new Student("003", "张莹"); + studengList.Add(stu3); + Student stu4 = new Student("004", "李楠"); + studengList.Add(stu4); + + Student stu5 = new Student("005", "陈欣"); + studengList.Add(stu5); + Student stu6 = new Student("006", "马芸慧"); + studengList.Add(stu6); + + Student stu7 = new Student("007", "汪小萍"); + studengList.Add(stu7); + Student stu8 = new Student("008", "母丹"); + studengList.Add(stu8); + + + Student stu9 = new Student("001", "许博"); + studengList.Add(stu9); + Student stu10 = new Student("002", "芦文钰"); + studengList.Add(stu10); + + Student stu11 = new Student("011", "马昊妍"); + studengList.Add(stu11); + Student stu12 = new Student("012", "李宣晓"); + studengList.Add(stu12); + + Student stu13 = new Student("013", "李清兰"); + studengList.Add(stu13); + Student stu14 = new Student("014", "成湘"); + studengList.Add(stu14); + + Student stu15 = new Student("015", "罗涵"); + studengList.Add(stu15); + Student stu16 = new Student("016", "肖逸菲"); + studengList.Add(stu16); + + Student stu17 = new Student("017", "冯士坤"); + studengList.Add(stu17); + Student stu18 = new Student("018", "杨汶桐"); + studengList.Add(stu18); + + Student stu19 = new Student("019", "张焱菁"); + studengList.Add(stu19); + Student stu20 = new Student("020", "雷槟源"); + studengList.Add(stu20); + + Student stu21 = new Student("021", "李志"); + studengList.Add(stu21); + Student stu22 = new Student("022", "黄涛"); + studengList.Add(stu22); + + Student stu23 = new Student("023", "宋杰"); + studengList.Add(stu23); + Student stu24 = new Student("024", "赵俊安"); + studengList.Add(stu24); + + + Student stu25 = new Student("025", "张新明"); + studengList.Add(stu25); + Student stu26 = new Student("026", "张旭"); + studengList.Add(stu26); + + Student stu27 = new Student("027", "王旭"); + studengList.Add(stu27); + Student stu28 = new Student("028", "李朋珂"); + studengList.Add(stu28); + + Student stu29 = new Student("029", "张微玖"); + studengList.Add(stu29); + Student stu30 = new Student("030", "何明钦"); + studengList.Add(stu30); + + Student stu31 = new Student("031", "姜玖林"); + studengList.Add(stu31); + Student stu32 = new Student("032", "涂才森"); + studengList.Add(stu32); + + + + Student stu33 = new Student("027", "陈林"); + studengList.Add(stu33); + Student stu34 = new Student("028", "曾正男"); + studengList.Add(stu34); + + Student stu35 = new Student("029", "江天宇"); + studengList.Add(stu35); + Student stu36 = new Student("036", "魏恩博"); + studengList.Add(stu36); + + Student stu37 = new Student("031", "邹扬锋"); + studengList.Add(stu37); + Student stu38 = new Student("032", "曾琅"); + studengList.Add(stu38); + + Student stu39 = new Student("032", "周成杰"); + studengList.Add(stu39); + + Student stu40 = new Student("032", "马驰"); + studengList.Add(stu40); + + Student stu41 = new Student("032", "宋树钱"); + studengList.Add(stu41); + Student stu42 = new Student("032", "马驰"); + studengList.Add(stu42); + Student stu43 = new Student("032", "任星辰"); + studengList.Add(stu43); + + Student stu44 = new Student("032", "严一笑"); + studengList.Add(stu44); + Student stu45 = new Student("032", "孙颖"); + studengList.Add(stu45); + Student stu46 = new Student("032", "吴明益"); + studengList.Add(stu46); + Student stu47 = new Student("032", "黄耀萱"); + studengList.Add(stu47); + Student stu48 = new Student("032", "王静宜"); + studengList.Add(stu48); + Student stu49 = new Student("032", "蔡玉蓝"); + studengList.Add(stu49); + + Student stu50 = new Student("032", "姜仪"); + studengList.Add(stu50); + + Student stu51 = new Student("032", "郑雪"); + studengList.Add(stu51); + Student stu52 = new Student("032", "刘俊"); + studengList.Add(stu52); + Student stu53 = new Student("032", "何玉姣"); + studengList.Add(stu53); + Student stu54 = new Student("032", "匡小娟"); + studengList.Add(stu54); + Student stu55 = new Student("032", "王春兰"); + studengList.Add(stu55); + Student stu56 = new Student("032", "顾毓"); + studengList.Add(stu56); + Student stu57 = new Student("032", "师志杰"); + studengList.Add(stu57); + Student stu58 = new Student("032", "许佳文"); + studengList.Add(stu58); + Student stu59 = new Student("032", "雷安勇"); + studengList.Add(stu59); + + Student stu60 = new Student("032", "张伟"); + studengList.Add(stu60); + + + Student stu61 = new Student("032", "袁志杰"); + studengList.Add(stu61); + Student stu62 = new Student("032", "何全江"); + studengList.Add(stu62); + Student stu63 = new Student("032", "舒鹏飞"); + studengList.Add(stu63); + Student stu64 = new Student("032", "何辉"); + studengList.Add(stu64); + Student stu65 = new Student("032", "李全喜"); + studengList.Add(stu65); + Student stu66 = new Student("032", "谢凯宇"); + studengList.Add(stu66); + Student stu67 = new Student("032", "黄本巍"); + studengList.Add(stu67); + Student stu68 = new Student("032", "罗俊杰"); + studengList.Add(stu68); + Student stu69 = new Student("032", "何宸锐"); + studengList.Add(stu69); + Student stu70 = new Student("032", "付昶宇"); + studengList.Add(stu70); + Student stu71 = new Student("032", "傅伟鑫"); + studengList.Add(stu71); + + Student stu72 = new Student("032", "王云飞"); + studengList.Add(stu72); + + Student stu73 = new Student("032", "李元港"); + studengList.Add(stu73); + + Student stu74 = new Student("032", "赵荣泽"); + studengList.Add(stu74); + + Student stu75 = new Student("032", "吴郑浩"); + studengList.Add(stu75); + + Student stu76 = new Student("032", "何继武"); + studengList.Add(stu76); + + Student stu77 = new Student("032", "郑博"); + studengList.Add(stu77); + + Student stu78 = new Student("032", "王万成"); + studengList.Add(stu78); + + Student stu79 = new Student("032", "陈杰"); + studengList.Add(stu79); + + Student stu80 = new Student("032", "胡志伟"); + studengList.Add(stu80); + + Student stu81 = new Student("032", "涂林"); + studengList.Add(stu81); + Student stu82 = new Student("032", "孟诚成"); + studengList.Add(stu82); + Student stu83 = new Student("032", "廖志丹"); + studengList.Add(stu83); + Student stu84 = new Student("032", "杨也"); + studengList.Add(stu84); + + + return studengList; + } + } +} diff --git a/201731024210/WindowsFormsApp1/Entity/Entity.csproj b/201731024210/WindowsFormsApp1/Entity/Entity.csproj new file mode 100644 index 0000000..c0b8b04 --- /dev/null +++ b/201731024210/WindowsFormsApp1/Entity/Entity.csproj @@ -0,0 +1,54 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC} + Library + Properties + Entity + Entity + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/Entity/Properties/AssemblyInfo.cs b/201731024210/WindowsFormsApp1/Entity/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..32c9048 --- /dev/null +++ b/201731024210/WindowsFormsApp1/Entity/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Entity")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Entity")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("c1f5c4df-6643-48c7-b885-9f797121de7d")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/201731024210/WindowsFormsApp1/Entity/Student.cs b/201731024210/WindowsFormsApp1/Entity/Student.cs new file mode 100644 index 0000000..7dc351c --- /dev/null +++ b/201731024210/WindowsFormsApp1/Entity/Student.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Entity +{ + public class Student + { + private String id; + + public String Id + { + get { return id; } + set { id = value; } + } + + private String name; + + public String Name + { + get { return name; } + set { name = value; } + } + + public Student() + { + + } + public Student(String id, String name) + { + this.id = id; + this.name = name; + } + } +} diff --git a/201731024210/WindowsFormsApp1/UnitTestProject1/Properties/AssemblyInfo.cs b/201731024210/WindowsFormsApp1/UnitTestProject1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a5099b0 --- /dev/null +++ b/201731024210/WindowsFormsApp1/UnitTestProject1/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("UnitTestProject1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("UnitTestProject1")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: Guid("c06dc17f-8615-4b64-92a0-496c217d53c6")] + +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/201731024210/WindowsFormsApp1/UnitTestProject1/UnitTest1.cs b/201731024210/WindowsFormsApp1/UnitTestProject1/UnitTest1.cs new file mode 100644 index 0000000..9563a8c --- /dev/null +++ b/201731024210/WindowsFormsApp1/UnitTestProject1/UnitTest1.cs @@ -0,0 +1,20 @@ +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using DaoLayer; +using DataBase; +using Entity; + +namespace UnitTestProject1 +{ + [TestClass] + public class UnitTest1 + { + [TestMethod] + public void TestMethod1() + { + StudentDAO ss = new StudentDAO(); + StudentDataset bb = new StudentDataset(); + Student aa = new Student(); + } + } +} diff --git a/201731024210/WindowsFormsApp1/UnitTestProject1/UnitTestProject1.csproj b/201731024210/WindowsFormsApp1/UnitTestProject1/UnitTestProject1.csproj new file mode 100644 index 0000000..037c8a8 --- /dev/null +++ b/201731024210/WindowsFormsApp1/UnitTestProject1/UnitTestProject1.csproj @@ -0,0 +1,89 @@ + + + + + + Debug + AnyCPU + {C06DC17F-8615-4B64-92A0-496C217D53C6} + Library + Properties + UnitTestProject1 + UnitTestProject1 + v4.6.1 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + + + + + + + + + + + + + + + {1d140515-0ed0-4999-851f-fc291a6f3eb2} + DaoLayer + + + {0e823200-986c-403e-b45b-eaf7a73f1fbc} + DataBase + + + {fcae6dcf-b578-4bf8-8502-e62a2c4487fc} + Entity + + + {abf032ad-a07d-4cd0-acb0-61b5c7cf79a8} + WinformControlUse + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + + + \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/UnitTestProject1/packages.config b/201731024210/WindowsFormsApp1/UnitTestProject1/packages.config new file mode 100644 index 0000000..102a45c --- /dev/null +++ b/201731024210/WindowsFormsApp1/UnitTestProject1/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/WinformControlUse.sln b/201731024210/WindowsFormsApp1/WinformControlUse.sln new file mode 100644 index 0000000..845240e --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse.sln @@ -0,0 +1,85 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.852 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinformControlUse", "WinformControlUse\WinformControlUse.csproj", "{ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DaoLayer", "DaoLayer\DaoLayer.csproj", "{1D140515-0ED0-4999-851F-FC291A6F3EB2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBase", "DataBase\DataBase.csproj", "{0E823200-986C-403E-B45B-EAF7A73F1FBC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entity", "Entity\Entity.csproj", "{FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestProject1", "UnitTestProject1\UnitTestProject1.csproj", "{C06DC17F-8615-4B64-92A0-496C217D53C6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Debug|Any CPU.ActiveCfg = Debug|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Debug|x86.ActiveCfg = Debug|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Debug|x86.Build.0 = Debug|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Release|Any CPU.ActiveCfg = Release|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Release|Mixed Platforms.Build.0 = Release|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Release|x86.ActiveCfg = Release|x86 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8}.Release|x86.Build.0 = Release|x86 + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Debug|x86.ActiveCfg = Debug|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Release|Any CPU.Build.0 = Release|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {1D140515-0ED0-4999-851F-FC291A6F3EB2}.Release|x86.ActiveCfg = Release|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Debug|x86.ActiveCfg = Debug|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Release|Any CPU.Build.0 = Release|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {0E823200-986C-403E-B45B-EAF7A73F1FBC}.Release|x86.ActiveCfg = Release|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Debug|x86.ActiveCfg = Debug|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Release|Any CPU.Build.0 = Release|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC}.Release|x86.ActiveCfg = Release|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Debug|x86.ActiveCfg = Debug|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Debug|x86.Build.0 = Debug|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Release|Any CPU.Build.0 = Release|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Release|x86.ActiveCfg = Release|Any CPU + {C06DC17F-8615-4B64-92A0-496C217D53C6}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5FA1AD0A-554C-42AB-8166-C059B2EFB8A7} + EndGlobalSection +EndGlobal diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.Designer.cs b/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.Designer.cs new file mode 100644 index 0000000..1fa414b --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.Designer.cs @@ -0,0 +1,259 @@ +namespace WinformControlUse +{ + partial class FrmStudent + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.label1 = new System.Windows.Forms.Label(); + this.dgvStuList = new System.Windows.Forms.DataGridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.pnlProgress = new System.Windows.Forms.Panel(); + this.progressName = new System.Windows.Forms.ProgressBar(); + this.btnLoadStu = new System.Windows.Forms.Button(); + this.btnStart = new System.Windows.Forms.Button(); + this.btnStop = new System.Windows.Forms.Button(); + this.timerCallName = new System.Windows.Forms.Timer(this.components); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lblName = new System.Windows.Forms.Label(); + this.stuID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.stuName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dgvStuList)).BeginInit(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.pnlProgress.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(21, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(53, 12); + this.label1.TabIndex = 0; + this.label1.Text = "学生列表"; + // + // dgvStuList + // + this.dgvStuList.AllowUserToAddRows = false; + this.dgvStuList.AllowUserToDeleteRows = false; + this.dgvStuList.BackgroundColor = System.Drawing.Color.LightBlue; + this.dgvStuList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvStuList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.stuID, + this.stuName, + this.Column1}); + this.dgvStuList.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvStuList.Location = new System.Drawing.Point(0, 0); + this.dgvStuList.Name = "dgvStuList"; + this.dgvStuList.RowTemplate.Height = 23; + this.dgvStuList.Size = new System.Drawing.Size(643, 227); + this.dgvStuList.TabIndex = 1; + this.dgvStuList.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvStuList_CellContentClick); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.SystemColors.Info; + this.panel1.Controls.Add(this.label1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(643, 25); + this.panel1.TabIndex = 2; + // + // panel2 + // + this.panel2.Controls.Add(this.dgvStuList); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 25); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(643, 227); + this.panel2.TabIndex = 3; + // + // pnlProgress + // + this.pnlProgress.BackColor = System.Drawing.SystemColors.GradientInactiveCaption; + this.pnlProgress.Controls.Add(this.progressName); + this.pnlProgress.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlProgress.Location = new System.Drawing.Point(0, 252); + this.pnlProgress.Name = "pnlProgress"; + this.pnlProgress.Size = new System.Drawing.Size(643, 30); + this.pnlProgress.TabIndex = 4; + // + // progressName + // + this.progressName.BackColor = System.Drawing.Color.PaleTurquoise; + this.progressName.Dock = System.Windows.Forms.DockStyle.Fill; + this.progressName.ForeColor = System.Drawing.SystemColors.Control; + this.progressName.Location = new System.Drawing.Point(0, 0); + this.progressName.Name = "progressName"; + this.progressName.Size = new System.Drawing.Size(643, 30); + this.progressName.TabIndex = 1; + // + // btnLoadStu + // + this.btnLoadStu.BackColor = System.Drawing.SystemColors.InactiveCaption; + this.btnLoadStu.Location = new System.Drawing.Point(492, 1); + this.btnLoadStu.Name = "btnLoadStu"; + this.btnLoadStu.Size = new System.Drawing.Size(75, 23); + this.btnLoadStu.TabIndex = 0; + this.btnLoadStu.Text = "加载学生"; + this.btnLoadStu.UseVisualStyleBackColor = false; + this.btnLoadStu.Click += new System.EventHandler(this.btnLoadStu_Click); + // + // btnStart + // + this.btnStart.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.btnStart.Location = new System.Drawing.Point(105, 2); + this.btnStart.Name = "btnStart"; + this.btnStart.Size = new System.Drawing.Size(75, 24); + this.btnStart.TabIndex = 2; + this.btnStart.Text = "开始点名"; + this.btnStart.UseVisualStyleBackColor = false; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // + // btnStop + // + this.btnStop.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.btnStop.Location = new System.Drawing.Point(242, 2); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(75, 22); + this.btnStop.TabIndex = 3; + this.btnStop.Text = "停止点名"; + this.btnStop.UseVisualStyleBackColor = false; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // timerCallName + // + this.timerCallName.Interval = 50; + this.timerCallName.Tick += new System.EventHandler(this.timerCallName_Tick); + // + // panel3 + // + this.panel3.BackColor = System.Drawing.SystemColors.Info; + this.panel3.Controls.Add(this.btnStop); + this.panel3.Controls.Add(this.btnLoadStu); + this.panel3.Controls.Add(this.btnStart); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(0, 282); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(643, 30); + this.panel3.TabIndex = 7; + // + // panel4 + // + this.panel4.BackColor = System.Drawing.SystemColors.GradientInactiveCaption; + this.panel4.Controls.Add(this.lblName); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(0, 312); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(643, 150); + this.panel4.TabIndex = 8; + // + // lblName + // + this.lblName.AutoSize = true; + this.lblName.Font = new System.Drawing.Font("微软雅黑", 45F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblName.ForeColor = System.Drawing.Color.OrangeRed; + this.lblName.Location = new System.Drawing.Point(277, 51); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(0, 78); + this.lblName.TabIndex = 7; + // + // stuID + // + this.stuID.DataPropertyName = "stuID"; + this.stuID.HeaderText = "学号"; + this.stuID.Name = "stuID"; + // + // stuName + // + this.stuName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.stuName.DataPropertyName = "stuName"; + this.stuName.HeaderText = "姓名"; + this.stuName.Name = "stuName"; + // + // Column1 + // + this.Column1.HeaderText = "是否到课"; + this.Column1.Name = "Column1"; + // + // FrmStudent + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Info; + this.ClientSize = new System.Drawing.Size(643, 462); + this.Controls.Add(this.panel4); + this.Controls.Add(this.panel3); + this.Controls.Add(this.pnlProgress); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmStudent"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "学生随机点名系统"; + this.Load += new System.EventHandler(this.FrmStudent_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvStuList)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.pnlProgress.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DataGridView dgvStuList; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel pnlProgress; + private System.Windows.Forms.Button btnLoadStu; + private System.Windows.Forms.ProgressBar progressName; + private System.Windows.Forms.Button btnStop; + private System.Windows.Forms.Button btnStart; + private System.Windows.Forms.Timer timerCallName; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.DataGridViewTextBoxColumn stuID; + private System.Windows.Forms.DataGridViewTextBoxColumn stuName; + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + } +} \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.cs b/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.cs new file mode 100644 index 0000000..57bab7b --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +using DaoLayer; +using Entity; +using System.Threading; + +namespace WinformControlUse +{ + public partial class FrmStudent : Form + { + List stuList; + + public FrmStudent() + { + InitializeComponent(); + } + + void iniControl() + { + btnStart.Visible = false; + btnStop.Visible = false; + btnLoadStu.Enabled = true; + } + + void setControlVisible() + { + btnStart.Visible = true; + btnStop.Visible = true; + btnLoadStu.Visible = false; + } + + private void btnLoadStu_Click(object sender, EventArgs e) + { + + //获取学生数据源 + StudentDAO stuDao = new StudentDAO(); + stuList=stuDao.getAllStudents(); + + //进度条设置 + int stuCounts = stuList.Count;//及时学生人数 + progressName.Maximum = stuCounts; + + + //构造数据源 + DataTable dt = new DataTable(); + dt.Columns.Add("stuID", Type.GetType("System.String")); + dt.Columns.Add("stuName", Type.GetType("System.String")); + + //数据加载以进度条方式展现 + foreach (Student stu in stuList) + { + dt.Rows.Add(stu.Id,stu.Name); + progressName.Value += 1;//一个学生,进度条加1; + Thread.Sleep(500); + } + + dgvStuList.DataSource = dt; + + setControlVisible(); + + } + + private void FrmStudent_Load(object sender, EventArgs e) + { + iniControl(); + } + + private void timerCallName_Tick(object sender, EventArgs e) + { + Random ra = new Random(); + int i = ra.Next(stuList.Count); + lblName.Text = stuList[i].Name; + } + + private void btnStart_Click(object sender, EventArgs e) + { + timerCallName.Start(); + } + + private void btnStop_Click(object sender, EventArgs e) + { + timerCallName.Stop(); + } + + private void dgvStuList_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + } + } +} diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.resx b/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.resx new file mode 100644 index 0000000..8feef63 --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/FrmStudent.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + 17, 17 + + \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/Program.cs b/201731024210/WindowsFormsApp1/WinformControlUse/Program.cs new file mode 100644 index 0000000..791a17d --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace WinformControlUse +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FrmStudent()); + } + } +} diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/Properties/AssemblyInfo.cs b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7e60910 --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("WinformControlUse")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("WinformControlUse")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("570c467a-10b6-4482-92ed-a6cf89279790")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.Designer.cs b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.Designer.cs new file mode 100644 index 0000000..11009a3 --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace WinformControlUse.Properties +{ + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的、缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinformControlUse.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 为所有资源查找重写当前线程的 CurrentUICulture 属性, + /// 方法是使用此强类型资源类。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.resx b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.Designer.cs b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.Designer.cs new file mode 100644 index 0000000..1095cde --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WinformControlUse.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.settings b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/201731024210/WindowsFormsApp1/WinformControlUse/WinformControlUse.csproj b/201731024210/WindowsFormsApp1/WinformControlUse/WinformControlUse.csproj new file mode 100644 index 0000000..6f0fca6 --- /dev/null +++ b/201731024210/WindowsFormsApp1/WinformControlUse/WinformControlUse.csproj @@ -0,0 +1,97 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {ABF032AD-A07D-4CD0-ACB0-61B5C7CF79A8} + WinExe + Properties + WinformControlUse + WinformControlUse + v4.0 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + Form + + + FrmStudent.cs + + + + + FrmStudent.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {1D140515-0ED0-4999-851F-FC291A6F3EB2} + DaoLayer + + + {FCAE6DCF-B578-4BF8-8502-E62A2C4487FC} + Entity + + + + + \ No newline at end of file