Exemple #1
0
        public static void DownloadAllImages()
        {
            Task.Factory.StartNew(() =>
            {
                ServiceWrapper svc      = new ServiceWrapper();
                ItemListResponse myData = svc.GetItemLists(1, CurrentUser.RetreiveUserId()).Result;
                foreach (var wine in myData.ItemList)
                {
                    GetImageBitmapFromWineId(wine.Barcode);
                }

                myData = svc.GetItemLists(2, CurrentUser.RetreiveUserId()).Result;

                foreach (var wine in myData.ItemList)
                {
                    GetImageBitmapFromWineId(wine.Barcode);
                }
                myData = svc.GetItemLists(3, CurrentUser.RetreiveUserId()).Result;

                foreach (var wine in myData.ItemList)
                {
                    GetImageBitmapFromWineId(wine.Barcode);
                }
            });
        }
 public override void ViewDidLoad()
 {
     try
     {
         //   this.NavigationItem.SetRightBarButtonItem(
         //	new UIBarButtonItem(UIBarButtonSystemItem.Action, (sender, args) => {
         //       // button was clicked
         //})
         //, true);
         ServiceWrapper svc = new ServiceWrapper();
         myData = svc.GetItemLists(storeId, CurrentUser.RetreiveUserId()).Result;
         if (myData.ItemList.Count != 0)
         {
             this.CollectionView.Add(refreshControl);
             refreshControl.ValueChanged += (rcSender, e) =>
             {
                 //Refresh this view
                 myData = svc.GetItemLists(storeId, CurrentUser.RetreiveUserId()).Result;
                 CollectionView.ReloadData();
                 refreshControl.EndRefreshing();
             };
             BTProgressHUD.Dismiss();
             this.View.BackgroundColor           = new UIColor(256, 256, 256, 0.8f);
             this.CollectionView.BackgroundColor = UIColor.White;
             CollectionView.RegisterClassForCell(typeof(APLCollectionViewCell), APLCollectionViewCell.Key);
         }
         else
         {
             this.View.BackgroundColor           = new UIColor(256, 256, 256, 0.8f);
             this.CollectionView.BackgroundColor = UIColor.White;
             string _name = null;
             if (storeId == 3)
             {
                 _name = LoggingClass.txtstore3;
             }
             UIAlertView alert = new UIAlertView()
             {
                 Title   = _name + " Store",
                 Message = "Coming Soon"
             };
             alert.AddButton("OK");
             alert.Show();
         }
     }
     catch (Exception ex)
     {
         BTProgressHUD.ShowErrorWithStatus("Something went wrong,We're on it.");
         LoggingClass.LogError(ex.ToString(), screen, ex.StackTrace);
     }
 }
        public override void ViewDidLoad()
        {
            //AboutController1.ViewDidLoad(base);

            ServiceWrapper svc = new ServiceWrapper();

            if (FaviouriteView)
            {
                myData = svc.GetItemFavsUID(CurrentUser.RetreiveUserId()).Result;
            }
            else
            {
                myData = svc.GetItemLists(storeId, CurrentUser.RetreiveUserId()).Result;
            }

            //View.BackgroundColor = UIColor.White;
            this.View.BackgroundColor = new UIColor(256, 256, 256, 0.8f);
            //this.View
            //this.CollectionView.BackgroundColor = UIColor.White;
            //this.CollectionView.InsertSubview(new UIImageView(UIImage.FromFile("placeholder.jpeg")), 0);
            //CollectionView.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile("eno.jpg"));
            CollectionView.RegisterClassForCell(typeof(BottleCell), "BottleCell");
        }