Esempio n. 1
0
        public MainForm()
        {
            InitializeComponent();
            m_obdInterface               = new OBDInterface();
            m_obdInterface.OnConnect    += new OBDInterface.__Delegate_OnConnect(On_OBD_Connect);
            m_obdInterface.OnDisconnect += new OBDInterface.__Delegate_OnDisconnect(On_OBD_Disconnect);

            m_originFont = buttonDefaultFontStyle.Font;
            m_boldFont   = new Font(m_originFont, FontStyle.Bold);

            StatusLabelConnStatus.ForeColor = Color.Red;
            StatusLabelConnStatus.Text      = "OBD通讯接口未连接";
            StatusLabelDeviceName.Text      = "未获取到设备名";
            StatusLabelAppProtocol.Text     = "应用层协议待定";
            StatusLabelCommProtocol.Text    = m_obdInterface.GetProtocol().ToString();
            StatusLabelDeviceType.Text      = m_obdInterface.GetDevice().ToString();
            if (m_obdInterface.CommSettings != null)
            {
                if (m_obdInterface.CommSettings.AutoDetect)
                {
                    StatusLabelPort.Text = "自动探测";
                }
                else
                {
                    StatusLabelPort.Text = m_obdInterface.CommSettings.ComPortName;
                }
            }

            InitSubForm();
            this.Text = "SH_OBD - Ver " + MainFileVersion.AssemblyVersion;
        }
Esempio n. 2
0
 public TrackForm(OBDInterface obd)
 {
     m_obdInterface = obd;
     timeslip       = new Timeslip {
         Vehicle = m_obdInterface.ActiveProfile.Name
     };
     InitializeComponent();
     CheckConnection();
 }
Esempio n. 3
0
 public TerminalForm(OBDInterface obd)
 {
     m_obdInterface = obd;
     InitializeComponent();
     m_strPmt = "ELM > ";
     richText.SelectionFont  = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular);
     richText.SelectionColor = Color.Black;
     richText.AppendText(m_strPmt);
 }
Esempio n. 4
0
        public FuelEconomyForm(OBDInterface obd)
        {
            InitializeComponent();
            m_obdInterface = obd;
            m_RunThread    = true;
            IsWorking      = false;

            this.sensorInstantFuelConsumption.SetDisplayMode(1);
            this.sensorAvgFuelConsumption.SetDisplayMode(1);
            this.sensorAvgFuelEconomy.SetDisplayMode(1);
            this.sensorInstantFuelEconomy.SetDisplayMode(1);
            this.sensorTotalConsumed.SetDisplayMode(1);
            this.sensorDistance.SetDisplayMode(1);
            this.sensorTotalCost.SetDisplayMode(1);
            this.sensorCostPerMile.SetDisplayMode(1);
        }
Esempio n. 5
0
 public SensorGridForm(OBDInterface obd2)
 {
     try {
         InitializeComponent();
         m_obdInterface   = obd2;
         IsLogging        = false;
         btnStart.Enabled = false;
         btnReset.Enabled = false;
         btnSave.Enabled  = false;
         IsRunThread      = true;
         m_ListSensors    = new List <OBDParameter>();
         m_ListLog        = new List <SensorLogItem>();
     } catch (Exception ex) {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 6
0
 public SensorChartForm(OBDInterface obd2)
 {
     m_obdInterface = obd2;
     InitializeComponent();
     m_arraySensorValues = new List <DatedValue> [4];
     for (int i = 0; i < m_arraySensorValues.Length; i++)
     {
         m_arraySensorValues[i] = new List <DatedValue>();
     }
     m_dSensorMax  = new double[4];
     m_dSensorMin  = new double[4];
     dSensorValues = new double[4][];
     dSensorTimes  = new double[4][];
     sensorsEnable = new bool[4];
     sensorsIndex  = new int[4];
     unitsIndex    = new int[4];
 }
Esempio n. 7
0
 public TestForm(OBDInterface obd)
 {
     InitializeComponent();
     m_obdInterface = obd;
 }
Esempio n. 8
0
 public VehicleForm(OBDInterface obd)
 {
     InitializeComponent();
     m_obdInterface = obd;
     m_VehicleList  = m_obdInterface.VehicleProfiles;
 }
Esempio n. 9
0
 public FreezeFramesForm(OBDInterface obd)
 {
     InitializeComponent();
     m_obdInterface = obd;
 }
Esempio n. 10
0
 public DTCForm(OBDInterface obd2)
 {
     InitializeComponent();
     m_obdInterface = obd2;
     CheckConnection();
 }
Esempio n. 11
0
 public ReportGeneratorForm(OBDInterface obd2)
 {
     m_obdInterface = obd2;
     InitializeComponent();
 }
Esempio n. 12
0
 public OxygenSensorsForm(OBDInterface obd2)
 {
     m_obdInterface = obd2;
     InitializeComponent();
 }