Ejemplo n.º 1
0
 private void AddSeperators(ref OneClickToolStrip targetToolStrip, int locationIndex)
 {
     if (targetToolStrip.Items.Count - 1 >= locationIndex + 1)
     {
         if (!(targetToolStrip.Items[locationIndex + 1] is ToolStripSeparator))
         {
             targetToolStrip.Items.Insert(locationIndex + 1, blankSeparator);
         }
         if (!(targetToolStrip.Items[locationIndex - 1] is ToolStripSeparator))
         {
             targetToolStrip.Items.Insert(locationIndex, blankSeparator);
         }
     }
     else
     {
         if (!(targetToolStrip.Items[locationIndex] is ToolStripSeparator))
         {
             targetToolStrip.Items.Add(blankSeparator);
         }
         if (!(targetToolStrip.Items[locationIndex - 1] is ToolStripSeparator))
         {
             targetToolStrip.Items.Insert(locationIndex, blankSeparator);
         }
     }
 }
Ejemplo n.º 2
0
 private void InitializeDropDownButton(OneClickToolStrip targetToolStrip)
 {
     dropDownControl.Visible         = false;
     dropDownControl.Font            = targetToolStrip.Font;
     dropDownControl.Text            = "Select Window";
     dropDownControl.Name            = "WindowList";
     dropDownControl.Image           = Properties.Resources.CascadeIcon;
     dropDownControl.DropDownClosed += DropDownControl_DropDownClosed;
     dropDownControl.DropDownOpened += DropDownControl_DropDownOpened;
     AddParentMenu();
     targetToolStrip.Items.Insert(targetToolStrip.Items.Count, dropDownControl);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Inserts the MunisToolBar into the specified toolstrip.
 /// </summary>
 /// <param name="targetStrip"></param>
 /// <param name="locationIndex"></param>
 public void InsertMunisDropDown(OneClickToolStrip targetStrip, int locationIndex = -1)
 {
     if (locationIndex >= 0)
     {
         targetStrip.Items.Insert(locationIndex, munisDropDown);
         AddSeperators(ref targetStrip, locationIndex);
     }
     else
     {
         targetStrip.Items.Add(munisDropDown);
         AddSeperators(ref targetStrip, targetStrip.Items.Count - 1);
     }
 }
Ejemplo n.º 4
0
 public void InsertWindowList(OneClickToolStrip targetToolStrip)
 {
     InitializeDropDownButton(targetToolStrip);
     SetVisibility();
 }