//PH Change event handler...We'll display the current PH reading from the sensor to the //specified textbox as they come in void ph_sensor_PHChange(object sender, PHChangeEventArgs e) { try { phTxt.Text = e.PH.ToString(); potentialTxt.Text = ph_sensor.sensor.Potential.ToString(); } catch (PhidgetException ex) { MessageBox.Show(ex.Description); } }
//PH Changed event handler...display the current measured PH to the console. static void ph_sensor_PHChange(object sender, PHChangeEventArgs e) { Console.WriteLine("PH measured: {0}", e.PH.ToString()); }