Esempio n. 1
0
        private void toolStripButtonRuleRef_Click(object sender, EventArgs e)
        {
            DocOp op = this.GetSelectedOp();

            if (op is DocOpStatement)
            {
                DocOpStatement statement = (DocOpStatement)op;
                if (this.Rule is DocModelRuleAttribute)
                {
                    DocOpParameter param = new DocOpParameter();
                    param.Operation     = DocOpCode.LoadArgument;
                    param.AttributeRule = (DocModelRuleAttribute)this.Rule;
                    statement.Value     = param;
                }
                else if (this.Rule is DocModelRuleEntity)
                {
                    DocOpReference opref = new DocOpReference();
                    opref.Operation  = DocOpCode.LoadField;
                    opref.EntityRule = (DocModelRuleEntity)this.Rule;
                    statement.Value  = opref;
                }

                this.treeViewRules.SelectedNode.Text = op.ToString(this.Template);
            }
        }
Esempio n. 2
0
        private void toolStripButtonRuleRef_Click(object sender, EventArgs e)
        {
            DocOp op = this.GetSelectedOp();
            if (op is DocOpStatement)
            {
                DocOpStatement statement = (DocOpStatement)op;
                if (this.Rule is DocModelRuleAttribute)
                {
                    DocOpParameter param = new DocOpParameter();
                    param.Operation = DocOpCode.LoadArgument;
                    param.AttributeRule = (DocModelRuleAttribute)this.Rule;
                    statement.Value = param;
                }
                else if (this.Rule is DocModelRuleEntity)
                {
                    DocOpReference opref = new DocOpReference();
                    opref.Operation = DocOpCode.LoadField;
                    opref.EntityRule = (DocModelRuleEntity)this.Rule;
                    statement.Value = opref;
                }

                this.treeViewRules.SelectedNode.Text = op.ToString(this.Template);
            }
        }