Пример #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;
                }
            }
        }
Пример #2
0
        private void shiftUpMnuItem_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.RemoveShiftLeftMullion(mullion);
        }