예제 #1
0
 public int GetNodeIndex(BasicNode target)
 {
     for (int i = 0; i < NodeCount; i++)
     {
         if (vNodes[i] == target)
         {
             return(i);
         }
     }
     return(-1);
 }
예제 #2
0
파일: BasicNode.cs 프로젝트: mind0n/hive
		public int GetNodeIndex(BasicNode target)
		{
			for (int i = 0; i < NodeCount; i++)
			{
				if (vNodes[i] == target)
				{
					return i;
				}
			}
			return -1;
		}
예제 #3
0
파일: BasicNode.cs 프로젝트: mind0n/hive
		public void Disconnect(BasicNode target)
		{
			int i = GetNodeIndex(target);
			if (NodeOnDisconnect != null)
			{
				if ((byte)NodeOnDisconnect(this, target) == CancelOperation)
				{
					return;
				}
			}
			if (i >= 0)
			{
				vNodes[i] = null;
			}
		}
예제 #4
0
        public void Disconnect(BasicNode target)
        {
            int i = GetNodeIndex(target);

            if (NodeOnDisconnect != null)
            {
                if ((byte)NodeOnDisconnect(this, target) == CancelOperation)
                {
                    return;
                }
            }
            if (i >= 0)
            {
                vNodes[i] = null;
            }
        }
예제 #5
0
파일: BasicNode.cs 프로젝트: mind0n/hive
		public byte Connect(BasicNode target)
		{
			int i = GetNodeIndex(null);
			if (NodeOnDisconnect != null)
			{
				if ((byte)NodeOnDisconnect(this, target) == CancelOperation)
				{
					return CancelOperation;
				}
			}
			if (i < 0)
			{
				return ErrNodeListFull;
			}
			else
			{
				vNodes[i] = target;
				return Successful;
			}
		}
예제 #6
0
        public byte Connect(BasicNode target)
        {
            int  i = GetNodeIndex(null);
            byte rlt;

            if (NodeOnDisconnect != null)
            {
                if ((byte)NodeOnDisconnect(this, target) == CancelOperation)
                {
                    return(CancelOperation);
                }
            }
            if (i < 0)
            {
                return(ErrNodeListFull);
            }
            else
            {
                vNodes[i] = target;
                return(Successful);
            }
        }