Beispiel #1
0
        /// <summary>
        /// Show Properties dialog. Return true if list is changed
        /// </summary>
        /// <param name="parent"></param>
        /// <returns></returns>
        public bool ShowPropertiesDialog(BaseControls.ImageBox.ImageCtl parent)
        {
            if (SelectionCount < 1)
            {
                return(false);
            }

            GraphicsProperties properties = GetProperties();
            PropertiesDialog   dlg        = new PropertiesDialog();

            dlg.Properties = properties;

            CommandChangeState c = new CommandChangeState(this);

            if (dlg.ShowDialog(parent) != DialogResult.OK)
            {
                return(false);
            }

            if (ApplyProperties(properties))
            {
                c.NewState(this);
                parent.AddCommandToHistory(c);
            }

            return(true);
        }
Beispiel #2
0
        public DragDropManager(BaseControls.ImageBox.ImageCtl owner)
        {
            frmOwner = owner;

            // ensure that parent form allows dropping
            frmOwner.AllowDrop = true;

            // subscribe to parent form's drag-drop events
            frmOwner.DragEnter += OnDragEnter;
            frmOwner.DragDrop  += OnDragDrop;
        }