void OnWriteDataClick(object sender, EventArgs e) { NodeData data = (NodeData)(sender as ToolStripItem).Tag; NodeData newdata = Iec61850Controller.PrepareWriteData(data); EditValue ev = new EditValue(newdata); ev.HideUpdateTimestamp(); DialogResult r = ev.ShowDialog(); if (r == DialogResult.OK) { data.DataValue = newdata.DataValue; ctrl.WriteData(data, true); } }