private void buttonApply_Click(object sender, EventArgs e) { loader.Load(events); events.Clear(); this.listBoxEvents.Items.Clear(); this.CheckState(); }
void handler_AnalogCommandAccepted(double value, ushort index) { if (this.InvokeRequired) { this.BeginInvoke(new Action(() => handler_AnalogCommandAccepted(value, index))); } else { var output = String.Format("Accepted Analog: {0} - {1}", value, index); this.listBoxLog.Items.Add(output); if (checkBoxMapAnalog.Checked) { var changes = new ChangeSet(); changes.Update(new AnalogOutputStatus(value, 0x01, DateTime.Now), index); loader.Load(changes); } } }