FR=new FormRoutes (); (int x=0; x lt; toolStrip1.Items.Count; x ++)
{(toolStrip1.Items [x] .Name == toolStrip + FR.Name)
{. Items.RemoveAt (x);
}
}
} void FormDistance_AddToolStrip ()
{item=new ToolStripButton (); FormDistance=new FormDistance (); (toolStrip1.Items.Count!=0)
{haveButton=true; (ToolStripButton oldButton in this.toolStrip1.Items)
{(oldButton.Name == toolStrip + FormDistance.Name)
{= false ;;
}
} (haveButton)
{. Name= toolStrip + FormDistance.Name; .Text=FormDistance.Text; .Image=FormDistance.Icon.ToBitmap () ;. DisplayStyle=ToolStripItemDisplayStyle.ImageAndText; .CheckState=CheckState.Indeterminate; .Click +=new EventHandler (toolStripFormDistance_Click) ;. Items. Add (item);
}
}
{. Name= toolStrip + FormDistance.Name; .Text=FormDistance.Text; .Image=FormDistance.Icon.ToBitmap () ;. DisplayStyle=ToolStripItemDisplayStyle.ImageAndText; .CheckState=CheckState.Indeterminate; .Click +=new EventHandler (toolStripFormDistance_Click) ;. Items. Add (item);
}
} toolStripFormDistance_Click (object sender, EventArgs e)
{OpenForm=false; (Form Child in this.MdiChildren)
{(Child is FormDistance)
{= true;
}
} (OpenForm)
{index=0; (int x=0; x lt; this.MdiChildren.Length; x ++)
{(MdiChildren [x] .Name == FormDistance )
{= x;
}
} (this.ActiveMdiChild == this.MdiChildren [index])
{. MdiChildren [index] .WindowState=FormWindowState.Minimized;
}
{(MdiChildren [index] .Visible == true)
{. MdiChildren [index] .Activate ();
}
{. MdiChildren [index] .WindowState=FormWindowState.Normal; .MdiChildren [index] .Visible=true;
}
}
}
} void FormDistance_RemoveToolStrip ()
{FD=new FormDistance (); (int x=0; x lt; toolStrip1.Items.Count; x ++)
{(toolStrip1.Items [x] .Name == toolStrip + FD.Name)
{. Items.RemoveAt (x);
}
}
} void FormRevenue_AddToolStrip ()
{item=new ToolStripButton (); FormRevenue=new FormRevenue (); (toolStrip1.Items.Count!=0)
{haveButton=true; (ToolStripButton oldButton in this.toolStrip1.Items)
{(oldButton.Name == toolStrip + FormRevenue.Name)
{= false ;;
}
} (haveButton)
{. Name= toolStrip + FormRevenue.Name; .Text=FormRevenue.Text; .Image=FormRevenue.Icon.ToBitmap () ;. DisplayStyle=ToolStripItemDisplayStyle.ImageAndText; .CheckState=CheckState.Indeterminate; .Click +=new EventHandler (toolStripFormRevenue_Click) ;. Items. Add (item);
}
}
{. Name= toolStrip + FormRevenue.Name; .Text=FormRevenue.Text; .Image=FormRevenue.Icon.ToBitmap () ;. DisplayStyle=ToolStripItemDisplayStyle.ImageAndText; .CheckState=CheckState.Indeterminate; .Click +=new EventHandler (toolStripFormRevenue_Click) ;. Items. Add (item);
}
} toolStripFormRevenue_Click (object sender, EventArgs e)
{OpenForm=false; (Form Child in this.MdiChildren)
{(Child is FormRevenue)
{= true;
}
} (OpenForm)
{index=0; (int x=0; x lt; this.MdiChildren.Length; x ++)
{(MdiChildren [x] .Name == FormRevenue )
{= x;
}
} (this.ActiveMdiChild == this.MdiChildren [index])
{. MdiChildren [index] .WindowState=FormWindowState.Minimized;
}
{(MdiChildren [index] .Visible == true)
{. MdiChildren [index] .Activate ();
}
{. MdiChildren [index] .WindowState=FormWindowState.Normal; .MdiChildren [index] .Visible=true;
}
}...