Exemple #1
0
        /// <summary>
        /// event-handler that is called when the PC should be synchronized after driving
        /// </summary>
        private void OnSynchronizeAfterDriving()
        {
            // INFO: you can upload the current control-unit settings here
            //       to get the driving statistics, positions, etc.

            VirtualHandset.ControlUnitSettings Settings = new VirtualHandset.ControlUnitSettings();

            // get all settings from the control-unit and check for error
            if (Handset.GetAllSettings(ref Settings) < 0)
            {
                MessageBox.Show("Could not get settings!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            // inform the virtual handset that we have finished synchronizing our data
            // NOTE: if you do not upload data, you do not need to call this function.
            Handset.SynchronizeAfterDrivingFinished();
        }