C# applicton
ExampleWinforms/ExampleDLL/bin/Debug/ServiceExample.dll
ExampleWinforms/ExampleDLL/bin/Debug/ServiceExample.pdb
ExampleWinforms/ExampleDLL/ExampleDLL.csproj
Debug AnyCPU {96881B87-D117-44FE-8168-BBB152A7F434} Library Properties ServiceExample ServiceExample v3.5 512 SAK SAK SAK SAK true full false bin\Debug\ DEBUG;TRACE prompt 4 pdbonly true bin\Release\ TRACE prompt 4
ExampleWinforms/ExampleDLL/ExampleDLL.csproj.vspscc
"" { "FILE_VERSION" = "9237" "ENLISTMENT_CHOICE" = "NEVER" "PROJECT_FILE_RELATIVE_PATH" = "" "NUMBER_OF_EXCLUDED_FILES" = "0" "ORIGINAL_PROJECT_FILE_PATH" = "" "NUMBER_OF_NESTED_PROJECTS" = "0" "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" }
ExampleWinforms/ExampleDLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
ExampleWinforms/ExampleDLL/obj/Debug/ExampleDLL.csproj.FileListAbsolute.txt
C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleDLL\obj\Debug\ExampleDLL.csprojResolveAssemblyReference.cache C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleDLL\bin\Debug\ServiceExample.dll C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleDLL\bin\Debug\ServiceExample.pdb C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleDLL\obj\Debug\ServiceExample.dll C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleDLL\obj\Debug\ServiceExample.pdb
ExampleWinforms/ExampleDLL/obj/Debug/ExampleDLL.csprojResolveAssemblyReference.cache
ExampleWinforms/ExampleDLL/obj/Debug/ServiceExample.dll
ExampleWinforms/ExampleDLL/obj/Debug/ServiceExample.pdb
ExampleWinforms/ExampleDLL/Person.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ExampleDLL { public class Person { public Person() { } public Person(string name, int age, bool ishappy) { _Name = name; _Age = age; _IsHappy = ishappy; } bool _IsHappy = false; public bool IsHappy { get { return _IsHappy; } set { _IsHappy = value; } } string _Name = string.Empty; public string Name { get { return _Name; } set { _Name = value; } } int _Age = 0; public int Age { get { return _Age; } set { _Age = value; } } } }
ExampleWinforms/ExampleDLL/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ExampleDLL")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("ExampleDLL")] [assembly: AssemblyCopyright("Copyright © Microsoft 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("ad621187-c82e-4fa0-b4eb-06466c2703c6")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
ExampleWinforms/ExampleDLL/ServiceExample.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ExampleDLL { public class ServiceExample { private List<Person> _InternalList = null; private List<Person> InternalList { get { if (_InternalList == null) { _InternalList = new List<Person>(); _InternalList.Add(new Person("Fred", 20, true)); _InternalList.Add(new Person("Jorge", 30, false)); _InternalList.Add(new Person("Edna", 40, true)); _InternalList.Add(new Person("Clair", 50, false)); _InternalList.Add(new Person("Gustav", 60, true)); _InternalList.Add(new Person("Louis", 21, true)); _InternalList.Add(new Person("Henry", 31, false)); _InternalList.Add(new Person("Jane", 41, true)); _InternalList.Add(new Person("Flo", 51, false)); _InternalList.Add(new Person("Gary", 61, true)); _InternalList.Add(new Person("Kalvin", 22, true)); _InternalList.Add(new Person("Luther", 32, false)); _InternalList.Add(new Person("Fran", 42, true)); _InternalList.Add(new Person("Igor", 52, false)); _InternalList.Add(new Person("Natasha", 62, true)); _InternalList.Add(new Person("Jerod", 23, true)); _InternalList.Add(new Person("Clementine", 33, false)); _InternalList.Add(new Person("Corrine", 43, true)); _InternalList.Add(new Person("Al", 53, false)); _InternalList.Add(new Person("Corey", 63, true)); _InternalList.Add(new Person("Evan", 24, true)); _InternalList.Add(new Person("Will", 34, false)); _InternalList.Add(new Person("Veronica", 44, true)); _InternalList.Add(new Person("Pearl", 54, false)); _InternalList.Add(new Person("Laura", 64, true)); _InternalList.Add(new Person("Gino", 25, true)); _InternalList.Add(new Person("Gina", 35, false)); _InternalList.Add(new Person("Mary", 45, true)); _InternalList.Add(new Person("Sarah", 55, false)); _InternalList.Add(new Person("Quentin", 65, true)); } // // return _InternalList; // // } } public bool IsServiceAlive() { return true; } public List<Person> GetHappyPersons() { var q = (from p in InternalList where p.IsHappy select p).ToList(); return q; } public List<Person> GetUnhappyPersons() { var q = (from p in InternalList where !p.IsHappy select p).ToList(); return q; } public List<Person> GetAllPersons() { // // return InternalList; // // } } }
ExampleWinforms/ExampleWinforms.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleWinforms", "ExampleWinforms\ExampleWinforms.csproj", "{EE8C56F6-080F-4351-AE8C-58BD3266F37F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleDLL", "ExampleDLL\ExampleDLL.csproj", "{96881B87-D117-44FE-8168-BBB152A7F434}" EndProject Global GlobalSection(TeamFoundationVersionControl) = preSolution SccNumberOfProjects = 3 SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccTeamFoundationServer = http://topsdev.topssoft.com:7070/tfs/tops_iq SccLocalPath0 = . SccProjectUniqueName1 = ExampleWinforms\\ExampleWinforms.csproj SccProjectName1 = ExampleWinforms SccLocalPath1 = ExampleWinforms SccProjectUniqueName2 = ExampleDLL\\ExampleDLL.csproj SccProjectName2 = ExampleDLL SccLocalPath2 = ExampleDLL EndGlobalSection 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 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Debug|Any CPU.ActiveCfg = Debug|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Debug|Mixed Platforms.Build.0 = Debug|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Debug|x86.ActiveCfg = Debug|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Debug|x86.Build.0 = Debug|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Release|Any CPU.ActiveCfg = Release|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Release|Mixed Platforms.ActiveCfg = Release|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Release|Mixed Platforms.Build.0 = Release|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Release|x86.ActiveCfg = Release|x86 {EE8C56F6-080F-4351-AE8C-58BD3266F37F}.Release|x86.Build.0 = Release|x86 {96881B87-D117-44FE-8168-BBB152A7F434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Debug|Any CPU.Build.0 = Debug|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Debug|x86.ActiveCfg = Debug|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Release|Any CPU.ActiveCfg = Release|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Release|Any CPU.Build.0 = Release|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Release|Mixed Platforms.Build.0 = Release|Any CPU {96881B87-D117-44FE-8168-BBB152A7F434}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal
ExampleWinforms/ExampleWinforms/app.config
ExampleWinforms/ExampleWinforms/bin/Debug/ExampleWinforms.exe
ExampleWinforms/ExampleWinforms/bin/Debug/ExampleWinforms.exe.config
ExampleWinforms/ExampleWinforms/bin/Debug/ExampleWinforms.pdb
ExampleWinforms/ExampleWinforms/bin/Debug/ExampleWinforms.vshost.exe
ExampleWinforms/ExampleWinforms/bin/Debug/ExampleWinforms.vshost.exe.config
ExampleWinforms/ExampleWinforms/bin/Debug/ExampleWinforms.vshost.exe.manifest
ExampleWinforms/ExampleWinforms/bin/Debug/ServiceExample.dll
ExampleWinforms/ExampleWinforms/bin/Debug/ServiceExample.pdb
ExampleWinforms/ExampleWinforms/ExampleWinforms.csproj
Debug x86 8.0.30703 2.0 {EE8C56F6-080F-4351-AE8C-58BD3266F37F} WinExe Properties ExampleWinforms ExampleWinforms v3.5 512 SAK SAK SAK SAK x86 true full false bin\Debug\ DEBUG;TRACE prompt 4 false x86 pdbonly true bin\Release\ TRACE prompt 4 false Form frmWinForms.cs frmWinForms.cs ResXFileCodeGenerator Resources.Designer.cs Designer True Resources.resx True SettingsSingleFileGenerator Settings.Designer.cs True Settings.settings True {96881B87-D117-44FE-8168-BBB152A7F434} ExampleDLL
ExampleWinforms/ExampleWinforms/ExampleWinforms.csproj.user
ExampleWinforms/ExampleWinforms/ExampleWinforms.csproj.vspscc
"" { "FILE_VERSION" = "9237" "ENLISTMENT_CHOICE" = "NEVER" "PROJECT_FILE_RELATIVE_PATH" = "" "NUMBER_OF_EXCLUDED_FILES" = "0" "ORIGINAL_PROJECT_FILE_PATH" = "" "NUMBER_OF_NESTED_PROJECTS" = "0" "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" }
ExampleWinforms/ExampleWinforms/frmMain.cs
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 ExampleDLL; namespace ExampleWinforms { public partial class frmMain : Form { public frmMain() { InitializeComponent(); } private void frmMain_Load(object sender, EventArgs e) { this.lblServiceAlive.Text = "LOL idk is the service alive?"; bool b = ServiceManager.IsServiceAlive(); this.lblServiceAlive.Text = string.Format("Service is {0}", b ? "Alive!" : "Dead!!!"); this.gridAllPersons.ShowNoDataText = true; } private List<Person> GridList = null; private void txtSearchAll_TextChanged(object sender, EventArgs e) { var list = ServiceManager.GetAllPersons(); string search = this.txtSearchAll.Text.Trim(); this.GridList = (from p in list where p.Age.ToString().Contains(search) | p.Name.Contains(search) select p).ToList(); this.gridAllPersons.DataSource = this.GridList; } private void gridAllPersons_DataBindingComplete(object sender, Telerik.WinControls.UI.GridViewBindingCompleteEventArgs e) { foreach (var c in this.gridAllPersons.Columns) { c.Width = (int)(this.gridAllPersons.Width / this.gridAllPersons.ColumnCount) - 4; } } private void frmMain_ResizeEnd(object sender, EventArgs e) { foreach (var c in this.gridAllPersons.Columns) { c.Width = (int)(this.gridAllPersons.Width / this.gridAllPersons.ColumnCount) - 4; } } } }
ExampleWinforms/ExampleWinforms/frmMain.Designer.cs
namespace ExampleWinforms { partial class frmMain { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.lblServiceAlive = new Telerik.WinControls.UI.RadLabel(); this.pvResults = new Telerik.WinControls.UI.RadPageView(); this.pageAllPersons = new Telerik.WinControls.UI.RadPageViewPage(); this.txtSearchAll = new Telerik.WinControls.UI.RadTextBoxControl(); this.gridAllPersons = new Telerik.WinControls.UI.RadGridView(); this.pageHappyPersons = new Telerik.WinControls.UI.RadPageViewPage(); this.pageUnhappyPersons = new Telerik.WinControls.UI.RadPageViewPage(); ((System.ComponentModel.ISupportInitialize)(this.lblServiceAlive)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pvResults)).BeginInit(); this.pvResults.SuspendLayout(); this.pageAllPersons.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtSearchAll)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridAllPersons)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridAllPersons.MasterTemplate)).BeginInit(); this.SuspendLayout(); // // lblServiceAlive // this.lblServiceAlive.Location = new System.Drawing.Point(12, 12); this.lblServiceAlive.Name = "lblServiceAlive"; this.lblServiceAlive.Size = new System.Drawing.Size(78, 18); this.lblServiceAlive.TabIndex = 0; this.lblServiceAlive.Text = "lblServiceAlive"; // // pvResults // this.pvResults.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pvResults.Controls.Add(this.pageAllPersons); this.pvResults.Controls.Add(this.pageHappyPersons); this.pvResults.Controls.Add(this.pageUnhappyPersons); this.pvResults.Location = new System.Drawing.Point(12, 42); this.pvResults.Name = "pvResults"; this.pvResults.SelectedPage = this.pageAllPersons; this.pvResults.Size = new System.Drawing.Size(560, 268); this.pvResults.TabIndex = 1; this.pvResults.Text = "pvResults"; // // pageAllPersons // this.pageAllPersons.Controls.Add(this.txtSearchAll); this.pageAllPersons.Controls.Add(this.gridAllPersons); this.pageAllPersons.Location = new System.Drawing.Point(10, 37); this.pageAllPersons.Name = "pageAllPersons"; this.pageAllPersons.Size = new System.Drawing.Size(539, 220); this.pageAllPersons.Text = "All Persons"; // // txtSearchAll // this.txtSearchAll.Location = new System.Drawing.Point(3, 3); this.txtSearchAll.Name = "txtSearchAll"; this.txtSearchAll.Size = new System.Drawing.Size(125, 18); this.txtSearchAll.TabIndex = 1; this.txtSearchAll.TextChanged += new System.EventHandler(this.txtSearchAll_TextChanged); // // gridAllPersons // this.gridAllPersons.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.gridAllPersons.Location = new System.Drawing.Point(3, 27); this.gridAllPersons.Name = "gridAllPersons"; this.gridAllPersons.Size = new System.Drawing.Size(533, 190); this.gridAllPersons.TabIndex = 0; this.gridAllPersons.Text = "radGridView1"; this.gridAllPersons.DataBindingComplete += new Telerik.WinControls.UI.GridViewBindingCompleteEventHandler(this.gridAllPersons_DataBindingComplete); // // pageHappyPersons // this.pageHappyPersons.Location = new System.Drawing.Point(10, 37); this.pageHappyPersons.Name = "pageHappyPersons"; this.pageHappyPersons.Size = new System.Drawing.Size(539, 220); this.pageHappyPersons.Text = "Happy Persons"; // // pageUnhappyPersons // this.pageUnhappyPersons.Location = new System.Drawing.Point(10, 37); this.pageUnhappyPersons.Name = "pageUnhappyPersons"; this.pageUnhappyPersons.Size = new System.Drawing.Size(539, 220); this.pageUnhappyPersons.Text = "Unhappy Persons"; // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(584, 322); this.Controls.Add(this.pvResults); this.Controls.Add(this.lblServiceAlive); this.Name = "frmMain"; this.Text = "frmMain"; this.Load += new System.EventHandler(this.frmMain_Load); this.ResizeEnd += new System.EventHandler(this.frmMain_ResizeEnd); ((System.ComponentModel.ISupportInitialize)(this.lblServiceAlive)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pvResults)).EndInit(); this.pvResults.ResumeLayout(false); this.pageAllPersons.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.txtSearchAll)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridAllPersons.MasterTemplate)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridAllPersons)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private Telerik.WinControls.UI.RadLabel lblServiceAlive; private Telerik.WinControls.UI.RadPageView pvResults; private Telerik.WinControls.UI.RadPageViewPage pageAllPersons; private Telerik.WinControls.UI.RadGridView gridAllPersons; private Telerik.WinControls.UI.RadTextBoxControl txtSearchAll; private Telerik.WinControls.UI.RadPageViewPage pageHappyPersons; private Telerik.WinControls.UI.RadPageViewPage pageUnhappyPersons; } }
ExampleWinforms/ExampleWinforms/frmMain.resx
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
ExampleWinforms/ExampleWinforms/frmWinForms.cs
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; namespace ExampleWinforms { public partial class frmWinForms : Form { public frmWinForms() { InitializeComponent(); } private void txtAll_TextChanged(object sender, EventArgs e) { var list = ServiceManager.GetAllPersons(); string search = this.txtAll.Text.Trim(); var searchlist = (from p in list where p.Age.ToString().Contains(search) | p.Name.Contains(search) select p).ToList(); this.gridAll.DataSource = searchlist; } } }
ExampleWinforms/ExampleWinforms/frmWinForms.Designer.cs
namespace ExampleWinforms { partial class frmWinForms { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.tabControl1 = new System.Windows.Forms.TabControl(); this.tpAll = new System.Windows.Forms.TabPage(); this.txtAll = new System.Windows.Forms.TextBox(); this.gridAll = new System.Windows.Forms.DataGridView(); this.tpHappy = new System.Windows.Forms.TabPage(); this.tpUnhappy = new System.Windows.Forms.TabPage(); this.tabControl1.SuspendLayout(); this.tpAll.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridAll)).BeginInit(); this.SuspendLayout(); // // tabControl1 // this.tabControl1.Controls.Add(this.tpAll); this.tabControl1.Controls.Add(this.tpHappy); this.tabControl1.Controls.Add(this.tpUnhappy); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; this.tabControl1.Size = new System.Drawing.Size(784, 362); this.tabControl1.TabIndex = 0; // // tpAll // this.tpAll.Controls.Add(this.txtAll); this.tpAll.Controls.Add(this.gridAll); this.tpAll.Location = new System.Drawing.Point(4, 22); this.tpAll.Name = "tpAll"; this.tpAll.Padding = new System.Windows.Forms.Padding(3); this.tpAll.Size = new System.Drawing.Size(776, 336); this.tpAll.TabIndex = 0; this.tpAll.Text = "ALL Persons"; this.tpAll.UseVisualStyleBackColor = true; // // txtAll // this.txtAll.Location = new System.Drawing.Point(8, 6); this.txtAll.Name = "txtAll"; this.txtAll.Size = new System.Drawing.Size(128, 20); this.txtAll.TabIndex = 1; this.txtAll.TextChanged += new System.EventHandler(this.txtAll_TextChanged); // // gridAll // this.gridAll.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.gridAll.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gridAll.Location = new System.Drawing.Point(8, 32); this.gridAll.Name = "gridAll"; this.gridAll.Size = new System.Drawing.Size(762, 298); this.gridAll.TabIndex = 0; // // tpHappy // this.tpHappy.Location = new System.Drawing.Point(4, 22); this.tpHappy.Name = "tpHappy"; this.tpHappy.Padding = new System.Windows.Forms.Padding(3); this.tpHappy.Size = new System.Drawing.Size(776, 336); this.tpHappy.TabIndex = 1; this.tpHappy.Text = "HAPPY Persons"; this.tpHappy.UseVisualStyleBackColor = true; // // tpUnhappy // this.tpUnhappy.Location = new System.Drawing.Point(4, 22); this.tpUnhappy.Name = "tpUnhappy"; this.tpUnhappy.Padding = new System.Windows.Forms.Padding(3); this.tpUnhappy.Size = new System.Drawing.Size(776, 336); this.tpUnhappy.TabIndex = 2; this.tpUnhappy.Text = "UNHAPPY Persons"; this.tpUnhappy.UseVisualStyleBackColor = true; // // frmWinForms // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(784, 362); this.Controls.Add(this.tabControl1); this.MinimumSize = new System.Drawing.Size(800, 400); this.Name = "frmWinForms"; this.Text = "frmWinForms"; this.tabControl1.ResumeLayout(false); this.tpAll.ResumeLayout(false); this.tpAll.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridAll)).EndInit(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tpAll; private System.Windows.Forms.TabPage tpHappy; private System.Windows.Forms.TextBox txtAll; private System.Windows.Forms.DataGridView gridAll; private System.Windows.Forms.TabPage tpUnhappy; } }
ExampleWinforms/ExampleWinforms/frmWinForms.resx
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
ExampleWinforms/ExampleWinforms/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
ExampleWinforms/ExampleWinforms/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
ExampleWinforms/ExampleWinforms/obj/x86/Debug/ExampleWinforms.csproj.FileListAbsolute.txt
C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\bin\Debug\ExampleWinforms.exe C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\bin\Debug\ExampleWinforms.pdb C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\obj\x86\Debug\ExampleWinforms.csprojResolveAssemblyReference.cache C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\obj\x86\Debug\ExampleWinforms.Properties.Resources.resources C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\obj\x86\Debug\ExampleWinforms.csproj.GenerateResource.Cache C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\obj\x86\Debug\ExampleWinforms.exe C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\obj\x86\Debug\ExampleWinforms.pdb C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\bin\Debug\ExampleWinforms.exe.config C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\bin\Debug\ServiceExample.dll C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\bin\Debug\ServiceExample.pdb C:\TOPSiQ\Sandboxes\KEVIN\JobCandidates\ExampleWinforms\ExampleWinforms\obj\x86\Debug\ExampleWinforms.frmWinForms.resources
ExampleWinforms/ExampleWinforms/obj/x86/Debug/ExampleWinforms.csproj.GenerateResource.Cache
ExampleWinforms/ExampleWinforms/obj/x86/Debug/ExampleWinforms.csprojResolveAssemblyReference.cache
ExampleWinforms/ExampleWinforms/obj/x86/Debug/ExampleWinforms.exe
ExampleWinforms/ExampleWinforms/obj/x86/Debug/ExampleWinforms.frmWinForms.resources
ExampleWinforms/ExampleWinforms/obj/x86/Debug/ExampleWinforms.pdb
ExampleWinforms/ExampleWinforms/obj/x86/Debug/ExampleWinforms.Properties.Resources.resources
ExampleWinforms/ExampleWinforms/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
ExampleWinforms/ExampleWinforms/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
ExampleWinforms/ExampleWinforms/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
ExampleWinforms/ExampleWinforms/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
ExampleWinforms/ExampleWinforms/Program.cs
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace ExampleWinforms { // // // Tasks: // // // // ****************************************************** // // ** A FEW THINGS TO KEEP IN MIND ** // // ** comment all changes made and areas of concern ** // // ** if you see a problem, comment it and fix it! ** // // ** write code with an thought towards maintenance ** // // ** please spend no more than 1 hour on these tasks ** // // // // // // TASKS // // // // 1) resolve issue of columns not taking up the full width of the grid // (ensure the columns take up all the width of the grid) // 2) resolve issue with SEARCH being case sensitive // (should NOT be case sensitive) // 3) refactor the ExampleDLL.Persons class: // - create new property: string "JobTitle" / ensure all Persons have a non-empty string value for new "JobTitle" member // - create new Constructor overload to accept "JobTitle" // - ensure datagrid displays "JobTitle" and search is aware of "JobTitle" // 4) duplicate UI & Functionality (textbox, datagrid, search functionality) for: // - Happy Persons tab (should show only Happy people) // - Unhappy Persons tab (should show only Happy people) // 5) suggest resolutions / optimizations to all code flaws you see // in either the ExampleWinforms or the ExampleDLL project code // // static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmWinForms()); } } }
ExampleWinforms/ExampleWinforms/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ExampleWinforms")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("ExampleWinforms")] [assembly: AssemblyCopyright("Copyright © Microsoft 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("7e79b19b-f0a0-4d55-9618-572e1cbb9448")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
ExampleWinforms/ExampleWinforms/Properties/Resources.Designer.cs
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18052 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace ExampleWinforms.Properties { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [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() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ExampleWinforms.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } } }
ExampleWinforms/ExampleWinforms/Properties/Resources.resx
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
ExampleWinforms/ExampleWinforms/Properties/Settings.Designer.cs
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18052 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace ExampleWinforms.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; } } } }
ExampleWinforms/ExampleWinforms/Properties/Settings.settings
ExampleWinforms/ExampleWinforms/ServiceManager.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using ExampleDLL; namespace ExampleWinforms { public static class ServiceManager { public static bool IsServiceAlive() { Person p = new Person(); ServiceExample se = new ServiceExample(); if (se.IsServiceAlive()) { return true; } return false; } public static List<Person> GetAllPersons() { List<Person> list = null; ServiceExample se = new ServiceExample(); list = se.GetAllPersons(); return list; } public static List<Person> GetHappyPersons() { List<Person> list = null; ServiceExample se = new ServiceExample(); list = se.GetHappyPersons(); return list; } public static List<Person> GetUnhappyPersons() { List<Person> list = null; ServiceExample se = new ServiceExample(); list = se.GetUnhappyPersons(); return list; } } }