コード例 #1
0
ファイル: NewTest.cs プロジェクト: Elpannol/IPR2
        public NewTest(string name, Results results, AddTraining addTraining)
        {
            this.results = results;
            InitializeComponent();
            FormClosing            += NewTest_FormClosing;
            _interval               = 1000;
            TrainingStateLabel.Text = "Start";

            // Create a connection to the bike using the simulator.
            connection = new BicycleConnection(name);
            // Initialise the rest of the attributes and start the timer
            Initialise(name, addTraining);
        }
コード例 #2
0
ファイル: NewTest.cs プロジェクト: Elpannol/IPR2
        public NewTest(string name, Results results, SerialPort serialPort, AddTraining addTraining)
        {
            this.results = results;
            InitializeComponent();
            FormClosing            += NewTest_FormClosing;
            TrainingStateLabel.Text = "Start";

            //TODO: change this if it makes the bicycle buffer f****d up
            _interval = 1000;

            // Create a connection to the real bike using the port.
            connection = new BicycleConnection(serialPort);
            // Initialise the rest of the attributes and start the timer
            Initialise(name, addTraining);
        }