private object GetDataSourceNullValue(System.Type type)
 {
     if (!this.dsNullValueSet)
     {
         return(Formatter.GetDefaultDataSourceNullValue(type));
     }
     return(this.dsNullValue);
 }
 public Binding(string propertyName, object dataSource, string dataMember, bool formattingEnabled, System.Windows.Forms.DataSourceUpdateMode dataSourceUpdateMode, object nullValue, string formatString, IFormatProvider formatInfo)
 {
     this.propertyName         = "";
     this.formatString         = string.Empty;
     this.dsNullValue          = Formatter.GetDefaultDataSourceNullValue(null);
     this.bindToObject         = new System.Windows.Forms.BindToObject(this, dataSource, dataMember);
     this.propertyName         = propertyName;
     this.formattingEnabled    = formattingEnabled;
     this.formatString         = formatString;
     this.nullValue            = nullValue;
     this.formatInfo           = formatInfo;
     this.formattingEnabled    = formattingEnabled;
     this.dataSourceUpdateMode = dataSourceUpdateMode;
     this.CheckBinding();
 }
Esempio n. 3
0
 private object GetDataSourceNullValue(Type type)
 {
     return(this.dsNullValueSet ? this.dsNullValue : Formatter.GetDefaultDataSourceNullValue(type));
 }
Esempio n. 4
0
 private bool ShouldSerializeDataSourceNullValue()
 {
     return(this.dsNullValueSet && this.dsNullValue != Formatter.GetDefaultDataSourceNullValue(null));
 }
 private Binding()
 {
     this.propertyName = "";
     this.formatString = string.Empty;
     this.dsNullValue  = Formatter.GetDefaultDataSourceNullValue(null);
 }