LayoutFarm.DzBoardSample.UIControllerBox.OnKeyDown C# (CSharp) Method

OnKeyDown() protected method

protected OnKeyDown ( UIKeyEventArgs e ) : void
e LayoutFarm.UI.UIKeyEventArgs
return void
        protected override void OnKeyDown(UIKeyEventArgs e)
        {
            if (e.Ctrl)
            {
                switch (e.KeyCode)
                {
                    case UIKeys.C:
                        {
                            //copy this box to a clipboard***
                            //copy this content to clipboard 
                            this.DesignBoardModule.CopyToClipBoard(this.TargetBox as IDesignBox);
                        }
                        break;
                }
            }
            else
            {
                switch (e.KeyCode)
                {
                    case UIKeys.Delete:
                        {
                            //-------------------------------------
                            //add action history to design board?
                            //------------------------------------- 
                            //remove the target and its controller 
                            var masterCollectionSet = this.MasterSelectionSet;
                            this.RelaseTargetAndRemoveSelf();
                            if (masterCollectionSet != null)
                            {
                                //remove other from selection set too!
                                masterCollectionSet.NotifyRemoveUIElement(this);
                            }
                        }
                        break;
                }
            }
            base.OnKeyDown(e);
        }
        internal void RelaseTargetAndRemoveSelf()