private void edit_InputReceived(object sender, EditPacketEventArgs e) { if (EditPacketEvent != null) { EditPacketEvent.Invoke(sender, e); } }
void Graph_EditPacketEvent(object sender, EditPacketEventArgs e) { if (InvokeRequired) { Invoke(new EventHandler <EditPacketEventArgs>(Graph_EditPacketEvent), sender, e); } else { using (EditPacketForm frm = new EditPacketForm()) { frm.Frame = e.Frame; frm.Selector = e.SelectPath; frm.DisplayColor = ColorValueConverter.ToColor(e.Color); frm.DisplayTag = e.Tag; frm.ShowDisableEditor = true; frm.ShowReadOnly = true; if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { e.Frame = frm.Frame; } if (frm.DisableEditor) { if (e.Sender != null) { e.Sender.Enabled = false; } } } } }
private void service_EditPacketEvent(object sender, EditPacketEventArgs e) { if (EditPacketEvent != null) { EditPacketEvent(sender, e); } }
void _service_EditPacketEvent(object sender, EditPacketEventArgs e) { EditPacketForm frm = CreateEditor(e); try { frm.WaitEvent.WaitOne(); if (frm.DialogResult == DialogResult.OK) { e.Frame = frm.Frame; } if (frm.DisableEditor) { if (e.Sender != null) { e.Sender.Enabled = false; } } } finally { DisposeEditor(frm); } }
EditPacketForm CreateEditor(EditPacketEventArgs e) { if (InvokeRequired) { return((EditPacketForm)Invoke(new Func <EditPacketEventArgs, EditPacketForm>(CreateEditor), e)); } else { EditPacketForm frm = new EditPacketForm(); frm.Frame = e.Frame; frm.Selector = e.SelectPath; frm.DisplayColor = ColorValueConverter.ToColor(e.Color); frm.DisplayTag = e.Tag; frm.ShowDisableEditor = true; frm.ShowReadOnly = true; frm.Show(); frm.Activate(); return(frm); } }
private void service_EditPacketEvent(object sender, EditPacketEventArgs e) { EditPacketEvent?.Invoke(sender, e); }