المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : UI Delay [modified]



C# Programming
07-02-2009, 03:30 PM
I am having some trouble when I try to load some UI. If you can download my code http://www.2shared.com/file/6531405/908ada48/Delay.html[^ (http://www.2shared.com/file/6531405/908ada48/Delay.html)] and then click on the new file icon the graphics will show. I have 2 issues. firstly the panels, treview and property grids have a small but noticeable delay when they are being shown. You can see the controls incomplete as they are being drawn, it looks really messy. Is there a way to remove this delay?

Second, as you can see in the code I have a border around my UI. I dont think just drawing it is the best way to do it because when I resize the main window the *******ing causes the line to flicker. I have resulted in just turning it off when resizing. I think that it is possible to make a custom panel control and have this border drawn onto that. If so, and if it will solve the problem, can someone help me create this control.

Thanks


As requested my code is below.


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 MyShapesCollection;


namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
panel1.Visible = false;
}

private void toolStripButtonNew_Click(object sender, EventArgs e)
{


this.SuspendLayout();
panel1.Visible = true;
Paint1();
this.ResumeLayout();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void panelMB_Paint(object sender, PaintEventArgs e)
{
int _ShadowDistance = -11;

Shapes shapes = new Shapes();
Color Main = Color.FromArgb(105, 161, 191);
Color Border = Color.FromArgb(210, 230, 250);
Color Shine = Color.White;
Color Centre = Color.White;



shapes.Draw.ShadowedBorder(panelMB, e, _ShadowDistance, Main, Shine, Centre, Border);
}

private void toolStripButtonOpen_Click(object sender, EventArgs e)
{
panel1.Visible = false;
}

private void toolStripButtonSave_Click(object sender, EventArgs e)
{
Paint1();
}

public void Paint1()
{
int _ShadowDistance = -11;

Shapes shapes = new Shapes();
Color Main = Color.FromArgb(105, 161, 191);
Color Border = Color.FromArgb(210, 230, 250);
Color Shine = Color.White;
Color Centre = Color.White;


Rectangle clipRect = new Rectangle(panelMB.********, panelMB.Size);

Graphics g = panelMB.CreateGraphics();

PaintEventArgs a = new PaintEventArgs(g, clipRect);


shapes.Draw.ShadowedBorder(panelMB, a, _ShadowDistance, Main, Shine, Centre, Border);
}

private void Form1_Resize(object sender, EventArgs e)
{

}

private void Form1_ResizeBegin(object sender, EventArgs e)
{
panelMB.Paint-=new PaintEventHandler(panelMB_Paint);

}

private void Form1_ResizeEnd(object sender, EventArgs e)
{
panelMB.Paint += new PaintEventHandler(panelMB_Paint);
Paint1();

}
}
}







