示例#1
0
        public void Connected(string deviceId, PositionControllerResponse status)
        {
            Id = deviceId;

            if (deviceId != null && this.positionController.IsOkStatus(status.Status))
            {
                maxPosition              = 0;
                IsConnected              = true;
                PacketsTotalNumber       = 0;
                PacketsFailuresNumber    = 0;
                PacketsCrcFailuresNumber = 0;
                ConnectDisconnectTitle   = TITLE_DISCONNECT;
            }
            else
            {
                maxPosition            = 0;
                IsConnected            = false;
                ConnectDisconnectTitle = TITLE_CONNECT;
            }

            SetStatus("Connection attempt", PositionControllerCommand.NONE, status);

            DisconnectCommand.UpdateCanExecute();
            EmergencyStopCommand.UpdateCanExecute();
            ResetPositionControllerCommand.UpdateCanExecute();
            CalibratePositionControllerCommand.UpdateCanExecute();
        }
示例#2
0
 public void OnBusyChanged(bool isBusy)
 {
     DisconnectCommand.UpdateCanExecute();
     EmergencyStopCommand.UpdateCanExecute();
     ResetPositionControllerCommand.UpdateCanExecute();
     CalibratePositionControllerCommand.UpdateCanExecute();
 }