/// <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"; } }
/// <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"; } }