Пример #1
0
        public HornViewModel()
        {
            mRobot = RobotFactory.GetRobotInstance();

            SendOnCommand  = new RelayCommand(TurnOn);
            SendOffCommand = new RelayCommand(TurnOff);
        }
Пример #2
0
 // Sends Commands Msg to robot, if Verification is True
 protected void SendCommandsToRobot()
 {
     if (VerifyReadyToSendMsg())
     {
         RobotFactory.GetRobotInstance().SendMsg(GetMsg(), true);
     }
 }
Пример #3
0
        public RobotFigureViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            robot.HeadingUpated += Robot_HeadingUpated;

            EventManager.OnRobotPathChanged += OnRobotPathUpdated;
        }
Пример #4
0
        public RGBViewModel()
        {
            mRobot = RobotFactory.GetRobotInstance();

            SendOnCommand   = new RelayCommand(TurnOn);
            SendOffCommand  = new RelayCommand(TurnOff);
            SendLoopCommand = new RelayCommand(TurnLoop);
            SetColorCommand = new RelayCommand(SetColor);
        }
Пример #5
0
        public LedViewModel(Light type)
        {
            mType  = type;
            mRobot = RobotFactory.GetRobotInstance();

            SendOnCommand   = new RelayCommand(TurnOn);
            SendOffCommand  = new RelayCommand(TurnOff);
            SendLoopCommand = new RelayCommand(TurnLoop);
        }
Пример #6
0
        public HeadingCalibrationViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            SetNorthCommand = new RelayCommand(SetNorth);
            SetEastCommand  = new RelayCommand(SetEast);
            SetSouthCommand = new RelayCommand(SetSouth);
            SetWestCommand  = new RelayCommand(SetWest);
        }
Пример #7
0
        public DirectControlViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            MoveFWDCommand      = new RelayCommand(MoveFWD);
            MoveBCKCommand      = new RelayCommand(MoveBCK);
            TurnLeftCommand     = new RelayCommand(TurnLeft);
            TurnRightCommand    = new RelayCommand(TurnRight);
            StopMovementCommand = new RelayCommand(Stop);
        }
        public ConnectionSettingsViewModel()
        {
            robot = RobotFactory.GetRobotInstance();

            IsConnected = robot.IsConnected();

            ComPorts = new List <string>();
            ComPorts.AddRange(SerialPort.GetPortNames());

            robot.ConnectionStatusChanged += Robot_ConnectionStatusChanged;

            ConnectCommand    = new RelayCommand(ConnectToRobot);
            DisconnectCommand = new RelayCommand(DisconnectToRobot);
        }