Example #1
0
        void button_SubitemSelected(object sender, int e)
        {
            SidebarButton button = (SidebarButton)sender;
            var           panel  = button.Panels[e];

            if (panel != selectedPanel)
            {
                OnPanelChanged(panel);
            }
        }
Example #2
0
        void button_SelectedChanged(object sender, EventArgs e)
        {
            SidebarButton button = (SidebarButton)sender;

            if (button.Selected)
            {
                if (selectedButton != null)
                {
                    selectedButton.Selected = false;
                }
                selectedButton = button;

                OnPanelChanged(button.Panels[0]);

                if (Selected != null)
                {
                    Selected(this, button);
                }
            }
        }
Example #3
0
 void sidebarButton_SelectedChanged(object sender, EventArgs e)
 {
     SidebarButton button = (SidebarButton)sender;
     if (button.Selected)
     {
         if (selectedButton != null)
         {
             ((Panel)selectedButton.Tag).Visible = false;
             selectedButton.Selected = false;
         }
         selectedButton = button;
         ((Panel)button.Tag).Visible = true;
     }
 }