コード例 #1
0
        private void btnRead_Click(object sender, EventArgs e)
        {
            this.txtOutput.Text = "";
            Output.EEProm.EEPromResult result = EEProm.ReadEEProm(false);
            this.txtOutput.Text = result.Output;

            this.SetData();

            MessageBox.Show(
                this,
                string.Format("EEProm Read {0}successful", result.Success ? "" : "not "),
                result.Success ? "Success" : "Error",
                MessageBoxButtons.OK,
                result.Success ? MessageBoxIcon.Information : MessageBoxIcon.Error);
        }
コード例 #2
0
        private void btnReadBootmode_Click(object sender, EventArgs e)
        {
            this.txtOutput.Text = "";
            MessageBox.Show("Bootmode required.  Ground pin 24 on eeprom chip for 5 seconds while powering up ecu before proceeding");
            Output.EEProm.EEPromResult result = EEProm.ReadEEProm(true);
            this.txtOutput.Text = result.Output;

            this.SetData();

            MessageBox.Show(
                this,
                string.Format("EEProm Read {0}successful", result.Success ? "" : "not "),
                result.Success ? "Success" : "Error",
                MessageBoxButtons.OK,
                result.Success ? MessageBoxIcon.Information : MessageBoxIcon.Error);
        }
コード例 #3
0
 private void btnWrite_Click(object sender, EventArgs e)
 {
     this.txtOutput.Text = "";
     if (DialogResult.OK ==
         MessageBox.Show(
             this,
             string.Format("This will write the contents of {0} to the EEProm.  Please verify that you have corrected checksums in the file before proceeding", txtBinPath.Text),
             "CAUTION",
             MessageBoxButtons.OKCancel,
             MessageBoxIcon.Exclamation,
             MessageBoxDefaultButton.Button2))
     {
         MessageBox.Show("Bootmode required.  Ground pin 24 on eeprom chip for 5 seconds while powering up ecu before proceeding");
         Output.EEProm.EEPromResult result = EEProm.WriteEEProm();
         this.txtOutput.Text = result.Output;
     }
 }
コード例 #4
0
        private void btnSaveToFile_Click(object sender, EventArgs e)
        {
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.FileName = EEProm.BinPath;
            if (dialog.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                Output.EEProm.EEPromResult result = EEProm.WriteFile(
                    dialog.FileName,
                    this.txtVIN.Text,
                    this.txtSKC.Text,
                    this.txtImmoID.Text,
                    this.txtImmoData.Text,
                    !this.chkImmoEnabled.Checked && !chkImmoDisabled.Checked ? new bool?() : new bool?(chkImmoEnabled.Checked),
                    this.chkFixDeathCode.Checked,
                    this.chkCorrectChecksums.Checked);
                this.txtOutput.Text = result.Output;
            }
        }