- private void 集成对话框ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- var newIfField = new TXTextControl.DocumentServer.Fields.IfField();
- newIfField.ApplicationField.DoubledInputPosition = true;
- newIfField.ApplicationField.Editable = false;
- newIfField.ApplicationField.ShowActivated = true;
- if (newIfField.ShowDialog() == TXTextControl.DocumentServer.Fields.DialogResult.OK)
- {
- textControl1.ApplicationFields.Add(newIfField.ApplicationField);
- }
- }
- private void 通过代码插入ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- var newIfField = new TXTextControl.DocumentServer.Fields.IfField();
- newIfField.ApplicationField.DoubledInputPosition = true;
- newIfField.ApplicationField.Editable = false;
- newIfField.ApplicationField.ShowActivated = true;
- newIfField.Expression1 = "id"; // 该属性的名称会与数据源中的列名进行匹配
- newIfField.Expression2 = "AAA"; // 用户比较的标准值
- newIfField.FalseText = "判断失败时显示的文字";
- newIfField.TrueText = "判断成功时显示的文字";
- newIfField.Operator = TXTextControl.DocumentServer.Fields.IfField.RelationalOperator.Equals;
- newIfField.Text = "{IF}";
- textControl1.ApplicationFields.Add(newIfField.ApplicationField);
- }
复制代码
11049_IFField.zip
(11.88 KB, 下载次数: 280)
|