Exemple #1
0
 private void WeighACatWithBindings(Cat cat, Weight weight)
 {
     Scale dlg = new Scale(weight);
     if (DialogResult.OK == dlg.ShowDialog())
     {
         _model.SaveObject<Weight>(weight);
         cat.CurrentWeight = weight;
     }
 }
Exemple #2
0
 private void WeighACatNoBindings(Cat cat, Weight weight)
 {
     Scale dlg = new Scale(weight.Pounds, weight.Date);
     if (DialogResult.OK == dlg.ShowDialog())
     {
         weight.Pounds = dlg.Pounds;
         weight.Date = dlg.WeighDate;
         _model.SaveObject<Weight>(weight);
         cat.CurrentWeight = weight;
     }
 }