Example #1
0
        private void ToolStripBtnSettings_Click(object sender, EventArgs e)
        {
            Settings     commSettings = m_obdInterface.CommSettings;
            DBandMES     dbandMES     = m_obdInterface.DBandMES;
            SettingsForm settingsForm = new SettingsForm(commSettings, dbandMES);

            settingsForm.ShowDialog();
            m_obdInterface.SaveCommSettings(commSettings);
            m_obdInterface.SaveDBandMES(dbandMES);
            StatusLabelCommProtocol.Text = m_obdInterface.GetProtocol().ToString();
            StatusLabelDeviceType.Text   = m_obdInterface.GetDevice().ToString();
            if (commSettings.AutoDetect)
            {
                StatusLabelPort.Text = "自动探测";
            }
            else
            {
                StatusLabelPort.Text = commSettings.ComPortName;
            }
            settingsForm.Dispose();
        }