예제 #1
0
        /// <summary>
        /// Inicializace panelu a jeho komponent
        /// </summary>
        protected void Initialize()
        {
            _Margins = 1;
            _OperatorButtonImageDefault = ImageName.DxFilterBoxMenu;
            _OperatorButtonImageName    = null;
            _ClearButtonImageDefault    = ImageName.DxFilterClearFilter;
            _ClearButtonImage           = null;
            _ClearButtonToolTipTitle    = DxComponent.Localize(MsgCode.DxFilterBoxClearTipTitle);
            _ClearButtonToolTipText     = DxComponent.Localize(MsgCode.DxFilterBoxClearTipText);

            _OperatorButton               = DxComponent.CreateDxMiniButton(0, 0, 24, 24, this, OperatorButton_Click, tabStop: false);
            _FilterText                   = DxComponent.CreateDxTextEdit(24, 0, 200, this, tabStop: true);
            _FilterText.KeyDown          += FilterText_KeyDown;
            _FilterText.KeyUp            += FilterText_KeyUp;
            _FilterText.EditValueChanged += _FilterText_EditValueChanged;

            _ClearButton = DxComponent.CreateDxMiniButton(224, 0, 24, 24, this, ClearButton_Click, tabStop: false);

            _FilterText.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            this.BorderStyle        = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
            this.Leave += DxFilterBox_Leave;

            AcceptOperators();
            _CurrentText = "";
            FilterValueChangedSources = DxFilterBoxChangeEventSource.Default;
            LastFilterValue           = null;
        }