コード例 #1
0
ファイル: Main.cs プロジェクト: Nerox9/NrxUSBController
        public Main()
        {
            InitializeComponent();

            AudioDeviceManager.RefreshDevices();
            PropertyPanelManager.SetPropertyPanel(propertyPanel);
            PanelManager.CorePanel     = corePanel;
            PanelManager.MainPanel     = mainPanel;
            PanelManager.ButtonPanel   = buttonPanel;
            PanelManager.PropertyPanel = propertyPanel;
            PanelManager.SidePanel     = sidePanel;
            PanelManager.TreeView      = treeView;

            DoubleBuffered = true;
        }
コード例 #2
0
        protected virtual void dragDrop(object sender, DragEventArgs e)
        {
            TreeNode      node       = (TreeNode)e.Data.GetData("System.Windows.Forms.TreeNode");
            TagProperties properties = (TagProperties)node.Tag;

            property = (ControllerProperty)Activator.CreateInstance(properties.PropertyType);

            property.userController = this;
            property.SetPropertyName(node.FullPath.Replace("\\", " - "));

            PropertyPanelManager.SetPropertyPanel(property);
            UserControllerManager.Select(this);
            PropertyPanelManager.SetPropertyName();
            Refresh();
        }
コード例 #3
0
ファイル: Pot.cs プロジェクト: Nerox9/NrxUSBController
 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();
         }
     }
 }
コード例 #4
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();
            }
        }
コード例 #5
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();
            }
        }