Exemplo n.º 1
0
 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node.Tag != null && e.Node.Tag is DmxFramework.Scene.Scene)
     {
         this.mAction      = new DmxFramework.Keyboard.Action((DmxFramework.Scene.Scene)e.Node.Tag);
         this.mAction.Path = e.Node.FullPath;
     }
     else if (e.Node.Tag != null && (e.Node.Tag is DmxFramework.Channels.DmxValue))
     {
         this.mAction      = new DmxFramework.Keyboard.Action((DmxFramework.Channels.Channel)e.Node.Parent.Tag, (DmxFramework.Channels.DmxValue)e.Node.Tag);
         this.mAction.Path = e.Node.FullPath;
     }
     else
     {
         this.mAction = null;
     }
 }
Exemplo n.º 2
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Tag != null && e.Node.Tag is DmxFramework.Scene.Scene)
            {
                this.mAction      = new DmxFramework.Keyboard.Action((DmxFramework.Scene.Scene)e.Node.Tag);
                this.mAction.Path = e.Node.FullPath;
            }
            else if (e.Node.Tag != null && (e.Node.Tag is DmxFramework.Channels.DmxValue))
            {
                this.mAction      = new DmxFramework.Keyboard.Action((DmxFramework.Channels.Channel)e.Node.Parent.Tag, (DmxFramework.Channels.DmxValue)e.Node.Tag);
                this.mAction.Path = e.Node.FullPath;
            }
            else
            {
                this.mAction = null;
            }

            if (mAction != null && OnDoubleClicked != null)
            {
                OnDoubleClicked(mAction);
            }
        }