Пример #1
0
        protected internal virtual void OnBindingCreating(object sender, BindingCreatingEventArgs e)
        {
            BindingCreatingEventHandler bindingCreating = this.BindingCreating;

            if (bindingCreating == null)
            {
                return;
            }
            bindingCreating((object)this, e);
        }
Пример #2
0
        protected virtual Binding CreateBinding(
            Control control,
            string propertyName,
            string dataMember)
        {
            Binding binding1           = (Binding)null;
            object  obj                = !(this.Manager is CurrencyManager) ? this.manager.Current : (object)(this.Manager as CurrencyManager).List;
            BindingCreatingEventArgs e = new BindingCreatingEventArgs(control, propertyName, obj, dataMember);

            this.OnBindingCreating((object)this, e);
            if (e.Cancel)
            {
                return(binding1);
            }
            Binding binding2 = new Binding(e.PropertyName, obj, e.DataMember, e.FormattingEnabled, DataSourceUpdateMode.OnPropertyChanged);

            this.OnBindingCreated((object)this, new BindingCreatedEventArgs(control, e.PropertyName, obj, e.DataMember, binding2));
            return(binding2);
        }
Пример #3
0
 private void DataEntryElement_BindingCreating(object sender, BindingCreatingEventArgs e)
 {
     this.OnBindingCreating((object)this, e);
 }