Exemplo n.º 1
0
Arquivo: Bike.cs Projeto: rene1997/ip2
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="commportNumber">The number of the commport the bike is connected to.</param>
 public Bike(string commportNumber)
 {
     bikeCommunication = new BikeCommunication(this);
     if (bikeCommunication.ConnectToCom(commportNumber))
     {
         usingComm = true;
         status = "Connected to " + commportNumber;
     }
     else //When there is nothing connected to the commport;
     {
         simulator = new Simulator();
         status = "Simulator";
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="commportNumber">The number of the commport the bike is connected to.</param>
 public Bike(string commportNumber)
 {
     bikeCommunication = new BikeCommunication(this);
     if (bikeCommunication.ConnectToCom(commportNumber))
     {
         usingComm = true;
         status    = "Connected to " + commportNumber;
     }
     else //When there is nothing connected to the commport;
     {
         simulator = new Simulator();
         status    = "Simulator";
     }
 }