Exemple #1
0
        public ControlPanelItem AddItem(int icon, string caption, string toolTip)
        {
            ControlPanelItem item = new ControlPanelItem(this, icon, caption, toolTip);

            m_ItemsDictionary.Add(caption, item);

            return(item);
        }
Exemple #2
0
        public ControlPanelItem AddItem(int icon, string caption, string toolTip, string tag, ItemClickEventHandler onClickEvent)
        {
            ControlPanelItem item = new ControlPanelItem(this, tag, icon, caption, toolTip);

            m_ItemsDictionary.Add(tag, item);

            item.ItemClickEvent += onClickEvent;

            return(item);
        }
Exemple #3
0
 public void SelectItem(ControlPanelItem item)
 {
     foreach (ControlPanelItem c_item in m_ItemsDictionary.Values)
     {
         if (item == null || c_item != item)
         {
             c_item.BarItem.Selected = false;
         }
     }
     if (item != null)
     {
         item.BarItem.Selected = true;
     }
 }
Exemple #4
0
        private void ButtonBar_ItemClick(object sender, GenericClickEventArgs <BarItem> e)
        {
            string           caption = (string)m_ButtonBar.SelectedItem.Tag;
            ControlPanelItem item    = m_ItemsDictionary[caption];

            item.ItemClickInvoke(sender, new ItemClickEventArgs(item, e.Button, ""));

            foreach (ControlPanelGroup group in Parent.GetGroups())
            {
                if (group != null && group != this && group.ButtonBar.SelectedItem != null)
                {
                    group.ButtonBar.SelectedItem.Selected = false;
                }
            }
        }
Exemple #5
0
        }                                        // readonly

        public ItemClickEventArgs(ControlPanelItem item, MouseButtons button, string s)
        {
            this.Item   = item;
            this.Button = button;
            this.Text   = s;
        }
 public ItemClickEventArgs(ControlPanelItem item, MouseButtons button, string s)
 {
     this.Item = item;
     this.Button = button;
     this.Text = s;
 }
 public void SelectItem(ControlPanelItem item)
 {
     foreach (ControlPanelItem c_item in m_ItemsDictionary.Values)
     {
         if (item == null || c_item != item)
             c_item.BarItem.Selected = false;
     }
     if (item != null)
         item.BarItem.Selected = true;
 }
        public ControlPanelItem AddItem(int icon, string caption, string toolTip, string tag, ItemClickEventHandler onClickEvent)
        {
            ControlPanelItem item = new ControlPanelItem(this, tag, icon, caption, toolTip);

            m_ItemsDictionary.Add(tag, item);

            item.ItemClickEvent += onClickEvent;

            return item;
        }
        public ControlPanelItem AddItem(int icon, string caption, string toolTip)
        {
            ControlPanelItem item = new ControlPanelItem(this, icon, caption, toolTip);

            m_ItemsDictionary.Add(caption, item);

            return item;
        }