private void OnShowFilterView() { // показываем фильтр пользователю var viewService = GetViewService(); var filterModel = new FilterViewModel { IsFilterMode = false, FilterExpression = _filter, MaxRowCount = null }; if (_fields != null) { foreach (var field in _fields) { filterModel.Fields.Add(field); } } var res = viewService.ShowDialogWindow(filterModel, true, false, "40%", "50%"); if (!res.HasValue || !res.Value) { return; } filterModel.MaxRowCount = null; filterModel.AcceptChanges(); var retFilter = filterModel.GetSqlExpression(); EditValue = string.IsNullOrEmpty(retFilter) ? EditValue : retFilter; _filter = EditValue.ToString(); }
void CustomFilterMemoEditControl_EditValueChanged(object sender, EditValueChangedEventArgs e) { if (EditValue != null) { _filter = EditValue.ToString(); } }
protected override void OnEditorKeyDown(KeyEventArgs e) { if ((this.EditValue != null) && (isKeyTagAdd(e.KeyCode)) && (!String.IsNullOrWhiteSpace(EditValue.ToString()))) { Properties.Tags.Add(new EditorButton() { Caption = EditValue.ToString().Trim() }); } }
/// <summary> /// Sets initial edited or selected index. /// </summary> private void SetSelectedValue() { if (EditValue.Equals(NullValue) && RememberSessionValues) { GetSessionValue(); } SelectedIndex = Items.IndexOf(Items.FindByValue(EditValue.ToString())); EditValue = NullValue; }
private void UpdateTextFromEditValue() { if (EditValue != null && EditValue.ToString() != string.Empty) { _textBox.Text = GetDisplayValue(EditValue); } else { _textBox.Text = ""; } }
protected override Size CalcPopupFormSize() { if (EditValue != null) { if (EditValue.ToString() == "") { blobForm.ClearPopupContainerContent(); } } return(blobForm.CalcBlobPopupFormSize()); }
protected override void OnEditValueChanged() { base.OnEditValueChanged(); if (EditValue != null) { if (EditValue.ToString() != "") { SetMenuItemEnabledMode(true); FileInfo info = GetFileInfo(); if (blobForm != null) { RetrieveInformation(info); } } } }
public ACCMaterial(Material m, Renderer r = null) { this.material = m; this.renderer = r; name = m.name; type = ShaderType.Resolve(m.shader.name); if (type == ShaderType.UNKNOWN) { return; //throw new Exception("ShaderType has not found:" + m.shader.name); } renderQueue.Set(m.renderQueue); rqEdit = renderQueue.ToString(); InitType(); }
private EditorButtonCollection ButtonsFromEditValue() { string[] Captions = EditValue.ToString().Split(",".ToCharArray()[0]); EditorButtonCollection res = new EditorButtonCollection(); foreach (string caption in Captions) { EditorButton button = new EditorButton() { Caption = caption, IsLeft = true, Kind = ButtonPredefines.Glyph }; AppearanceObject appearance = new AppearanceObject(); appearance.TextOptions.HAlignment = HorzAlignment.Near; button.Appearance.Assign(appearance); res.Insert(0, button); } return(res); }
protected override PopupBaseForm GetPopupForm() { if (blobForm == null) { blobForm = new CustomPopupForm(this); if (EditValue != null) { if (EditValue.ToString() != "") { RetrieveInformation(GetFileInfo()); } else { blobForm.ClearPopupContainerContent(); } } } return(blobForm); }
private void LenovoGridLookUpEdit_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e) { if (Properties.TextEditStyle == DevExpress.XtraEditors.Controls.TextEditStyles.Standard) { if (!IsPopupOpen) { try { //if (EditValue != null && EditValue.ToString().Length > 0) //{ // ClosePopup(); //} //else //{ if (e.KeyData == Keys.Escape || e.KeyData == Keys.Return || e.Control || e.Alt || e.Shift) { if (e.KeyData == Keys.Escape) { Properties.IsEscape = true; } ClosePopup(); SelectAll(); } else { if ((e.KeyCode.GetHashCode() >= 65 && e.KeyCode.GetHashCode() <= 90) || (e.KeyCode.GetHashCode() >= 48 && e.KeyCode.GetHashCode() <= 57) || (e.KeyCode.GetHashCode() >= 97 && e.KeyCode.GetHashCode() <= 105) || e.KeyCode.GetHashCode() == 91 || e.KeyCode.GetHashCode() == 8 || (EditValue != null && EditValue.ToString().Length > 0 && EditValue.ToString().Substring(EditValue.ToString().Length - 1, 1) == "?")) { ShowPopup(); } } } //} catch { }; } } }
/////////////////////////////////////////////////////////////////////////////////////////////// // Override(Event, Properties, Method...) /////////////////////////////////////////////////////////////////////////////////////////////// #region :: OnEditValueChanged :: EditValue가 변경되면 발생합니다. /// <summary> /// EditValue가 변경되면 발생합니다. /// </summary> protected override void OnEditValueChanged() { if (Properties.Buttons.Count < 3) { return; } if (EditValue == null || EditValue.ToString() != string.Empty) { Properties.Buttons[1].Enabled = true; Properties.Buttons[2].Enabled = true; } else { Properties.Buttons[1].Enabled = false; Properties.Buttons[2].Enabled = false; } Refresh(); }
protected override void OnEnter(EventArgs e) { base.OnEnter(e); if (EditValue == null) { return; } string[] myTags = EditValue.ToString().Split(",".ToCharArray()); Text = null; if ((myTags.Length > 1) && (ViewInfo.Item.Tags.Count == 0)) { foreach (string tag in myTags) { this.Properties.Tags.Add(new EditorButton() { Caption = tag }); } } }
void tooltip_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e) { if (e.SelectedControl != this) { return; } ToolTipControlInfo info = null; string text = ""; if (EditValue != null) { text = EditValue.ToString(); info = new ToolTipControlInfo(text, text); } if (info != null) { e.Info = info; } }
protected override void OnCreateControl() { base.OnCreateControl(); if (EditValue == null) { return; } if (EditValue is ArrayList) { foreach (var t in (EditValue as ArrayList)) { this.Properties.Tags.Add(new EditorButton() { Caption = t.ToString() }); } } if (EditValue.ToString().Split(",".ToCharArray()[0]).Length > 1) { string[] myTags = EditValue.ToString().Split(",".ToCharArray()); foreach (string tag in myTags) { this.Properties.Tags.Add(new EditorButton() { Caption = tag }); } } else if ((EditValue is string) && (EditValue.ToString().Length > 0)) { this.Properties.Tags.Add(new EditorButton() { Caption = EditValue.ToString() }); } EditValue = null; }
protected override void OnClickButton(EditorButtonObjectInfoArgs buttonInfo) { var obj = GridEditingObject as DoSoScheduleBase; obj.CreateDataSourceFromXml(); if (obj.ExcelDataSource != null) { using (var expressionEditorForm = new MyUnboundColumnExpressionEditorForm(obj.ExcelDataSource != null, new XRDesignerHost(null), EditValue?.ToString())) if (expressionEditorForm.ShowDialog() == DialogResult.OK) { EditValue = expressionEditorForm.Expression; } } if (obj.SqlDataSource != null) { using (var expressionEditorForm = new MyUnboundColumnExpressionEditorForm(obj.SqlDataSource.Result.FirstOrDefault(), new XRDesignerHost(null), EditValue?.ToString())) if (expressionEditorForm.ShowDialog() == DialogResult.OK) { EditValue = expressionEditorForm.Expression; } } }
/// <summary> /// Lấy ra giá trị /// </summary> /// <returns></returns> public object GetValue() { //return this.Text.Trim(); return(this.EditValue == null ? null : EditValue.ToString().Trim()); }