//Edit IEditable item private void pbDashboard_DoubleClick(object sender, EventArgs e) { if (btnSelect.Checked && (_selectedIndex > -1)) { if (_items[_selectedIndex] is IEditable) { frmEditIEditable editor = new frmEditIEditable((IEditable)_items[_selectedIndex], this); editor.ShowDialog(); } } }
private void MenuEditObject(object sender, EventArgs e) { if (_menuItem == null) { return; } if (_menuItem is IEditable) { frmEditIEditable editor = new frmEditIEditable((IEditable)_menuItem, this); editor.ShowDialog(); } pbDashboard.Refresh(); }