/// <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; }
private static void CreateDefaultOperatorItem(FilterBoxOperatorItems items, FilterBoxOperatorItems value, string hotKey, string imageName, MsgCode textCode, MsgCode toolTipCode, List <IMenuItem> menuItems) { if (!items.HasFlag(value)) { return; } menuItems.Add(new DataMenuItem() { ItemId = value.ToString(), HotKey = hotKey, ImageName = imageName, Text = DxComponent.Localize(textCode), ToolTipText = DxComponent.Localize(toolTipCode), Checked = false, Tag = value }); }