/// <devdoc>
        /// </devdoc>
        public void Add(ExpressionBinding binding)
        {
            bindings[binding.PropertyName] = binding;
            RemovedBindingsTable.Remove(binding.PropertyName);

            OnChanged();
        }
 public void CopyTo(ExpressionBinding[] array, int index)
 {
     IEnumerator enumerator = this.GetEnumerator();
     while (enumerator.MoveNext())
     {
         array.SetValue(enumerator.Current, index++);
     }
 }
 public override bool Equals(object obj)
 {
     if ((obj != null) && (obj is ExpressionBinding))
     {
         ExpressionBinding binding = (ExpressionBinding)obj;
         return(StringUtil.EqualsIgnoreCase(this._propertyName, binding.PropertyName));
     }
     return(false);
 }
예제 #4
0
        public override bool Equals(object obj)
        {
            if (!(obj is ExpressionBinding))
            {
                return(false);
            }

            ExpressionBinding o = (ExpressionBinding)obj;

            return(o.Expression == expression &&
                   o.ExpressionPrefix == prefix &&
                   o.PropertyName == propertyName &&
                   o.PropertyType == propertyType);
        }
        /// <devdoc>
        /// </devdoc>
        public void Add(ExpressionBinding binding) {
            bindings[binding.PropertyName] = binding;
            RemovedBindingsTable.Remove(binding.PropertyName);

            OnChanged();
        }
 public void Add(ExpressionBinding binding)
 {
     list.Add(binding.PropertyName, binding);
     OnChanged(new EventArgs());
 }
 public void Remove(ExpressionBinding binding)
 {
     Remove(binding.PropertyName, true);
 }
 private void SaveCurrentExpressionBinding()
 {
     if (this._expressionBuilderComboBox.SelectedItem == this.NoneItem)
     {
         this._currentNode.Binding = null;
         this._currentNode.IsValid = true;
     }
     else
     {
         string expression = this._currentSheet.GetExpression();
         PropertyDescriptor propertyDescriptor = this._currentNode.PropertyDescriptor;
         ExpressionBinding binding = new ExpressionBinding(propertyDescriptor.Name, propertyDescriptor.PropertyType, this._expressionBuilderComboBox.SelectedItem.ToString(), expression);
         this._currentNode.Binding = binding;
         this._currentNode.IsValid = this._currentSheet.IsValid;
     }
     this._bindingsDirty = true;
 }
 public BindablePropertyNode(System.ComponentModel.PropertyDescriptor propDesc, ExpressionBinding binding)
 {
     this._binding = binding;
     this._propDesc = propDesc;
     this._isValid = true;
     base.Text = propDesc.Name;
     base.ImageIndex = base.SelectedImageIndex = this.IsBound ? (this.IsGenerated ? 2 : 1) : 0;
 }
 public void Add(ExpressionBinding binding)
 {
 }
예제 #11
0
		public void Add (ExpressionBinding binding)
		{
			list.Add (binding.PropertyName, binding);
            		OnChanged (new EventArgs ());
        	}
예제 #12
0
 public void Add(ExpressionBinding binding)
 {
 }
예제 #13
0
 public void Remove(ExpressionBinding binding)
 {
 }
 private object EnsureParsedExpression(TemplateControl templateControl, ExpressionBinding eb, object parsedData)
 {
     if ((parsedData == null) && (templateControl != null))
     {
         string str;
         System.Type type = ExpressionEditor.GetExpressionBuilderType(eb.ExpressionPrefix, base.Component.Site, out str);
         if (type == null)
         {
             return parsedData;
         }
         try
         {
             System.Web.Compilation.ExpressionBuilder builder = (System.Web.Compilation.ExpressionBuilder) Activator.CreateInstance(type);
             ExpressionBuilderContext context = new ExpressionBuilderContext(templateControl);
             parsedData = builder.ParseExpression(eb.Expression, eb.PropertyType, context);
         }
         catch (Exception exception)
         {
             IComponentDesignerDebugService service = (IComponentDesignerDebugService) this.GetService(typeof(IComponentDesignerDebugService));
             if (service != null)
             {
                 service.Fail(System.Design.SR.GetString("ControlDesigner_CouldNotGetExpressionBuilder", new object[] { eb.ExpressionPrefix, exception.Message }));
             }
         }
     }
     return parsedData;
 }
 public void CopyTo (ExpressionBinding[] array, int index)
 {
   Contract.Requires (array != null);
 }
 public void Remove(ExpressionBinding binding)
 {
     Contract.Requires(binding != null);
 }
 public void Remove(ExpressionBinding binding)
 {
 }
 public void CopyTo(ExpressionBinding[] array, int index)
 {
 }
 /// <devdoc>
 /// </devdoc>
 public void CopyTo(ExpressionBinding[] array, int index) {
     for (IEnumerator e = this.GetEnumerator(); e.MoveNext();)
         array.SetValue(e.Current, index++);
 }
예제 #20
0
 	public void CopyTo (ExpressionBinding [] bindings, int index)
 	{
     		if (index < 0)
         		throw new ArgumentNullException ("Index cannot be negative");
     		if (index >= bindings.Length)
         		throw new ArgumentException ("Index cannot be greater than or equal to length of array passed");            
     		if (list.Count > (bindings.Length - index + 1))
         		throw new ArgumentException ("Number of elements in source is greater than available space from index to end of destination");
     
     		foreach (string key in list.Keys)
         		bindings [index++] = (ExpressionBinding) list [key];
 	}
 /// <devdoc>
 /// </devdoc>
 public void Remove(ExpressionBinding binding) {
     Remove(binding.PropertyName, true);
 }
 public void Remove (ExpressionBinding binding)
 {
   Contract.Requires (binding != null);
 }