コード例 #1
0
ファイル: Captain.cs プロジェクト: WesDaniels/ColdBeer
        public void ConenctPingStream(PingStream pingStream)
        {
            _pingStream = pingStream;

            ThreadStart delagateDetect = new ThreadStart(ThreadDetect);
            Thread threadDetect = new Thread(delagateDetect);

            // Start Obsticle detection thread
            threadDetect.Start();
        }
コード例 #2
0
ファイル: Emulator.cs プロジェクト: WesDaniels/ColdBeer
        private void Form1_Load(object sender, EventArgs e)
        {
            DriveTrain driveTrain = new DriveTrain();
            driveTrain.ConnectFour(motor1, motor2);

            IPing ping = new xPing1();
            PingStream pingStream = new PingStream(ping);
            pingStream.PingList = new xPingList1();

            Captain captain = new Captain();

            captain.ConnectDriveTrain(driveTrain);
            captain.ConenctPingStream(pingStream);
        }