namespace WindowsFormsApplication1
{
partial class Form1
{
///
/// 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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.hScrollBar1 = new System.Windows.Forms.HScrollBar();
this.splitter1 = new System.Windows.Forms.Splitter();
this.panelMB = new System.Windows.Forms.Panel();
this.panelM = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panelML = new System.Windows.Forms.Panel();
this.splitter2 = new System.Windows.Forms.Splitter();
this.toolStripContainer2 = new System.Windows.Forms.ToolStripContainer();
this.treeView1 = new System.Windows.Forms.TreeView();
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
this.dataGridViewData = new System.Windows.Forms.DataGridView();
this.splitter3 = new System.Windows.Forms.Splitter();
this.panelMR = new System.Windows.Forms.Panel();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.labelPropertyGrid1 = new System.Windows.Forms.Label();
this.splitterMR = new System.Windows.Forms.Splitter();
this.toolStrip3 = new System.Windows.Forms.ToolStrip();
this.toolStripButtonCategorized = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonAlphabetical = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.panelMRB = new System.Windows.Forms.Panel();
this.propertyGrid2 = new System.Windows.Forms.PropertyGrid();
this.mainMenu = new System.Windows.Forms.MenuStrip();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButtonNew = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonOpen = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonSave = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSplitButtonUndo = new System.Windows.Forms.ToolStripSplitButton();
this.toolStripSplitButtonRedo = new System.Windows.Forms.ToolStripSplitButton();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonCut = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonCopy = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonPaste = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonDelete = new System.Windows.Forms.ToolStripButton();
this.RightToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.TopToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.LeftToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.BottomToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatausLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripContainer1.ContentPanel.SuspendLayout();
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
this.toolStripContainer1.SuspendLayout();
this.panel1.SuspendLayout();
this.panelMB.SuspendLayout();
this.panelM.SuspendLayout();
this.panel2.SuspendLayout();
this.panelML.SuspendLayout();
this.toolStripContainer2.ContentPanel.SuspendLayout();
this.toolStripContainer2.TopToolStripPanel.SuspendLayout();
this.toolStripContainer2.SuspendLayout();
this.toolStrip2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewData)).BeginInit();
this.panelMR.SuspendLayout();
this.toolStrip3.SuspendLayout();
this.panelMRB.SuspendLayout();
this.mainMenu.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// toolStripContainer1
//
//
// toolStripContainer1.ContentPanel
//
this.toolStripContainer1.ContentPanel.BackColor = System.Drawing.Color.Transparent;
this.toolStripContainer1.ContentPanel.Controls.Add(this.panel1);
this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(1119, 623);
this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStripContainer1.******** = new System.Drawing.Point(0, 0);
this.toolStripContainer1.Name = "toolStripContainer1";
this.toolStripContainer1.Size = new System.Drawing.Size(1119, 672);
this.toolStripContainer1.TabIndex = 8;
this.toolStripContainer1.Text = "toolStripContainer1";
//
// toolStripContainer1.TopToolStripPanel
//
this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.mainMenu);
this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1);
//
// panel1
//
this.panel1.Controls.Add(this.hScrollBar1);
this.panel1.Controls.Add(this.splitter1);
this.panel1.Controls.Add(this.panelMB);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.******** = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1119, 623);
this.panel1.TabIndex = 34;
//
// hScrollBar1
//
this.hScrollBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.hScrollBar1.******** = new System.Drawing.Point(0, 606);
this.hScrollBar1.Name = "hScrollBar1";
this.hScrollBar1.Size = new System.Drawing.Size(1118, 17);
this.hScrollBar1.TabIndex = 37;
this.hScrollBar1.Visible = false;
//
// splitter1
//
this.splitter1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter1.******** = new System.Drawing.Point(1118, 0);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(1, 623);
this.splitter1.TabIndex = 0;
this.splitter1.TabStop = false;
this.splitter1.Visible = false;
//
// panelMB
//
this.panelMB.Controls.Add(this.panelM);
this.panelMB.******** = new System.Drawing.Point(30, 30);
this.panelMB.MaximumSize = new System.Drawing.Size(900, 0);
this.panelMB.MinimumSize = new System.Drawing.Size(900, 400);
this.panelMB.Name = "panelMB";
this.panelMB.Padding = new System.Windows.Forms.Padding(10);
this.panelMB.Size = new System.Drawing.Size(900, 400);
this.panelMB.TabIndex = 36;
this.panelMB.Paint += new System.Windows.Forms.PaintEventHandler(this.panelMB_Paint);
//
// panelM
//
this.panelM.BackColor = System.Drawing.Color.White;
this.panelM.Controls.Add(this.panel2);
this.panelM.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelM.******** = new System.Drawing.Point(10, 10);
this.panelM.Margin = new System.Windows.Forms.Padding(0);
this.panelM.Name = "panelM";
this.panelM.Size = new System.Drawing.Size(880, 380);
this.panelM.TabIndex = 31;
//
// panel2
//
this.panel2.Controls.Add(this.panelML);
this.panel2.Controls.Add(this.splitter3);
this.panel2.Controls.Add(this.panelMR);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.******** = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(880, 380);
this.panel2.TabIndex = 22;
//
// panelML
//
this.panelML.BackColor = System.Drawing.Color.Transparent;
this.panelML.Controls.Add(this.splitter2);
this.panelML.Controls.Add(this.toolStripContainer2);
this.panelML.Controls.Add(this.dataGridViewData);
this.panelML.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelML.******** = new System.Drawing.Point(0, 0);
this.panelML.Margin = new System.Windows.Forms.Padding(0);
this.panelML.Name = "panelML";
this.panelML.Size = new System.Drawing.Size(419, 380);
this.panelML.TabIndex = 21;
//
// splitter2
//
this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter2.******** = new System.Drawing.Point(270, 0);
this.splitter2.Name = "splitter2";
this.splitter2.Size = new System.Drawing.Size(3, 380);
this.splitter2.TabIndex = 30;
this.splitter2.TabStop = false;
this.splitter2.Visible = false;
//
// toolStripContainer2
//
//
// toolStripContainer2.ContentPanel
//
this.toolStripContainer2.ContentPanel.Controls.Add(this.treeView1);
this.toolStripContainer2.ContentPanel.Size = new System.Drawing.Size(273, 355);
this.toolStripContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStripContainer2.******** = new System.Drawing.Point(0, 0);
this.toolStripContainer2.Name = "toolStripContainer2";
this.toolStripContainer2.Size = new System.Drawing.Size(273, 380);
this.toolStripContainer2.TabIndex = 2;
this.toolStripContainer2.Text = "toolStripContainer2";
//
// toolStripContainer2.TopToolStripPanel
//
this.toolStripContainer2.TopToolStripPanel.Controls.Add(this.toolStrip2);
//
// treeView1
//
this.treeView1.AllowDrop = true;
this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView1.******** = new System.Drawing.Point(0, 0);
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
this.treeView1.Name = "treeView1";
this.treeView1.Size = new System.Drawing.Size(273, 355);
this.treeView1.TabIndex = 1;
//
// toolStrip2
//
this.toolStrip2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1});
this.toolStrip2.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.toolStrip2.******** = new System.Drawing.Point(3, 0);
this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.Padding = new System.Windows.Forms.Padding(6, 0, 1, 0);
this.toolStrip2.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.toolStrip2.Size = new System.Drawing.Size(32, 25);
this.toolStrip2.TabIndex = 1;
this.toolStrip2.Text = "toolStrip2";
//
// dataGridViewData
//
this.dataGridViewData.AllowUserToAddRows = false;
this.dataGridViewData.AllowUserToDeleteRows = false;
this.dataGridViewData.AllowUserToResizeColumns = false;
this.dataGridViewData.AllowUserToResizeRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.dataGridViewData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
this.dataGridViewData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
this.dataGridViewData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridViewData.DefaultCellStyle = dataGridViewCellStyle11;
this.dataGridViewData.Dock = System.Windows.Forms.DockStyle.Right;
this.dataGridViewData.******** = new System.Drawing.Point(273, 0);
this.dataGridViewData.Name = "dataGridViewData";
this.dataGridViewData.ReadOnly = true;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewData.RowHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.dataGridViewData.RowHeadersVisible = false;
this.dataGridViewData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
this.dataGridViewData.RowTemplate.Height = 18;
this.dataGridViewData.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.dataGridViewData.Size = new System.Drawing.Size(146, 380);
this.dataGridViewData.TabIndex = 29;
this.dataGridViewData.Visible = false;
//
// splitter3
//
this.splitter3.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter3.******** = new System.Drawing.Point(419, 0);
this.splitter3.Name = "splitter3";
this.splitter3.Size = new System.Drawing.Size(3, 380);
this.splitter3.TabIndex = 28;
this.splitter3.TabStop = false;
//
// panelMR
//
this.panelMR.BackColor = System.Drawing.Color.Transparent;
this.panelMR.Controls.Add(this.propertyGrid1);
this.panelMR.Controls.Add(this.labelPropertyGrid1);
this.panelMR.Controls.Add(this.splitterMR);
this.panelMR.Controls.Add(this.toolStrip3);
this.panelMR.Controls.Add(this.panelMRB);
this.panelMR.Dock = System.Windows.Forms.DockStyle.Right;
this.panelMR.******** = new System.Drawing.Point(422, 0);
this.panelMR.Margin = new System.Windows.Forms.Padding(0);
this.panelMR.Name = "panelMR";
this.panelMR.Size = new System.Drawing.Size(458, 380);
this.panelMR.TabIndex = 2;
//
// propertyGrid1
//
this.propertyGrid1.AllowDrop = true;
this.propertyGrid1.CategoryForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(160)))), ((int)(((byte)(160)))));
this.propertyGrid1.CommandsBackColor = System.Drawing.Color.Yellow;
this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.SystemColors.ControlText;
this.propertyGrid1.CommandsLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid1.HelpVisible = false;
this.propertyGrid1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.propertyGrid1.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(236)))), ((int)(((byte)(250)))));
this.propertyGrid1.******** = new System.Drawing.Point(0, 45);
this.propertyGrid1.Margin = new System.Windows.Forms.Padding(0);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.PropertySort = System.Windows.Forms.PropertySort.Categorized;
this.propertyGrid1.Size = new System.Drawing.Size(458, 159);
this.propertyGrid1.TabIndex = 17;
this.propertyGrid1.ToolbarVisible = false;
//
// labelPropertyGrid1
//
this.labelPropertyGrid1.BackColor = System.Drawing.Color.Transparent;
this.labelPropertyGrid1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.labelPropertyGrid1.Dock = System.Windows.Forms.DockStyle.Top;
this.labelPropertyGrid1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelPropertyGrid1.ForeColor = System.Drawing.Color.DimGray;
this.labelPropertyGrid1.******** = new System.Drawing.Point(0, 25);
this.labelPropertyGrid1.Name = "labelPropertyGrid1";
this.labelPropertyGrid1.Size = new System.Drawing.Size(458, 20);
this.labelPropertyGrid1.TabIndex = 26;
this.labelPropertyGrid1.Text = "1";
//
// splitterMR
//
this.splitterMR.Dock = System.Windows.Forms.DockStyle.Bottom;
this.splitterMR.******** = new System.Drawing.Point(0, 204);
this.splitterMR.Name = "splitterMR";
this.splitterMR.Size = new System.Drawing.Size(458, 3);
this.splitterMR.TabIndex = 24;
this.splitterMR.TabStop = false;
//
// toolStrip3
//
this.toolStrip3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.toolStrip3.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButtonCategorized,
this.toolStripButtonAlphabetical,
this.toolStripSeparator4});
this.toolStrip3.******** = new System.Drawing.Point(0, 0);
this.toolStrip3.Name = "toolStrip3";
this.toolStrip3.Padding = new System.Windows.Forms.Padding(6, 0, 1, 0);
this.toolStrip3.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.toolStrip3.Size = new System.Drawing.Size(458, 25);
this.toolStrip3.TabIndex = 0;
this.toolStrip3.Text = "toolStrip3";
//
// toolStripButtonCategorized
//
this.toolStripButtonCategorized.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonCategorized.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonCategorized.Image")));
this.toolStripButtonCategorized.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonCategorized.Name = "toolStripButtonCategorized";
this.toolStripButtonCategorized.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonCategorized.Text = "toolStripButtonCategorized";
//
// toolStripButtonAlphabetical
//
this.toolStripButtonAlphabetical.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonAlphabetical.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonAlphabetical.Image")));
this.toolStripButtonAlphabetical.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonAlphabetical.Name = "toolStripButtonAlphabetical";
this.toolStripButtonAlphabetical.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonAlphabetical.Text = "toolStripButtonAlphabetical";
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25);
//
// panelMRB
//
this.panelMRB.Controls.Add(this.propertyGrid2);
this.panelMRB.Controls.Add(this.label1);
this.panelMRB.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelMRB.******** = new System.Drawing.Point(0, 207);
this.panelMRB.Margin = new System.Windows.Forms.Padding(0);
this.panelMRB.Name = "panelMRB";
this.panelMRB.Size = new System.Drawing.Size(458, 173);
this.panelMRB.TabIndex = 27;
//
// propertyGrid2
//
this.propertyGrid2.AllowDrop = true;
this.propertyGrid2.CategoryForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(160)))), ((int)(((byte)(160)))));
this.propertyGrid2.CommandsBackColor = System.Drawing.Color.Yellow;
this.propertyGrid2.CommandsDisabledLinkColor = System.Drawing.SystemColors.ControlText;
this.propertyGrid2.CommandsLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
this.propertyGrid2.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid2.HelpVisible = false;
this.propertyGrid2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.propertyGrid2.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(236)))), ((int)(((byte)(250)))));
this.propertyGrid2.******** = new System.Drawing.Point(0, 20);
this.propertyGrid2.Margin = new System.Windows.Forms.Padding(0);
this.propertyGrid2.Name = "propertyGrid2";
this.propertyGrid2.PropertySort = System.Windows.Forms.PropertySort.Categorized;
this.propertyGrid2.Size = new System.Drawing.Size(458, 153);
this.propertyGrid2.TabIndex = 25;
this.propertyGrid2.ToolbarVisible = false;
//
// mainMenu
//
this.mainMenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(227)))), ((int)(((byte)(239)))), ((int)(((byte)(255)))));
this.mainMenu.Dock = System.Windows.Forms.DockStyle.None;
this.mainMenu.GripMargin = new System.Windows.Forms.Padding(6, 2, 2, 2);
this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem1});
this.mainMenu.******** = new System.Drawing.Point(0, 0);
this.mainMenu.Name = "mainMenu";
this.mainMenu.Padding = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.mainMenu.Size = new System.Drawing.Size(1119, 24);
this.mainMenu.TabIndex = 0;
this.mainMenu.Text = "mainMenu";
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newToolStripMenuItem,
this.openToolStripMenuItem,
this.toolStripSeparator5,
this.saveToolStripMenuItem,
this.saveAsToolStripMenuItem,
this.toolStripSeparator6,
this.closeToolStripMenuItem,
this.toolStripSeparator7,
this.exitToolStripMenuItem});
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(37, 20);
this.toolStripMenuItem1.Text = "File";
//
// newToolStripMenuItem
//
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.newToolStripMenuItem.Text = "&New";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.openToolStripMenuItem.Text = "&Open";
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(149, 6);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveToolStripMenuItem.Text = "Save";
//
// saveAsToolStripMenuItem
//
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveAsToolStripMenuItem.Text = "Save As";
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(149, 6);
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.closeToolStripMenuItem.Text = "Close";
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(149, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "E&xit";
//
// toolStrip1
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButtonNew,
this.toolStripButtonOpen,
this.toolStripButtonSave,
this.toolStripSeparator2,
this.toolStripSplitButtonUndo,
this.toolStripSplitButtonRedo,
this.toolStripSeparator3,
this.toolStripButtonCut,
this.toolStripButtonCopy,
this.toolStripButtonPaste,
this.toolStripButtonDelete});
this.toolStrip1.******** = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Padding = new System.Windows.Forms.Padding(6, 0, 1, 0);
this.toolStrip1.Size = new System.Drawing.Size(1119, 25);
this.toolStrip1.Stretch = true;
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButtonNew
//
this.toolStripButtonNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonNew.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonNew.Image")));
this.toolStripButtonNew.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonNew.Name = "toolStripButtonNew";
this.toolStripButtonNew.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonNew.Text = "toolStripButtonNew";
this.toolStripButtonNew.Click += new System.EventHandler(this.toolStripButtonNew_Click);
//
// toolStripButtonOpen
//
this.toolStripButtonOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonOpen.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonOpen.Image")));
this.toolStripButtonOpen.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonOpen.Name = "toolStripButtonOpen";
this.toolStripButtonOpen.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonOpen.Text = "toolStripButtonOpen";
this.toolStripButtonOpen.Click += new System.EventHandler(this.toolStripButtonOpen_Click);
//
// toolStripButtonSave
//
this.toolStripButtonSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonSave.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonSave.Image")));
this.toolStripButtonSave.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonSave.Name = "toolStripButtonSave";
this.toolStripButtonSave.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonSave.Text = "toolStripButtonSave";
this.toolStripButtonSave.Click += new System.EventHandler(this.toolStripButtonSave_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
//
// toolStripSplitButtonUndo
//
this.toolStripSplitButtonUndo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripSplitButtonUndo.Enabled = false;
this.toolStripSplitButtonUndo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButtonUndo.Image")));
this.toolStripSplitButtonUndo.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripSplitButtonUndo.Name = "toolStripSplitButtonUndo";
this.toolStripSplitButtonUndo.Size = new System.Drawing.Size(32, 22);
this.toolStripSplitButtonUndo.Text = "toolStripSplitButtonUndo";
//
// toolStripSplitButtonRedo
//
this.toolStripSplitButtonRedo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripSplitButtonRedo.Enabled = false;
this.toolStripSplitButtonRedo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButtonRedo.Image")));
this.toolStripSplitButtonRedo.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripSplitButtonRedo.Name = "toolStripSplitButtonRedo";
this.toolStripSplitButtonRedo.Size = new System.Drawing.Size(32, 22);
this.toolStripSplitButtonRedo.Text = "toolStripSplitButtonRedo";
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);
//
// toolStripButtonCut
//
this.toolStripButtonCut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonCut.Enabled = false;
this.toolStripButtonCut.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonCut.Image")));
this.toolStripButtonCut.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonCut.Name = "toolStripButtonCut";
this.toolStripButtonCut.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonCut.Text = "toolStripButtonCut";
//
// toolStripButtonCopy
//
this.toolStripButtonCopy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonCopy.Enabled = false;
this.toolStripButtonCopy.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonCopy.Image")));
this.toolStripButtonCopy.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonCopy.Name = "toolStripButtonCopy";
this.toolStripButtonCopy.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonCopy.Text = "toolStripButtonCopy";
//
// toolStripButtonPaste
//
this.toolStripButtonPaste.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonPaste.Enabled = false;
this.toolStripButtonPaste.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonPaste.Image")));
this.toolStripButtonPaste.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonPaste.Name = "toolStripButtonPaste";
this.toolStripButtonPaste.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonPaste.Text = "toolStripButtonPaste";
//
// toolStripButtonDelete
//
this.toolStripButtonDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonDelete.Enabled = false;
this.toolStripButtonDelete.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonDelete.Image")));
this.toolStripButtonDelete.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonDelete.Name = "toolStripButtonDelete";
this.toolStripButtonDelete.Size = new System.Drawing.Size(23, 22);
this.toolStripButtonDelete.Text = "toolStripButtonDelete";
//
// RightToolStripPanel
//
this.RightToolStripPanel.******** = new System.Drawing.Point(0, 0);
this.RightToolStripPanel.Name = "RightToolStripPanel";
this.RightToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
this.RightToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.RightToolStripPanel.Size = new System.Drawing.Size(0, 0);
//
// TopToolStripPanel
//
this.TopToolStripPanel.******** = new System.Drawing.Point(0, 0);
this.TopToolStripPanel.Name = "TopToolStripPanel";
this.TopToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
this.TopToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.TopToolStripPanel.Size = new System.Drawing.Size(0, 0);
//
// LeftToolStripPanel
//
this.LeftToolStripPanel.******** = new System.Drawing.Point(0, 0);
this.LeftToolStripPanel.Name = "LeftToolStripPanel";
this.LeftToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
this.LeftToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.LeftToolStripPanel.Size = new System.Drawing.Size(0, 0);
//
// BottomToolStripPanel
//
this.BottomToolStripPanel.******** = new System.Drawing.Point(0, 0);
this.BottomToolStripPanel.Name = "BottomToolStripPanel";
this.BottomToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
this.BottomToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
this.BottomToolStripPanel.Size = new System.Drawing.Size(0, 0);
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(0, 17);
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatausLabel2,
this.toolStripProgressBar1,
this.toolStripStatusLabel1});
this.statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.statusStrip1.******** = new System.Drawing.Point(0, 672);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode;
this.statusStrip1.Size = new System.Drawing.Size(1119, 22);
this.statusStrip1.TabIndex = 7;
this.statusStrip1.Text = "statusStrip1";
//
// toolStripStatausLabel2
//
this.toolStripStatausLabel2.Name = "toolStripStatausLabel2";
this.toolStripStatausLabel2.Size = new System.Drawing.Size(33, 17);
this.toolStripStatausLabel2.Text = "Click";
//
// toolStripProgressBar1
//
this.toolStripProgressBar1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolStripProgressBar1.Name = "toolStripProgressBar1";
this.toolStripProgressBar1.Size = new System.Drawing.Size(100, 16);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.DimGray;
this.label1.******** = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(458, 20);
this.label1.TabIndex = 27;
this.label1.Text = "2";
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1119, 694);
this.Controls.Add(this.toolStripContainer1);
this.Controls.Add(this.RightToolStripPanel);
this.Controls.Add(this.TopToolStripPanel);
this.Controls.Add(this.LeftToolStripPanel);
this.Controls.Add(this.BottomToolStripPanel);
this.Controls.Add(this.statusStrip1);
this.Name = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResizeBegin += new System.EventHandler(this.Form1_ResizeBegin);
this.Resize += new System.EventHandler(this.Form1_Resize);
this.ResizeEnd += new System.EventHandler(this.Form1_ResizeEnd);
this.toolStripContainer1.ContentPanel.ResumeLayout(false);
this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
this.toolStripContainer1.TopToolStripPanel.PerformLayout();
this.toolStripContainer1.ResumeLayout(false);
this.toolStripContainer1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panelMB.ResumeLayout(false);
this.panelM.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panelML.ResumeLayout(false);
this.toolStripContainer2.ContentPanel.ResumeLayout(false);
this.toolStripContainer2.TopToolStripPanel.ResumeLayout(false);
this.toolStripContainer2.TopToolStripPanel.PerformLayout();
this.toolStripContainer2.ResumeLayout(false);
this.toolStripContainer2.PerformLayout();
this.toolStrip2.ResumeLayout(false);
this.toolStrip2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewData)).EndInit();
this.panelMR.ResumeLayout(false);
this.panelMR.PerformLayout();
this.toolStrip3.ResumeLayout(false);
this.toolStrip3.PerformLayout();
this.panelMRB.ResumeLayout(false);
this.mainMenu.ResumeLayout(false);
this.mainMenu.PerformLayout();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.ToolStripContainer toolStripContainer1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.HScrollBar hScrollBar1;
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.Panel panelMB;
private System.Windows.Forms.Panel panelM;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panelML;
private System.Windows.Forms.Splitter splitter2;
private System.Windows.Forms.ToolStripContainer toolStripContainer2;
private System.Windows.Forms.TreeView treeView1;
private System.Windows.Forms.ToolStrip toolStrip2;
private System.Windows.Forms.DataGridView dataGridViewData;
private System.Windows.Forms.Splitter splitter3;
private System.Windows.Forms.Panel panelMR;
private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.Label labelPropertyGrid1;
private System.Windows.Forms.Splitter splitterMR;
private System.Windows.Forms.ToolStrip toolStrip3;
private System.Windows.Forms.ToolStripButton toolStripButtonCategorized;
private System.Windows.Forms.ToolStripButton toolStripButtonAlphabetical;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.Panel panelMRB;
private System.Windows.Forms.PropertyGrid propertyGrid2;
private System.Windows.Forms.MenuStrip mainMenu;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButtonNew;
private System.Windows.Forms.ToolStripButton toolStripButtonOpen;
private System.Windows.Forms.ToolStripButton toolStripButtonSave;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripSplitButton toolStripSplitButtonUndo;
private System.Windows.Forms.ToolStripSplitButton toolStripSplitButtonRedo;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripButton toolStripButtonCut;
private System.Windows.Forms.ToolStripButton toolStripButtonCopy;
private System.Windows.Forms.ToolStripButton toolStripButtonPaste;
private System.Windows.Forms.ToolStripButton toolStripButtonDelete;
private System.Windows.Forms.ToolStripPanel RightToolStripPanel;
private System.Windows.Forms.ToolStripPanel TopToolStripPanel;
private System.Windows.Forms.ToolStripPanel LeftToolStripPanel;
private System.Windows.Forms.ToolStripPanel BottomToolStripPanel;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatausLabel2;
private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
}
}





