private void testPIDClassBTN_Click(object sender, EventArgs e) { ObdPid op = new ObdPid(); op.Mode = "01"; op.PID = "0C"; op.Description = "Engine RPM"; op.Formula = "(256 * A + B) / 4"; op.Response = "10 20"; addRxTxMessage(op.Val); List <ObdPid> obdlist = new List <ObdPid>(); obdlist.Add(op); int opindex = obdlist.FindIndex(obdpid => obdpid.Mode.Equals("01") && obdpid.PID.Equals("0C")); ObdPid opfound = obdlist.Find(delegate(ObdPid found) { return(found.PID == "0C"); }); addRxTxMessage("" + opfound.Description + " " + opindex.ToString()); OBDSpecialPID test = new OBDSpecialPID(); test.pid0101("81076504"); }
private void testPIDClassBTN_Click(object sender, EventArgs e) { ObdPid op = new ObdPid(); op.Mode = "01"; op.PID = "0C"; op.Description = "Engine RPM"; op.Formula = "(256 * A + B) / 4"; op.Response = "10 20"; addRxTxMessage(op.Val); List<ObdPid> obdlist = new List<ObdPid>(); obdlist.Add(op); int opindex = obdlist.FindIndex(obdpid => obdpid.Mode.Equals("01") && obdpid.PID.Equals("0C")); ObdPid opfound = obdlist.Find(delegate(ObdPid found) { return found.PID == "0C"; }); addRxTxMessage("" + opfound.Description + " " + opindex.ToString()); OBDSpecialPID test = new OBDSpecialPID(); test.pid0101("81076504"); }