示例#1
0
        public CarWithFakeRegulators(DefaultCarController parent)
        {
            Controller = parent;
            CarInfo    = new CarInformations();

            SteeringWheelAngleRegulator = new FakeSteeringWheelRegulator();
            SpeedRegulator = new FakeSpeedRegulator();
            BrakeRegulator = new FakeBrakeRegulator();

            CarComunicator = new RealCarCommunicator(this);
        }
示例#2
0
        public CarWithFakeRegulators(DefaultCarController parent)
        {
            Controller = parent;
            CarInfo = new CarInformations();

            SteeringWheelAngleRegulator = new FakeSteeringWheelRegulator();
            SpeedRegulator = new FakeSpeedRegulator();
            BrakeRegulator = new FakeBrakeRegulator();

            CarComunicator = new RealCarCommunicator(this);
        }
示例#3
0
        public CarWithFakeCommunicator(DefaultCarController parent)
        {
            Controller = parent;
            CarInfo = new CarInformations();

            CarComunicator = new FakeCarCommunicator(this);

            SteeringWheelAngleRegulator = new PIDSteeringWheelAngleRegulator(this);
            SpeedRegulator = new PIDSpeedRegulator(this);
            BrakeRegulator = new PIDBrakeRegulator(this);

            CarComunicator.InitRegulatorsEventsHandling();
        }
示例#4
0
        public CarWithFakeCommunicator(DefaultCarController parent)
        {
            Controller = parent;
            CarInfo    = new CarInformations();

            CarComunicator = new FakeCarCommunicator(this);

            SteeringWheelAngleRegulator = new PIDSteeringWheelAngleRegulator(this);
            SpeedRegulator = new PIDSpeedRegulator(this);
            BrakeRegulator = new PIDBrakeRegulator(this);

            CarComunicator.InitRegulatorsEventsHandling();
        }
示例#5
0
        /// <summary>
        /// constructor which is initializing CarController on itself
        /// </summary>
        public MainWindow()
        {
            System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.AboveNormal;
            Controller = new DefaultCarController();

            InitializeComponent();

            ExternalEventsHandlingInit();

            this.KeyDown += new KeyEventHandler(MainWindow_KeyDown);

            //initialize timer
            mTimer.Elapsed += mTimer_Elapsed;
            mTimer.Start();
        }
示例#6
0
        /// <summary>
        /// constructor which is initializing CarController on itself
        /// </summary>
        public MainWindow()
        {
            System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.AboveNormal;
            Controller = new DefaultCarController();
            
            InitializeComponent();

            ExternalEventsHandlingInit();
            
            this.KeyDown += new KeyEventHandler(MainWindow_KeyDown);

            //initialize timer
            mTimer.Elapsed += mTimer_Elapsed;
            mTimer.Start();
        }
示例#7
0
        public ViewForm()
        {
            InitializeComponent();

            carController = new CarController.DefaultCarController();
            steeringWindow = new CarController.MainWindow(carController);
            steeringWindow.Show();
            steeringWindow.Activate();
        }
示例#8
0
 public JurekServer(int port)
     : base(port) {
         carController = new DefaultCarController();
 }