void UnitView_KeyUp(object sender, KeyEventArgs e) { if (MullionToolActive) { if (e.Key == Key.H) { HorizontalMullionChecked = true; return; } else if (e.Key == Key.V) { VerticalMullionChecked = true; return; } } if (SelectToolActive) { if (e.Key == Key.Delete) { var selectedNode = SelectionEventHandler.SelectedNode; if (selectedNode is Mullion) { PItemRemove.RemoveShiftLeftMullion((Mullion)selectedNode); } else if (selectedNode is Sash || selectedNode is Filling) { PItemRemove.RemoveItem(selectedNode); } return; } } }
private void menuItem_Click(object sender, EventArgs e) { PItemRemove.RemoveItem(SelectionEventHandler.SelectedNode); }