AGS.Editor.GUIEditor.PasteControlClick C# (CSharp) Метод

PasteControlClick() приватный Метод

private PasteControlClick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        private void PasteControlClick(object sender, EventArgs e)
        {
            GUIControl newControl = GUIControl.GetFromClipBoard();
            if (newControl != null)
            {

                newControl.Name = Factory.AGSEditor.GetFirstAvailableScriptName(newControl.ControlType);
                newControl.ZOrder = _gui.Controls.Count;
                newControl.ID = _gui.Controls.Count;
                newControl.MemberOf = null;

                newControl.Left = _currentMouseX / Factory.AGSEditor.CurrentGame.GUIScaleFactor;
                newControl.Top = _currentMouseY / Factory.AGSEditor.CurrentGame.GUIScaleFactor;
                _gui.Controls.Add(newControl);
                _selected.Clear();
                _selectedControl = newControl;
                _selected.Add(newControl);

                RaiseOnControlsChanged();
                Factory.AGSEditor.CurrentGame.NotifyClientsGUIControlAddedOrRemoved(_gui, newControl);

                Factory.GUIController.SetPropertyGridObject(newControl);

                bgPanel.Invalidate();
                UpdateCursorImage();
                // Revert back to Select cursor
                OnCommandClick(Components.GuiComponent.MODE_SELECT_CONTROLS);
            }
        }