コード例 #1
0
ファイル: SettingsForm.cs プロジェクト: qqj1228/SH_OBD_DLL
 public SettingsForm(DllSettings dllSettings, MainSettings mainSettings, ModelLocal db)
 {
     InitializeComponent();
     _dllSettings  = dllSettings;
     _mainSettings = mainSettings;
     _db           = db;
 }
コード例 #2
0
        private void ToolStripBtnSettings_Click(object sender, EventArgs e)
        {
            DllSettings  dllSettings  = _obdIfEx.OBDIf.DllSettings;
            MainSettings mainSettings = _obdIfEx.MainSettings;
            SettingsForm settingsForm = new SettingsForm(dllSettings, mainSettings, _obdTest.DbLocal);

            settingsForm.ShowDialog();
            _obdIfEx.SaveDllSettings(dllSettings);
            _obdIfEx.SaveMainSettings(mainSettings);
            StatusLabelCommProtocol.Text = _obdIfEx.OBDIf.GetProtocol().ToString();
            StatusLabelAppProtocol.Text  = _obdIfEx.OBDIf.GetStandard().ToString();
            StatusLabelDeviceType.Text   = _obdIfEx.OBDIf.GetDevice().ToString().Replace("ELM327", "SH-VCI-302U");
            if (dllSettings.AutoDetect)
            {
                StatusLabelPort.Text = "自动探测";
            }
            else
            {
                StatusLabelPort.Text = dllSettings.ComPortName;
            }
            settingsForm.Dispose();
        }
コード例 #3
0
ファイル: OBDIfEx.cs プロジェクト: qqj1228/SH_OBD_WPF
 public void SaveMainSettings(MainSettings mainSettings)
 {
     MainSettings = mainSettings;
     SaveSetting(mainSettings, _mainSettings_xml);
 }