예제 #1
0
 /// <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;
 }
예제 #2
0
        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);
        }
예제 #3
0
 public void setSerialConnection(DG200SerialConnection sc)
 {
     this._sc = sc;
 }
예제 #4
0
 /// <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);
 }