/// <summary> /// Constructor. Protected because we don't want anyone creating a base class instance. /// </summary> protected BaseCommand() { DG200FileLogger.Log("BaseCommand constructor.", 3); this._session = null; this._currentResult = null; this._serialConnection = null; }
private DG200SerialConnection getSerialConnection() { if (this._dgSerialConnection == null) { ComboBoxItem selected = this.cbPorts.SelectedItem as ComboBoxItem; this._dgSerialConnection = new DG200SerialConnection(selected.Content as string); } return(this._dgSerialConnection); }
public void setSerialConnection(DG200SerialConnection sc) { this._sc = sc; }
/// <summary> /// Set the serial connection for the command. /// </summary> /// <param name="sc">The new serial connection.</param> public void setSerialConnection(DG200SerialConnection sc) { this._serialConnection = sc; this._serialConnection.setCommand(this); }