private void Agregar_boton_toolStripButton_Click(object sender, EventArgs e) { Editor_Boton_Relay __EDITOR = new Editor_Boton_Relay(); if (__EDITOR.ShowDialog() == DialogResult.OK) { Boton_Relay __CONTROL = new Boton_Relay(__EDITOR.Boton, menu_contextMenuStrip); plantilla_panel.Controls.Add(__CONTROL); } }
private void Modificar_toolStripMenuItem_Click(object sender, EventArgs e) { if (menu_contextMenuStrip.SourceControl is Boton_Relay __BOTON) { Editor_Boton_Relay __EDITOR = new Editor_Boton_Relay { Boton = __BOTON.Obtener_Modulo() }; if (__EDITOR.ShowDialog() == DialogResult.OK) { __BOTON.Cargar_Modulo(__EDITOR.Boton); } } }
private void Duplicar_toolStripMenuItem_Click(object sender, EventArgs e) { if (menu_contextMenuStrip.SourceControl is Boton_Relay __BOTON) { Editor_Boton_Relay __EDITOR = new Editor_Boton_Relay { Boton = __BOTON.Obtener_Modulo() }; if (__EDITOR.ShowDialog() == DialogResult.OK) { plantilla_panel.Controls.Add(new Boton_Relay(__EDITOR.Boton, menu_contextMenuStrip)); } } }