using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

using System.Windows.Forms;

namespace MyShapesCollection
{
class Shapes
{

public GraphicsPath RoundedRectangle(Rectangle _Rectangle, float _Radius)
{

int X = _Rectangle.X;
int Y = _Rectangle.Y;

// make sure that we have a valid radius, too small and we have a problem
if (_Radius < 1)
_Radius = 1;



// Create a graphicspath object with the using operator so the framework
// can clean up the resources for us
// using (GraphicsPath _Path = new GraphicsPath())
{
GraphicsPath _Path = new GraphicsPath();
// build the rounded rectangle starting at the top line and going around
// until the line meets itself again
_Path.AddLine(X + _Radius, Y, X + _Rectangle.Width - (_Radius * 2), Y);
_Path.AddArc(X + _Rectangle.Width - (_Radius * 2), Y, _Radius * 2, _Radius * 2, 270, 90);
_Path.AddLine(X + _Rectangle.Width, Y + _Radius, X + _Rectangle.Width, Y + _Rectangle.Height - (_Radius * 2));
_Path.AddArc(X + _Rectangle.Width - (_Radius * 2), Y + _Rectangle.Height - (_Radius * 2), _Radius * 2, _Radius * 2, 0, 90);
_Path.AddLine(X + _Rectangle.Width - (_Radius * 2), Y + _Rectangle.Height, X + _Radius, Y + _Rectangle.Height);
_Path.AddArc(X, Y + _Rectangle.Height - (_Radius * 2), _Radius * 2, _Radius * 2, 90, 90);
_Path.AddLine(X, Y + _Rectangle.Height - (_Radius * 2), X, Y + _Radius);
_Path.AddArc(X, Y, _Radius * 2, _Radius * 2, 180, 90);


return _Path;

}
}
public LinearGradientBrush FillRec(Control picCanvas, Color GradientColour1, Color GradientColour2)
{

// fill the graphics path first
// using (LinearGradientBrush _Brush = new LinearGradientBrush(
// picCanvas.ClientRectangle, GradientColour1,GradientColour2, LinearGradientMode.Vertical))
{
// e.Graphics.FillPath(_Brush, _Path);
}

LinearGradientBrush _Brush = new LinearGradientBrush(
picCanvas.ClientRectangle, GradientColour1, GradientColour2, LinearGradientMode.Vertical);


return _Brush;
}


public void Shadow(PaintEventArgs e, GraphicsPath _Path, float _ShadowDistance)
{


// Move path by - shadow distance. this will allow the rec to stay stationary and the shadow to move with shadowdistance
Matrix _Matrix = new Matrix();

// tell the matrix to move the path up and back the designated distance
_Matrix.Translate(-_ShadowDistance, -_ShadowDistance);

// assign the matrix to the graphics path of the rounded rectangle
_Path.Transform(_Matrix);

// this is where we create the shadow effect, so we will use a
// pathgradientbursh
// using (PathGradientBrush _Brush = new PathGradientBrush(_Path))
{
PathGradientBrush _Brush = new PathGradientBrush(_Path);
// set the wrapmode so that the colors will layer themselves
// from the outer edge in
_Brush.WrapMode = WrapMode.Clamp;

// Create a color blend to manage our colors and positions and
// since we need 3 colors set the default length to 3
ColorBlend _ColorBlend = new ColorBlend(3);

// here is the important part of the shadow making process, remember
// the clamp mode on the colorblend object layers the colors from
// the outside to the center so we want our transparent color first
// followed by the actual shadow color. Set the shadow color to a
// slightly transparent DimGray, I find that it works best.
_ColorBlend.Colors = new Color[]{Color.Transparent,
Color.FromArgb(180, Color.DimGray),
Color.FromArgb(180, Color.DimGray)};

// our color blend will control the distance of each color layer
// we want to set our transparent color to 0 indicating that the
// transparent color should be the outer most color drawn, then
// our Dimgray color at about 10% of the distance from the edge
_ColorBlend.Positions = new float[] { 0f, .1f, 1f };

// assign the color blend to the pathgradientbrush
_Brush.InterpolationColors = _ColorBlend;





// fill the shadow with our pathgradientbrush
e.Graphics.FillPath(_Brush, _Path);
}

// since the shadow was drawm first we need to move the actual path
// up and back a little so that we can show the shadow underneath
// the object. To accomplish this we will create a Matrix Object
Matrix _Matrix1 = new Matrix();

// tell the matrix to move the path up and back the designated distance
_Matrix1.Translate(_ShadowDistance, _ShadowDistance);

// assign the matrix to the graphics path of the rounded rectangle
_Path.Transform(_Matrix1);













}

public Draw Draw = new Draw();
}
class Draw
{
public void FilledRect(PaintEventArgs e, Control picCanvas, float _RadiusI, Color RecColourI, Rectangle _Rectangle, float _ShadowDistance)
{
FilledRect(e, picCanvas, _RadiusI, RecColourI, _Rectangle, Color.Black, false, _ShadowDistance);
}

public void FilledRect(PaintEventArgs e, Control picCanvas, float _RadiusI, Color RecColourI, Rectangle _Rectangle, Color BorderColour, float _ShadowDistance)
{
FilledRect(e, picCanvas, _RadiusI, RecColourI, _Rectangle, BorderColour, true, _ShadowDistance);
}

private void FilledRect(PaintEventArgs e, Control picCanvas, float _Radius, Color RecColour, Rectangle _Rectangle, Color BorderColour, bool BorderBool, float _ShadowDistance)
{
Shapes shapes = new Shapes();

GraphicsPath _Path = shapes.RoundedRectangle(_Rectangle, _Radius);


LinearGradientBrush _Brush = shapes.FillRec(picCanvas, RecColour, RecColour);

if (_ShadowDistance < 0)
{
shapes.Shadow(e, _Path, _ShadowDistance);
}
//Fill Rectangles
e.Graphics.FillPath(_Brush, _Path);

if (BorderBool)
{
using (Pen _Pen = new Pen(BorderColour, 1f))
{
e.Graphics.DrawPath(_Pen, _Path);
}
}
}

public void ShadowedBorder(Control panelMB, PaintEventArgs e, float _ShadowDistance, Color Main, Color Shine, Color Centre, Color Border)
{



Shapes shapes = new Shapes();
// create the radius variable and set it equal to 20% the height of the rectangle
// this will determine the amount of bend at the corners
float _Radius = (int)(3);
Color BorderColour = Main;

Color RecColour = Shine;

int WidthO = 2;
int WidthI = 4;


//PADDING
int Width = WidthO + WidthI - 1;
Padding NewPadding = new Padding(Width, Width, Width - (int)_ShadowDistance, Width - (int)_ShadowDistance);
if (panelMB.Padding != NewPadding)
{
panelMB.Padding = NewPadding;
}
///////////


Rectangle _Rectangle = new Rectangle((int)(0), (int)(0),
(int)(panelMB.Width + (_ShadowDistance)), (int)(panelMB.Height + (_ShadowDistance)));

shapes.Draw.FilledRect(e, panelMB, _Radius, RecColour, _Rectangle, BorderColour, _ShadowDistance);



////////////////////////////////////////////////////////

//outer White
float _RadiusO = (int)(0);
Rectangle _RectangleO = new Rectangle((int)(_Rectangle.X) + WidthO, (int)(_Rectangle.Y) + WidthO,
(int)(_Rectangle.Width) - WidthO * 2 + 1, (int)(_Rectangle.Height) - WidthO * 2 + 1);
Color RecColourO = Border;

shapes.Draw.FilledRect(e, panelMB, _RadiusO, RecColourO, _RectangleO, 0);


/////////////////////////////////////////////////////
//inner rec



float _RadiusI = (int)(0);
Color RecColourI = Centre;

Rectangle _RectangleI = new Rectangle((int)(_Rectangle.X) + WidthI, (int)(_Rectangle.Y) + WidthI,
(int)(_Rectangle.Width) - WidthI * 2, (int)(_Rectangle.Height) - WidthI * 2);

shapes.Draw.FilledRect(e, panelMB, _RadiusI, RecColourI, _RectangleI, BorderColour, 0);
}
}
}


modified on Thursday, July 2, 2009 7:14 AM