首页 > 代码库 > FormatRuleExpressionEditorForm 使用

FormatRuleExpressionEditorForm 使用

 /// <summary>        /// 高级查询        /// </summary>        /// <param name="sender"></param>        /// <param name="e"></param>        private void button1_Click(object sender, EventArgs e)        {            GridFormatRule condition = new GridFormatRule();            condition.Rule = new FormatConditionRuleExpression();            currentView.FormatRules.Add(condition);            FormatConditionRuleExpression rule = condition.Rule as FormatConditionRuleExpression;            if (rule == null) return;            using (ExpressionEditorForm form = new FormatRuleExpressionEditorForm(rule, null, rule.Expression))            {                form.StartPosition = FormStartPosition.CenterParent;                if (form.ShowDialog(this) == DialogResult.OK)                {                    rule.Expression = form.Expression;//查询表达式                }            }        }

 

FormatRuleExpressionEditorForm 使用