예제 #1
0
 public void Event()
 {
     if (Buttonevent != null)
     {
         Buttonevent.Invoke(gameObject);
     }
     if (NodeEvent != null)
     {
         NodeEvent.Invoke();
     }
 }
예제 #2
0
        static void ClientThread_NodeEvent(object sender, NodeEventArgs e)
        {
            if (e.EventType == NodeEventType.LogOn)
            {
                // Kill other session if the user is a logged in user (ie not a RUNBBS.INI connection) and the user isn't allowed on multiple nodes
                if ((e.NodeInfo.User.UserId > 0) && (!e.NodeInfo.User.AllowMultipleConnections))
                {
                    KillOtherSession(e.NodeInfo.User.Alias, e.NodeInfo.Node);
                }
            }

            NodeEvent?.Invoke(sender, e);
            UpdateWhoIsOnlineFile();
        }
예제 #3
0
        /// <summary>
        /// Invokes the select event.
        /// </summary>
        /// <param name="index">Index.</param>
        protected override void InvokeSelect(int index)
        {
            if (!IsValid(index))
            {
                Debug.LogWarning("Incorrect index: " + index, this);
            }

            var node = NodesList[index].Node;

            selectedNodes.Add(node);

            base.InvokeSelect(index);

            NodeSelected.Invoke(node);
        }
예제 #4
0
        /// <summary>
        /// Invokes the deselect event.
        /// </summary>
        /// <param name="index">Index.</param>
        protected override void InvokeDeselect(int index)
        {
            if (!IsValid(index))
            {
                Debug.LogWarning("Incorrect index: " + index, this);
            }

            var node = NodesList[index].Node;

            if (DeselectCollapsedNodes || !IsNodeInTree(node) || Node2Index(node) != -1)
            {
                selectedNodes.Remove(node);
            }

            base.InvokeDeselect(index);

            NodeDeselected.Invoke(node);
        }
예제 #5
0
        public Point?Find(bool highlight)
        {
            this.bitmap = WowScreen.GetCroppedBitmap(highlight);

            Score?best = Score.ScorePoints(FindYellowPoints());

            var e = new NodeEventArgs()
            {
                Bitmap = this.bitmap
            };

            if (best != null && best.count > 2)
            {
                e.Point = best.point;
            }

            NodeEvent?.Invoke(this, e);

            this.bitmap.Dispose();

            return(best?.point);
        }
예제 #6
0
 /// <summary>
 /// Raises the deselect node event.
 /// </summary>
 /// <param name="index">Index.</param>
 /// <param name="component">Component.</param>
 protected void OnDeselectNode(int index, ListViewItem component)
 {
     NodeDeselected.Invoke(NodesList[index].Node);
 }
예제 #7
0
 /// <summary>
 /// Raises the toggle node event.
 /// </summary>
 /// <param name="index">Index.</param>
 protected void OnToggleNode(int index)
 {
     ToggleNode(index);
     NodeToggle.Invoke(NodesList[index].Node);
 }
예제 #8
0
 void NodeCheckboxChanged(int index)
 {
     OnNodeCheckboxChanged.Invoke(DataSource[index].Node);
 }
예제 #9
0
 public void OnExecute(BehaviourMachine machine)
 {
     OnExecuteEvent?.Invoke(machine, this);
 }