Exemple #1
0
 protected override void DoUpdateValue(BindingInfo info)
 {
     if(combo == null || combo.Model == null)
         return;
     if(info.ValueIsNull)
     {
         combo.Active = -1;
         return;
     }
     combo.Sensitive = info.Enabled && !info.ReadOnly;
     long id = Convert.ToInt64(info.Value);
     TreeIter iter;
     if(Store.GetIterFirst(out iter))
     {
         do
         {
             if(id.Equals(Store.GetValue(iter, 0)))
             {
                 combo.SetActiveIter(iter);
                 return;
             }
         } while(Store.IterNext(ref iter));
     }
     else
         combo.SetActiveIter(TreeIter.Zero);
 }
Exemple #2
0
 protected override void DoUpdateValue(BindingInfo info)
 {
     if(textview == null)
         return;
     textview.Sensitive = info.Enabled && !info.ReadOnly;
     if(info.ValueIsNull)
         textview.Buffer.Text = "";
     else
         textview.Buffer.Text = info.Value.ToString();
 }
Exemple #3
0
 protected override void DoUpdateValue(BindingInfo info)
 {
     if(entry != null)
     {
         entry.Sensitive = info.Enabled && !info.ReadOnly;
         if(info.ValueIsNull)
             entry.Text = "";
         else
             entry.Text = info.Value.ToString();
     }
 }
Exemple #4
0
 public virtual void UpdateValue(BindingInfo info)
 {
     if(IsUpdating)
         return;
     IsUpdating = true;
     try
     {
         DoUpdateValue(info);
     }
     finally
     {
         IsUpdating = false;
     }
 }
 protected override void DoUpdateValue(BindingInfo info)
 {
     if(check == null)
         return;
     check.Sensitive = info.Enabled && !info.ReadOnly;
     if(info.Value == null || info.Value is DBNull)
     {
         check.Active = false;
         check.Inconsistent = true;
     }
     else if(Convert.ToBoolean(info.Value))
     {
         check.Inconsistent = false;
         check.Active = true;
     }
     else
     {
         check.Inconsistent = false;
         check.Active = false;
     }
 }
Exemple #6
0
 /// <summary>
 /// Update binded object
 /// </summary>
 protected abstract void DoUpdateValue(BindingInfo info);
        protected override void DoUpdateValue(BindingInfo info)
        {
            if(row == null || column == null)
                return;

            Log.Debug("RowColumnBinding.DoUpdateValue: {0} <-- {1}", column.ColumnName, info.Value);

            if(info.ValueIsNull)
                row[column] = DBNull.Value;
            else
                row[column] = Convert.ChangeType(info.Value, column.DataType);
        }