private void button7_Click(object sender, EventArgs e) { //add w1 temp component String name = textBox8.Text; String address = textBox6.Text; Guid id = Guid.NewGuid(); W1TempItem item = new W1TempItem(address, name, id); settings.SaveComponent(item); LoadSettings(); }
public TemperatureComponent(W1TempItem item) { this.item = item; address = item.Address; temperatureTile.nameLabel.Text = item.name; //update the ph value, every 2 seconds, IObservable <long> timer = Observable.Timer(TimeSpan.FromMilliseconds(0), TimeSpan.FromMilliseconds(2000)); IDisposable disposable = timer.Subscribe(x => { try { Update(); } catch (Exception ex) { } }); }