Пример #1
0
 private void LeftClick(object sender, MouseEventArgs e)
 {
     if (e.Button.Equals(MouseButtons.Left))
     {
         if (selected)
         {
             PropertyPanelManager.DeselectPropertyPanel();
             selected = false;
             Refresh();
         }
         else
         {
             PropertyPanelManager.SetPropertyPanel(property);
             UserControllerManager.Select(this);
             PropertyPanelManager.SetPropertyName();
             selected = true;
             Refresh();
         }
     }
 }
Пример #2
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            base.OnMouseUp(e);

            if (e.Button.Equals(MouseButtons.Left))
            {
                if (!selected)
                {
                    //base.BackColor = ActiveColor;
                    PropertyPanelManager.SetPropertyPanel(property);
                    UserControllerManager.Select(this);
                    PropertyPanelManager.SetPropertyName();
                }
                else
                {
                    Deselect();
                    PropertyPanelManager.DeselectPropertyPanel();
                }
            }
            else if (e.Button.Equals(MouseButtons.Right))
            {
                Switch();
            }
        }
Пример #3
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (e.Button.Equals(MouseButtons.Left))
            {
                if (selected)
                {
                    PropertyPanelManager.DeselectPropertyPanel();
                    selected = false;
                }
                else
                {
                    PropertyPanelManager.SetPropertyPanel(property);
                    UserControllerManager.Select(this);
                    PropertyPanelManager.SetPropertyName();
                    selected = true;
                }
                Refresh();
            }

            else if (e.Button.Equals(MouseButtons.Right))
            {
                Switch();
            }
        }