Esempio n. 1
0
 public async Task Initialize(Wine wine, List <WineVarietal> wineVarietals)
 {
     try
     {
         Wine             = wine;
         WineVarietals    = new ObservableRangeCollection <WineVarietal>(wineVarietals);
         SelectedVarietal = wineVarietals.Any(v => v.WineVarietalId == wine.WineVarietalId) ? wineVarietals.First(v => v.WineVarietalId == wine.WineVarietalId) : null;
         VintageList.Add("unknown");
         SelectedImage = null;
     }
     catch (Exception ex)
     {
         DependencyService.Get <ILogger>().Report(ex, "Method", "Initialize");
         MessagingService.Current.SendMessage(MessageKeys.Error, ex);
     }
 }
Esempio n. 2
0
 public async Task Initialize(LockerMember locker, List <WineVarietal> wineVarietals)
 {
     try
     {
         Locker        = locker;
         Wine          = Wine.Defaults;
         Wine.LockerID = locker.LockerMemberID;
         VintageList.Add("unknown");
         SelectedImage = null;
     }
     catch (Exception ex)
     {
         DependencyService.Get <ILogger>().Report(ex, "Method", "Initialize");
         MessagingService.Current.SendMessage(MessageKeys.Error, ex);
     }
 }