コード例 #1
0
 static void ValidateExpression(VisualBasicEditor etb)
 {
     string errorMessage;
     if (etb.DoValidation(new ExpressionValidationContext(etb), out errorMessage))
     {
         etb.UpdateValidationError(errorMessage);
     }
 }
コード例 #2
0
 internal ExpressionValidationContext(VisualBasicEditor etb)
 {
     Update(etb);
 }
コード例 #3
0
            internal void Update(VisualBasicEditor etb)
            {
                Fx.Assert(etb.OwnerActivity != null, "Owner Activity is null");
                this.EditingContext = etb.OwnerActivity.GetEditingContext();

                //setup ParserContext
                this.ParserContext = new ParserContext(etb.OwnerActivity)
                {
                    //callee is a ExpressionTextBox
                    Instance = etb,
                    //pass property descriptor belonging to epression's model property (if one exists)
                    PropertyDescriptor = (null != etb.expressionModelProperty ? ((ModelPropertyImpl)etb.expressionModelProperty).PropertyDescriptor : null),
                };

                this.ExpressionType = etb.ExpressionType;
                this.ValidatedExpressionText = this.ExpressionText;
                if (etb.expressionEditorInstance != null)
                {
                    this.ExpressionText = etb.expressionEditorInstance.Text;
                }
                else if (etb.editingTextBox != null)
                {
                    this.ExpressionText = etb.editingTextBox.Text;
                }
                else
                {
                    this.ExpressionText = etb.Text;
                }
                this.UseLocationExpression = etb.UseLocationExpression;
            }
コード例 #4
0
 public VisualBasicEditorAutomationPeer(VisualBasicEditor owner)
     : base(owner)
 {
 }