コード例 #1
0
        private void SetEditorValue(object value)
        {
            RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement;

            editorElement.Value = value == null || string.IsNullOrEmpty(value.ToString()) ? string.Empty : value.ToString();
            this.originalValue  = (object)editorElement.Value;
        }
コード例 #2
0
        protected override void OnKeyUp(KeyEventArgs e)
        {
            RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement;

            if (editorElement == null || !editorElement.IsInValidState(true))
            {
                return;
            }
            int length = editorElement.Text.Length;

            switch (e.KeyCode)
            {
            case Keys.Left:
                if (this.selectionLength != 0 || (this.RightToLeft || this.selectionStart != 0) && (!this.RightToLeft || this.selectionStart != length))
                {
                    break;
                }
                this.ProcessKeyDown(e);
                break;

            case Keys.Right:
                if (this.selectionLength != 0 || (this.RightToLeft || this.selectionStart != length) && (!this.RightToLeft || this.selectionStart != 0))
                {
                    break;
                }
                this.ProcessKeyDown(e);
                break;
            }
        }
コード例 #3
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            RadBrowseEditorElement  editorElement = this.EditorElement as RadBrowseEditorElement;
            PropertyGridItemElement ownerElement  = this.OwnerElement as PropertyGridItemElement;

            if (ownerElement == null)
            {
                return;
            }
            switch (e.KeyCode)
            {
            case Keys.Return:
                if (!this.Validate())
                {
                    break;
                }
                ownerElement.PropertyTableElement.EndEdit();
                break;

            case Keys.Escape:
                ownerElement.Data.PropertyGridTableElement.CancelEdit();
                break;

            case Keys.Delete:
                if (editorElement.TextBoxItem.SelectionLength != editorElement.TextBoxItem.TextLength)
                {
                    break;
                }
                editorElement.Text = string.Empty;
                break;
            }
        }
コード例 #4
0
ファイル: RadBrowseEditor.cs プロジェクト: RichardHaggard/BDC
        protected virtual RadBrowseEditorElement CreateEditorElement()
        {
            RadBrowseEditorElement browseEditorElement = new RadBrowseEditorElement();
            int num = (int)browseEditorElement.SetDefaultValueOverride(RadElement.StretchVerticallyProperty, (object)true);

            return(browseEditorElement);
        }
コード例 #5
0
ファイル: RadBrowseEditor.cs プロジェクト: RichardHaggard/BDC
 protected override void CreateChildItems(RadElement parent)
 {
     base.CreateChildItems(parent);
     this.browseElement = this.CreateEditorElement();
     parent.Children.Add((RadElement)this.browseElement);
     this.WireEvents();
 }
コード例 #6
0
        public override void BeginEdit()
        {
            base.BeginEdit();
            RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement;

            editorElement.ValueChanging += new ValueChangingEventHandler(this.editorElement_ValueChanging);
            editorElement.ValueChanged  += new EventHandler(this.editorElement_ValueChanged);
            editorElement.DialogClosed  += new DialogClosedEventHandler(this.editorElement_DialogClosed);
            editorElement.KeyUp         += new KeyEventHandler(this.editorElement_KeyUp);
            editorElement.KeyDown       += new KeyEventHandler(this.editorElement_KeyDown);
        }
コード例 #7
0
        public override bool EndEdit()
        {
            base.EndEdit();
            RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement;

            editorElement.ValueChanging -= new ValueChangingEventHandler(this.editorElement_ValueChanging);
            editorElement.ValueChanged  -= new EventHandler(this.editorElement_ValueChanged);
            editorElement.KeyDown       -= new KeyEventHandler(this.editorElement_KeyDown);
            editorElement.KeyUp         -= new KeyEventHandler(this.editorElement_KeyUp);
            editorElement.TextBoxItem.HostedControl.LostFocus -= new EventHandler(this.HostedControl_LostFocus);
            return(true);
        }
コード例 #8
0
        public override bool EndEdit()
        {
            base.EndEdit();
            RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement;

            editorElement.ValueChanging -= new ValueChangingEventHandler(this.editorElement_ValueChanging);
            editorElement.ValueChanged  -= new EventHandler(this.editorElement_ValueChanged);
            editorElement.DialogClosed  -= new DialogClosedEventHandler(this.editorElement_DialogClosed);
            editorElement.KeyUp         -= new KeyEventHandler(this.editorElement_KeyUp);
            editorElement.KeyDown       -= new KeyEventHandler(this.editorElement_KeyDown);
            return(true);
        }
コード例 #9
0
        public override void BeginEdit()
        {
            base.BeginEdit();
            RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement;

            editorElement.ValueChanging += new ValueChangingEventHandler(this.editorElement_ValueChanging);
            editorElement.ValueChanged  += new EventHandler(this.editorElement_ValueChanged);
            editorElement.KeyDown       += new KeyEventHandler(this.editorElement_KeyDown);
            editorElement.KeyUp         += new KeyEventHandler(this.editorElement_KeyUp);
            editorElement.TextBoxItem.SelectAll();
            editorElement.TextBoxItem.TextBoxControl.Focus();
            editorElement.RightToLeft = this.RightToLeft;
            editorElement.TextBoxItem.HostedControl.LostFocus += new EventHandler(this.HostedControl_LostFocus);
        }
コード例 #10
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement;

            if (editorElement == null || !editorElement.IsInValidState(true))
            {
                return;
            }
            this.selectionStart  = editorElement.TextBoxItem.SelectionStart;
            this.selectionLength = editorElement.TextBoxItem.SelectionLength;
            if (e.KeyCode == Keys.Return && e.Modifiers != Keys.Control)
            {
                this.ProcessKeyDown(e);
            }
            else
            {
                if (e.KeyCode != Keys.Escape)
                {
                    return;
                }
                this.ProcessKeyDown(e);
                e.Handled = true;
            }
        }