Esempio n. 1
0
        protected override void OnExecute(EventArgs e)
        {
            if (ActiveTextBox != null)
            {
                // PropertyGrids handle copy/paste on their own - below check fixes issue #20
                if (!PropertyGridHelper.IsPropertyGridControl(ActiveTextBox.Parent))
                {
                    ActiveTextBox.Paste();
                }
            }
            else if (SelectedNodes != null && UIController.Current.ClipboardObjects != null)
            {
                var pasteItems = UIController.Current.ClipboardObjects;
                var inserted   = UIController.Current.Handler.Actions.InsertObjects(pasteItems, SelectedNodes[0].Tag as ITabularNamedObject);

                if (inserted.Count > 0)
                {
                    UIController.Current.Goto(inserted[0] as ITabularNamedObject);
                }
            }
            base.OnExecute(e);
        }