Click here to Skip to main content
15,885,745 members
Articles / Database Development / SQL Server / SQL Server 2008

Architecture Guide: Windows Forms, Generics, Auto-Mapper, Entity Framework, Framework Design, and many more..

Rate me:
Please Sign up or sign in to vote.
4.93/5 (39 votes)
12 Dec 2013CPOL15 min read 141.2K   3.8K   175  
Architecting a Windows Forms based system on top of a framework. This will help you develop a form based application faster.
namespace Demo.Core.Controls.ChildControls
{
    partial class GroupData
    {
        /// <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 Component 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.components = new System.ComponentModel.Container();
            System.Windows.Forms.Label createdDateTImeLabel;
            System.Windows.Forms.Label depthLabel;
            System.Windows.Forms.Label descriptionLabel;
            System.Windows.Forms.Label nameLabel;
            System.Windows.Forms.Label welcomeMessageLabel;
            System.Windows.Forms.Label label1;
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GroupData));
            Demo.Core.Models.GroupView groupView1 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupView groupView2 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupView groupView3 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupView groupView4 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupView groupView5 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView1 = new Demo.Core.Models.GroupTypeView();
            
            Demo.Core.Models.GroupTypeView groupTypeView2 = new Demo.Core.Models.GroupTypeView();
            Demo.Core.Models.GroupTypeView groupTypeView3 = new Demo.Core.Models.GroupTypeView();
            Demo.Core.Models.GroupTypeView groupTypeView4 = new Demo.Core.Models.GroupTypeView();
           
            Demo.Core.Models.GroupTypeView groupTypeView5 = new Demo.Core.Models.GroupTypeView();
            
            Demo.Core.Models.GroupView groupView6 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView6 = new Demo.Core.Models.GroupTypeView();
            Demo.Core.Models.GroupView groupView7 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupView groupView8 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView7 = new Demo.Core.Models.GroupTypeView();
            
            Demo.Core.Models.GroupTypeView groupTypeView8 = new Demo.Core.Models.GroupTypeView();
            Demo.Core.Models.GroupView groupView9 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView9 = new Demo.Core.Models.GroupTypeView();
            Demo.Core.Models.GroupView groupView10 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView10 = new Demo.Core.Models.GroupTypeView();
            Demo.Core.Models.GroupView groupView11 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView11 = new Demo.Core.Models.GroupTypeView();
            
            Demo.Core.Models.GroupView groupView12 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView12 = new Demo.Core.Models.GroupTypeView();
            Demo.Core.Models.GroupView groupView13 = new Demo.Core.Models.GroupView();
            Demo.Core.Models.GroupTypeView groupTypeView13 = new Demo.Core.Models.GroupTypeView();
            
            this.groupViewBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.createdDateTImeDateTimePicker = new System.Windows.Forms.DateTimePicker();
            this.depthTextBox = new System.Windows.Forms.TextBox();
            this.descriptionTextBox = new System.Windows.Forms.TextBox();
            this.isActiveCheckBox = new System.Windows.Forms.CheckBox();
            this.nameTextBox = new System.Windows.Forms.TextBox();
            this.welcomeMessageTextBox = new System.Windows.Forms.TextBox();
            this.groupCombo1 = new Demo.Core.Controls.Combos.GroupCombo();
            createdDateTImeLabel = new System.Windows.Forms.Label();
            depthLabel = new System.Windows.Forms.Label();
            descriptionLabel = new System.Windows.Forms.Label();
            nameLabel = new System.Windows.Forms.Label();
            welcomeMessageLabel = new System.Windows.Forms.Label();
            label1 = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.groupViewBindingSource)).BeginInit();
            this.SuspendLayout();
            // 
            // createdDateTImeLabel
            // 
            createdDateTImeLabel.AutoSize = true;
            createdDateTImeLabel.Location = new System.Drawing.Point(44, 101);
            createdDateTImeLabel.Name = "createdDateTImeLabel";
            createdDateTImeLabel.Size = new System.Drawing.Size(41, 13);
            createdDateTImeLabel.TabIndex = 1;
            createdDateTImeLabel.Text = "Added:";
            // 
            // depthLabel
            // 
            depthLabel.AutoSize = true;
            depthLabel.Location = new System.Drawing.Point(389, 19);
            depthLabel.Name = "depthLabel";
            depthLabel.Size = new System.Drawing.Size(39, 13);
            depthLabel.TabIndex = 3;
            depthLabel.Text = "Depth:";
            // 
            // descriptionLabel
            // 
            descriptionLabel.AutoSize = true;
            descriptionLabel.Location = new System.Drawing.Point(45, 71);
            descriptionLabel.Name = "descriptionLabel";
            descriptionLabel.Size = new System.Drawing.Size(63, 13);
            descriptionLabel.TabIndex = 5;
            descriptionLabel.Text = "Description:";
            // 
            // nameLabel
            // 
            nameLabel.AutoSize = true;
            nameLabel.Location = new System.Drawing.Point(45, 16);
            nameLabel.Name = "nameLabel";
            nameLabel.Size = new System.Drawing.Size(70, 13);
            nameLabel.TabIndex = 9;
            nameLabel.Text = "Group Name:";
            // 
            // welcomeMessageLabel
            // 
            welcomeMessageLabel.AutoSize = true;
            welcomeMessageLabel.Location = new System.Drawing.Point(389, 75);
            welcomeMessageLabel.Name = "welcomeMessageLabel";
            welcomeMessageLabel.Size = new System.Drawing.Size(101, 13);
            welcomeMessageLabel.TabIndex = 11;
            welcomeMessageLabel.Text = "Welcome Message:";
            // 
            // label1
            // 
            label1.AutoSize = true;
            label1.Location = new System.Drawing.Point(45, 42);
            label1.Name = "label1";
            label1.Size = new System.Drawing.Size(93, 13);
            label1.TabIndex = 13;
            label1.Text = "Child Group Name";
            // 
            // groupViewBindingSource
            // 
            this.groupViewBindingSource.DataSource = typeof(Demo.Core.Models.GroupView);
            // 
            // createdDateTImeDateTimePicker1
            // 
            this.createdDateTImeDateTimePicker.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.groupViewBindingSource, "CreatedDateTIme", true));
            this.createdDateTImeDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            this.createdDateTImeDateTimePicker.Location = new System.Drawing.Point(151, 97);
            this.createdDateTImeDateTimePicker.Name = "createdDateTImeDateTimePicker1";
            this.createdDateTImeDateTimePicker.Size = new System.Drawing.Size(97, 20);
            this.createdDateTImeDateTimePicker.TabIndex = 2;
            // 
            // depthTextBox1
            // 
            this.depthTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.groupViewBindingSource, "Depth", true));
            this.depthTextBox.Location = new System.Drawing.Point(496, 16);
            this.depthTextBox.Name = "depthTextBox1";
            this.depthTextBox.Size = new System.Drawing.Size(200, 20);
            this.depthTextBox.TabIndex = 4;
            // 
            // descriptionTextBox1
            // 
            this.descriptionTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.groupViewBindingSource, "Description", true));
            this.descriptionTextBox.Location = new System.Drawing.Point(152, 68);
            this.descriptionTextBox.Name = "descriptionTextBox1";
            this.descriptionTextBox.Size = new System.Drawing.Size(200, 20);
            this.descriptionTextBox.TabIndex = 6;
            // 
            // isActiveCheckBox1
            // 
            this.isActiveCheckBox.DataBindings.Add(new System.Windows.Forms.Binding("CheckState", this.groupViewBindingSource, "IsActive", true));
            this.isActiveCheckBox.Location = new System.Drawing.Point(496, 42);
            this.isActiveCheckBox.Name = "isActiveCheckBox1";
            this.isActiveCheckBox.Size = new System.Drawing.Size(200, 24);
            this.isActiveCheckBox.TabIndex = 8;
            this.isActiveCheckBox.Text = "Active";
            this.isActiveCheckBox.UseVisualStyleBackColor = true;
            // 
            // nameTextBox
            // 
            this.nameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.groupViewBindingSource, "Name", true));
            this.nameTextBox.Location = new System.Drawing.Point(152, 13);
            this.nameTextBox.Name = "nameTextBox";
            this.nameTextBox.Size = new System.Drawing.Size(200, 20);
            this.nameTextBox.TabIndex = 10;
            // 
            // welcomeMessageTextBox1
            // 
            this.welcomeMessageTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.groupViewBindingSource, "WelcomeMessage", true));
            this.welcomeMessageTextBox.Location = new System.Drawing.Point(496, 72);
            this.welcomeMessageTextBox.Name = "welcomeMessageTextBox1";
            this.welcomeMessageTextBox.Size = new System.Drawing.Size(200, 20);
            this.welcomeMessageTextBox.TabIndex = 12;
            // 
            // groupCombo1
            // 
            this.groupCombo1.DisplayMember = "Name";
            this.groupCombo1.FormattingEnabled = true;
            groupView1.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView1.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView1.Data")));
            groupView1.Depth = 1;
            groupView1.Description = null;
            groupView1.IsActive = true;
            groupView1.Name = "Administrators";
            groupView2.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView2.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView2.Data")));
            groupView2.Depth = 1;
            groupView2.Description = null;
            groupView2.IsActive = true;
            groupView2.Name = "DataEntryTeams";
            groupView3.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView3.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView3.Data")));
            groupView3.Depth = 1;
            groupView3.Description = null;
            groupView3.IsActive = true;
            groupView3.Name = "Supervisers";
            groupView4.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView4.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView4.Data")));
            groupView4.Depth = 1;
            groupView4.Description = null;
            groupView4.IsActive = true;
            groupView4.Name = "StoreKeepers";
            groupView5.CreatedDateTIme = new System.DateTime(2010, 7, 7, 0, 0, 0, 0);
            groupView5.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView5.Data")));
            groupView5.Depth = 1;
            groupView5.Description = null;
            groupView5.IsActive = true;
            groupView5.Name = "TeaWeightings";
            groupView5.SelectedChildGroup = groupView3;
            groupTypeView1.Data = null;
            groupTypeView1.Description = "Tea Weighting Operation";
            groupTypeView1.Name = "OG_SK";
            groupTypeView1.SourcePoco = null;
            groupView5.SelectedGroupType = groupTypeView1;
            
            groupView5.WelcomeMessage = "welcome";
            groupView4.SelectedChildGroup = groupView5;
            groupTypeView2.Data = null;
            groupTypeView2.Description = "Tea Store Keeper";
            groupTypeView2.Name = "RUG_SK";
            groupTypeView2.SourcePoco = null;
            groupView4.SelectedGroupType = groupTypeView2;
            
            groupView4.WelcomeMessage = "welcome";
            groupView3.SelectedChildGroup = groupView4;
            groupTypeView3.Data = null;
            groupTypeView3.Description = "Tea Collection Supervisers";
            groupTypeView3.Name = "RUG_S";
            groupTypeView3.SourcePoco = null;
            groupView3.SelectedGroupType = groupTypeView3;
            
            groupView3.WelcomeMessage = "welcome";
            groupView2.SelectedChildGroup = groupView3;
            groupTypeView4.Data = null;
            groupTypeView4.Description = "Data Entry users of the System";
            groupTypeView4.Name = "AUG_DTO";
            groupTypeView4.SourcePoco = null;
            groupView2.SelectedGroupType = groupTypeView4;
            
            groupView2.WelcomeMessage = "welcome";
            groupView1.SelectedChildGroup = groupView2;
            groupTypeView5.Data = null;
            groupTypeView5.Description = "Administrators of the System";
            groupTypeView5.Name = "AUG_SA";
            groupTypeView5.SourcePoco = null;
            groupView1.SelectedGroupType = groupTypeView5;
            
            groupView1.WelcomeMessage = "Welcome";
            groupView6.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView6.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView6.Data")));
            groupView6.Depth = 1;
            groupView6.Description = null;
            groupView6.IsActive = true;
            groupView6.Name = "DataEntryTeams";
            groupView6.SelectedChildGroup = groupView3;
            groupTypeView6.Data = null;
            groupTypeView6.Description = "Data Entry users of the System";
            groupTypeView6.Name = "AUG_DTO";
            groupTypeView6.SourcePoco = null;
            groupView6.SelectedGroupType = groupTypeView6;
            
            groupView6.WelcomeMessage = "welcome";
            groupView7.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView7.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView7.Data")));
            groupView7.Depth = 1;
            groupView7.Description = null;
            groupView7.IsActive = true;
            groupView7.Name = "Pluckers";
            groupView8.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView8.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView8.Data")));
            groupView8.Depth = 1;
            groupView8.Description = null;
            groupView8.IsActive = true;
            groupView8.Name = "Pluckers";
            groupView8.SelectedChildGroup = groupView8;
            groupTypeView7.Data = null;
            groupTypeView7.Description = "Tea Pluckers";
            groupTypeView7.Name = "RUG_P";
            groupTypeView7.SourcePoco = null;
            groupView8.SelectedGroupType = groupTypeView7;
            
            groupView8.WelcomeMessage = "welcome";
            groupView7.SelectedChildGroup = groupView8;
            groupTypeView8.Data = null;
            groupTypeView8.Description = "Tea Pluckers";
            groupTypeView8.Name = "RUG_P";
            groupTypeView8.SourcePoco = null;
            groupView7.SelectedGroupType = groupTypeView8;
            
            groupView7.WelcomeMessage = "welcome";
            groupView9.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView9.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView9.Data")));
            groupView9.Depth = 1;
            groupView9.Description = null;
            groupView9.IsActive = true;
            groupView9.Name = "Supervisers";
            groupView9.SelectedChildGroup = groupView4;
            groupTypeView9.Data = null;
            groupTypeView9.Description = "Tea Collection Supervisers";
            groupTypeView9.Name = "RUG_S";
            groupTypeView9.SourcePoco = null;
            groupView9.SelectedGroupType = groupTypeView9;
            
            groupView9.WelcomeMessage = "welcome";
            groupView10.CreatedDateTIme = new System.DateTime(2010, 5, 7, 0, 0, 0, 0);
            groupView10.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView10.Data")));
            groupView10.Depth = 1;
            groupView10.Description = null;
            groupView10.IsActive = true;
            groupView10.Name = "StoreKeepers";
            groupView10.SelectedChildGroup = groupView5;
            groupTypeView10.Data = null;
            groupTypeView10.Description = "Tea Store Keeper";
            groupTypeView10.Name = "RUG_SK";
            groupTypeView10.SourcePoco = null;
            groupView10.SelectedGroupType = groupTypeView10;
            
            groupView10.WelcomeMessage = "welcome";
            groupView11.CreatedDateTIme = new System.DateTime(2010, 7, 7, 0, 0, 0, 0);
            groupView11.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView11.Data")));
            groupView11.Depth = 1;
            groupView11.Description = null;
            groupView11.IsActive = true;
            groupView11.Name = "TeamCollectings";
            groupView11.SelectedChildGroup = groupView3;
            groupTypeView11.Data = null;
            groupTypeView11.Description = "Tea Cllection Operation";
            groupTypeView11.Name = "OG_TC";
            groupTypeView11.SourcePoco = null;
            groupView11.SelectedGroupType = groupTypeView11;
            
            groupView11.WelcomeMessage = "welcome";
            groupView12.CreatedDateTIme = new System.DateTime(2010, 7, 7, 0, 0, 0, 0);
            groupView12.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView12.Data")));
            groupView12.Depth = 1;
            groupView12.Description = null;
            groupView12.IsActive = true;
            groupView12.Name = "TeaWeightings";
            groupView12.SelectedChildGroup = groupView3;
            groupTypeView12.Data = null;
            groupTypeView12.Description = "Tea Weighting Operation";
            groupTypeView12.Name = "OG_SK";
            groupTypeView12.SourcePoco = null;
            groupView12.SelectedGroupType = groupTypeView12;
            
            groupView12.WelcomeMessage = "welcome";
            groupView13.CreatedDateTIme = new System.DateTime(2010, 5, 3, 0, 0, 0, 0);
            groupView13.Data = ((Demo.Framework.AdditionalData)(resources.GetObject("groupView13.Data")));
            groupView13.Depth = 1;
            groupView13.Description = null;
            groupView13.IsActive = true;
            groupView13.Name = "MachineOfPl1";
            groupView13.SelectedChildGroup = null;
            groupTypeView13.Data = null;
            groupTypeView13.Description = "Machine";
            groupTypeView13.Name = "M";
            groupTypeView13.SourcePoco = null;
            groupView13.SelectedGroupType = groupTypeView13;
            
            groupView13.WelcomeMessage = "welcome";
            this.groupCombo1.Items.AddRange(new object[] {
            groupView1,
            groupView6,
            groupView7,
            groupView9,
            groupView10,
            groupView11,
            groupView12,
            groupView13});
            this.groupCombo1.Location = new System.Drawing.Point(152, 40);
            this.groupCombo1.Name = "groupCombo1";
            this.groupCombo1.Size = new System.Drawing.Size(200, 21);
            this.groupCombo1.TabIndex = 14;
            this.groupCombo1.ValueMember = "Id";
            // 
            // GroupData
            // 
            this.Controls.Add(this.groupCombo1);
            this.Controls.Add(label1);
            this.Controls.Add(createdDateTImeLabel);
            this.Controls.Add(this.createdDateTImeDateTimePicker);
            this.Controls.Add(depthLabel);
            this.Controls.Add(this.depthTextBox);
            this.Controls.Add(descriptionLabel);
            this.Controls.Add(this.descriptionTextBox);
            this.Controls.Add(this.isActiveCheckBox);
            this.Controls.Add(nameLabel);
            this.Controls.Add(this.nameTextBox);
            this.Controls.Add(welcomeMessageLabel);
            this.Controls.Add(this.welcomeMessageTextBox);
            this.Name = "GroupData";
            this.Size = new System.Drawing.Size(727, 127);
            ((System.ComponentModel.ISupportInitialize)(this.groupViewBindingSource)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        public System.Windows.Forms.TextBox childGroupId1TextBox;
        public System.Windows.Forms.TextBox groupTypeIdTextBox;
        private System.Windows.Forms.BindingSource groupViewBindingSource;
        public System.Windows.Forms.DateTimePicker createdDateTImeDateTimePicker;
        public System.Windows.Forms.TextBox depthTextBox;
        public System.Windows.Forms.TextBox descriptionTextBox;
        public System.Windows.Forms.CheckBox isActiveCheckBox;
        public System.Windows.Forms.TextBox nameTextBox;
        public System.Windows.Forms.TextBox welcomeMessageTextBox;
        private Combos.GroupCombo groupCombo1;
        
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Virtusa Pvt. Ltd.
Sri Lanka Sri Lanka
In-depth coverage of Microsoft .Net, Cloud and many other cutting-edge Technologies.

- The Mandelbrot set – someone has called it the thumb-print of God – is one of the most beautiful and remarkable discoveries in the entire history of mathematics. My profile picture is generated with that equation.

You may contact Nirosh for Consultations, Code Reviews and Architecture Guide Workshops via c_nir*o*sh@hotmail.com (Remove * to use)



View Nirosh L.W.C.'s profile on LinkedIn


Other Links

Comments and Discussions