private static void initializeSelectComponents(LabelsWindow window) { window.select.Visible = window.cancel.Visible = window.cancel.Enabled = true; window.delete.Visible = window.edit.Visible = false; window.labelsGrid.CellDoubleClick -= window.labelsGrid_CellContentDoubleClick_1; window.labelsGrid.CellDoubleClick += window.select_Click; }
public static Label ShowLabels(Asset asset, bool valueables=false) { LabelsWindow a = new LabelsWindow(asset, valueables); initializeSelectComponents(a); if (a.ShowDialog() == DialogResult.OK) { return a.SelectedLabel; } return null; }
public static Label ShowLabels() { LabelsWindow a = new LabelsWindow(); initializeSelectComponents(a); if (a.ShowDialog() == DialogResult.OK) { return a.SelectedLabel; } return null; }