Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Event traffic calming

, 26 Jan 2013 CPOL
How to build an object to calm down event traffic.
using System.Windows.Forms;

namespace CalmedClient
{
    partial class MainForm
    {
        /// <summary>
        /// Designer variable used to keep track of non-visual components.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        
        /// <summary>
        /// Disposes resources used by the form.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing) {
                if (components != null) {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }
        
        /// <summary>
        /// This method is required for Windows Forms designer support.
        /// Do not change the method contents inside the source code editor. The Forms designer might
        /// not be able to load this method if it was changed manually.
        /// </summary>
        private void InitializeComponent()
        {
            this._ordersGrid = new System.Windows.Forms.DataGridView();
            this.Title = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.CreatedAt = new System.Windows.Forms.DataGridViewTextBoxColumn();
            ((System.ComponentModel.ISupportInitialize)(this._ordersGrid)).BeginInit();
            this.SuspendLayout();
            // 
            // _ordersGrid
            // 
            this._ordersGrid.AllowUserToAddRows = false;
            this._ordersGrid.AllowUserToDeleteRows = false;
            this._ordersGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this._ordersGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
                                    this.Title,
                                    this.CreatedAt});
            this._ordersGrid.Dock = System.Windows.Forms.DockStyle.Fill;
            this._ordersGrid.Location = new System.Drawing.Point(0, 0);
            this._ordersGrid.Name = "_ordersGrid";
            this._ordersGrid.ReadOnly = true;
            this._ordersGrid.Size = new System.Drawing.Size(324, 203);
            this._ordersGrid.TabIndex = 0;
            // 
            // Title
            // 
            this.Title.DataPropertyName = "Title";
            this.Title.HeaderText = "Title";
            this.Title.Name = "Title";
            this.Title.ReadOnly = true;
            this.Title.Width = 160;
            // 
            // CreatedAt
            // 
            this.CreatedAt.DataPropertyName = "CreatedAt";
            this.CreatedAt.HeaderText = "Created At";
            this.CreatedAt.Name = "CreatedAt";
            this.CreatedAt.ReadOnly = true;
            // 
            // MainForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(324, 203);
            this.Controls.Add(this._ordersGrid);
            this.Name = "MainForm";
            this.Text = "Calmed Client";
            this.Load += new System.EventHandler(this.MainFormLoad);
            ((System.ComponentModel.ISupportInitialize)(this._ordersGrid)).EndInit();
            this.ResumeLayout(false);
        }
        private System.Windows.Forms.DataGridViewTextBoxColumn CreatedAt;
        private System.Windows.Forms.DataGridViewTextBoxColumn Title;
        private System.Windows.Forms.DataGridView _ordersGrid;
    }
}

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)

Share

About the Author

Erich Ledesma
Software Developer SunHotels
Spain Spain
I Received a Bachelor's Degree in Computer Science at the Mathematics and Computer Science Faculty, University of Havana, Cuba.
 
I mainly work in web applications using C# and some Javascript. Some very few times do some Java.

| Advertise | Privacy | Mobile
Web02 | 2.8.141015.1 | Last Updated 26 Jan 2013
Article Copyright 2013 by Erich Ledesma
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid