Click here to Skip to main content
15,892,927 members
Articles / Programming Languages / C#

Dealing with Progressive Operations

Rate me:
Please Sign up or sign in to vote.
4.92/5 (26 votes)
10 May 2010CPOL30 min read 38.5K   319   60  
Through a clean OOP solution to deal with progressive operations, I will implicitly show you how OOP principles can work together to make a full, clean solution.
namespace MultipleThreadsSample
{
    partial class frmMain
    {
        /// <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.mainMenu = new System.Windows.Forms.MenuStrip();
            this.mnuOptions = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuOptionsNewSearch = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuOptionsAbortAll = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
            this.mnuOptionsExit = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuWindow = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuWindowHorizontalTile = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuWindowVerticalTile = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuWindowCascade = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuWindowArrangeAll = new System.Windows.Forms.ToolStripMenuItem();
            this.mainMenu.SuspendLayout();
            this.SuspendLayout();
            // 
            // mainMenu
            // 
            this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.mnuOptions,
            this.mnuWindow});
            this.mainMenu.Location = new System.Drawing.Point(0, 0);
            this.mainMenu.MdiWindowListItem = this.mnuWindow;
            this.mainMenu.Name = "mainMenu";
            this.mainMenu.Size = new System.Drawing.Size(700, 24);
            this.mainMenu.TabIndex = 1;
            this.mainMenu.Text = "menuStrip1";
            // 
            // mnuOptions
            // 
            this.mnuOptions.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.mnuOptionsNewSearch,
            this.mnuOptionsAbortAll,
            this.toolStripMenuItem1,
            this.mnuOptionsExit});
            this.mnuOptions.Name = "mnuOptions";
            this.mnuOptions.Size = new System.Drawing.Size(56, 20);
            this.mnuOptions.Text = "&Options";
            // 
            // mnuOptionsNewSearch
            // 
            this.mnuOptionsNewSearch.Name = "mnuOptionsNewSearch";
            this.mnuOptionsNewSearch.Size = new System.Drawing.Size(152, 22);
            this.mnuOptionsNewSearch.Text = "&New search";
            this.mnuOptionsNewSearch.Click += new System.EventHandler(this.mnuOptionsNewSearch_Click);
            // 
            // mnuOptionsAbortAll
            // 
            this.mnuOptionsAbortAll.Name = "mnuOptionsAbortAll";
            this.mnuOptionsAbortAll.Size = new System.Drawing.Size(152, 22);
            this.mnuOptionsAbortAll.Text = "&Abort all";
            this.mnuOptionsAbortAll.Click += new System.EventHandler(this.mnuOptionsAbortAll_Click);
            // 
            // toolStripMenuItem1
            // 
            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size = new System.Drawing.Size(149, 6);
            // 
            // mnuOptionsExit
            // 
            this.mnuOptionsExit.Name = "mnuOptionsExit";
            this.mnuOptionsExit.Size = new System.Drawing.Size(152, 22);
            this.mnuOptionsExit.Text = "&Exit";
            this.mnuOptionsExit.Click += new System.EventHandler(this.mnuOptionsExit_Click);
            // 
            // mnuWindow
            // 
            this.mnuWindow.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.mnuWindowHorizontalTile,
            this.mnuWindowVerticalTile,
            this.mnuWindowCascade,
            this.mnuWindowArrangeAll});
            this.mnuWindow.Name = "mnuWindow";
            this.mnuWindow.Size = new System.Drawing.Size(57, 20);
            this.mnuWindow.Text = "&Window";
            // 
            // mnuWindowHorizontalTile
            // 
            this.mnuWindowHorizontalTile.Name = "mnuWindowHorizontalTile";
            this.mnuWindowHorizontalTile.Size = new System.Drawing.Size(150, 22);
            this.mnuWindowHorizontalTile.Text = "&Horizontal tile";
            this.mnuWindowHorizontalTile.Click += new System.EventHandler(this.mnuWindowHorizontalTile_Click);
            // 
            // mnuWindowVerticalTile
            // 
            this.mnuWindowVerticalTile.Name = "mnuWindowVerticalTile";
            this.mnuWindowVerticalTile.Size = new System.Drawing.Size(150, 22);
            this.mnuWindowVerticalTile.Text = "&Vertical tile";
            this.mnuWindowVerticalTile.Click += new System.EventHandler(this.mnuWindowVerticalTile_Click);
            // 
            // mnuWindowCascade
            // 
            this.mnuWindowCascade.Name = "mnuWindowCascade";
            this.mnuWindowCascade.Size = new System.Drawing.Size(150, 22);
            this.mnuWindowCascade.Text = "&Cascade";
            this.mnuWindowCascade.Click += new System.EventHandler(this.mnuWindowCascade_Click);
            // 
            // mnuWindowArrangeAll
            // 
            this.mnuWindowArrangeAll.Name = "mnuWindowArrangeAll";
            this.mnuWindowArrangeAll.Size = new System.Drawing.Size(150, 22);
            this.mnuWindowArrangeAll.Text = "&Arrange all";
            this.mnuWindowArrangeAll.Click += new System.EventHandler(this.mnuWindowArrangeAll_Click);
            // 
            // frmMain
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(700, 529);
            this.Controls.Add(this.mainMenu);
            this.IsMdiContainer = true;
            this.MainMenuStrip = this.mainMenu;
            this.Name = "frmMain";
            this.Text = "Multiple threads sample";
            this.mainMenu.ResumeLayout(false);
            this.mainMenu.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip mainMenu;
        private System.Windows.Forms.ToolStripMenuItem mnuOptions;
        private System.Windows.Forms.ToolStripMenuItem mnuOptionsNewSearch;
        private System.Windows.Forms.ToolStripMenuItem mnuOptionsAbortAll;
        private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem mnuOptionsExit;
        private System.Windows.Forms.ToolStripMenuItem mnuWindow;
        private System.Windows.Forms.ToolStripMenuItem mnuWindowHorizontalTile;
        private System.Windows.Forms.ToolStripMenuItem mnuWindowVerticalTile;
        private System.Windows.Forms.ToolStripMenuItem mnuWindowCascade;
        private System.Windows.Forms.ToolStripMenuItem mnuWindowArrangeAll;
    }
}

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
Technical Lead
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions