Exemplo n.º 1
0
        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;
                }
            }
        }
Exemplo n.º 2
0
        private void shiftDownMnuItem_Click(object sender, EventArgs e)
        {
            Mullion mullion = SelectionEventHandler.SelectedNode as Mullion;

            if (mullion == null || mullion.Model.Orientation != UrcieSln.Domain.Entities.Orientation.Horizontal)
            {
                throw new InvalidOperationException("Invalid mullion");
            }

            PItemRemove.RemoveShiftRightMullion(mullion);
        }
Exemplo n.º 3
0
 private void menuItem_Click(object sender, EventArgs e)
 {
     PItemRemove.RemoveItem(SelectionEventHandler.SelectedNode);
 }