예제 #1
0
        private Control GetDescriptionControl(GeneralPageSummaryInfo objectInfo)
        {
            Control result = null;

            switch (this.descriptionControl)
            {
            case DescriptionControl.Label:
                result = new Label
                {
                    Name     = objectInfo.PropertyName.Replace('.', '_') + "TextBox",
                    Dock     = DockStyle.Top,
                    AutoSize = true
                };
                break;

            case DescriptionControl.TextBox:
                result = new ExchangeTextBox
                {
                    Name        = objectInfo.PropertyName.Replace('.', '_') + "TextBox",
                    ReadOnly    = true,
                    BorderStyle = BorderStyle.None,
                    Dock        = DockStyle.Top,
                    FormatMode  = objectInfo.FormatMode
                };
                break;
            }
            return(result);
        }
예제 #2
0
        private Control GetTextBoxEditor(FilterablePropertyDescription filterableProperty)
        {
            ExchangeTextBox exchangeTextBox = this.GetDisabledTextBoxEditor(filterableProperty) as ExchangeTextBox;

            exchangeTextBox.Enabled    = true;
            exchangeTextBox.FormatMode = filterableProperty.FormatMode;
            Binding binding = new Binding("Text", this.BindingSource, "Value", true, DataSourceUpdateMode.OnPropertyChanged);

            binding.BindingComplete += this.TextboxEditor_BindingCompleted;
            exchangeTextBox.DataBindings.Add(binding);
            return(exchangeTextBox);
        }
예제 #3
0
        private Control GetDisabledTextBoxEditor(FilterablePropertyDescription filterableProperty)
        {
            ExchangeTextBox exchangeTextBox;

            if (!this.valueTypeEditors.ContainsKey(FilterablePropertyValueEditor.DisabledTextBox))
            {
                exchangeTextBox          = new ExchangeTextBox();
                exchangeTextBox.Name     = "textBoxValue";
                exchangeTextBox.Dock     = DockStyle.Fill;
                exchangeTextBox.TabIndex = 2;
                this.valueTypeEditors.Add(FilterablePropertyValueEditor.DisabledTextBox, exchangeTextBox);
            }
            else
            {
                exchangeTextBox = (this.valueTypeEditors[FilterablePropertyValueEditor.DisabledTextBox] as ExchangeTextBox);
                exchangeTextBox.DataBindings.Clear();
                exchangeTextBox.Clear();
            }
            exchangeTextBox.Enabled = false;
            return(exchangeTextBox);
        }