コード例 #1
0
ファイル: CatHerder.cs プロジェクト: ssdug/2013-April-Florey
 private void WeighACatWithBindings(Cat cat, Weight weight)
 {
     Scale dlg = new Scale(weight);
     if (DialogResult.OK == dlg.ShowDialog())
     {
         _model.SaveObject<Weight>(weight);
         cat.CurrentWeight = weight;
     }
 }
コード例 #2
0
ファイル: CatHerder.cs プロジェクト: ssdug/2013-April-Florey
 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;
     }
 }