Esempio n. 1
0
 public string[] CheckClient(Cables cab1)
 {
     string[] badClient = new string[this.getClientList().Length];
     for (int i = 0; i < cab1.getClientList().Length; i++)
     {
         if (cab1.getClientList()[i].getName() == this.name)
         {
             badClient[i] = this.name;
         }
     }
     return(badClient);
 }
Esempio n. 2
0
        public static void Advertise(Cables A)
        {
            Console.WriteLine("What channel to advertise?");
            string adChannel = Console.ReadLine();

            for (int i = 0; i < A.getClientList().Length; i++)
            {
                for (int j = 0; i < A.getClientList()[i].getChannels().Length; j++)
                {
                    if (A.getClientList()[i].getChannels()[j] != adChannel)
                    {
                        Console.WriteLine(A.getClientList()[i].getNumber());
                    }
                    else
                    {
                        Console.WriteLine("Client already has the channel");
                    }
                }
            }
        }