예제 #1
0
        void PropertyGridBrowseEditor_DialogClosed(object sender, DialogClosedEventArgs e)
        {
            PropertyGridItemElement visualItem = this.OwnerElement as PropertyGridItemElement;

            if (visualItem != null && visualItem.IsInValidState(true))
            {
                visualItem.PropertyTableElement.EndEdit();
            }
        }
예제 #2
0
        public override void OnLostFocus()
        {
            PropertyGridItemElement visualItem = this.OwnerElement as PropertyGridItemElement;

            if (visualItem != null && visualItem.IsInValidState(true) && !visualItem.ElementTree.Control.Focused)
            {
                visualItem.PropertyTableElement.EndEdit();
            }
        }
예제 #3
0
        private void PropertyGridColorEditor_DialogClosed(object sender, DialogClosedEventArgs e)
        {
            PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement;

            if (ownerElement == null || !ownerElement.IsInValidState(true))
            {
                return;
            }
            ownerElement.PropertyTableElement.EndEdit();
        }
        protected override void OnLostFocus()
        {
            base.OnLostFocus();
            PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement;

            if (ownerElement == null || !ownerElement.IsInValidState(true) || (ownerElement.ElementTree.Control.Focused || ownerElement.ElementTree.Control.ContainsFocus))
            {
                return;
            }
            ownerElement.PropertyTableElement.EndEdit();
        }
예제 #5
0
        protected virtual void OnKeyPress(KeyPressEventArgs e)
        {
            if (e.KeyChar != '\r')
            {
                return;
            }
            PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement;

            if (ownerElement == null || !ownerElement.IsInValidState(true) || ownerElement.ElementTree.Control.Focused)
            {
                return;
            }
            ownerElement.PropertyTableElement.EndEdit();
        }