示例#1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            setstyle();

            bool refreshList = NSUserDefaults.StandardUserDefaults.BoolForKey("refreshList");

            if (refreshList)
            {
                return;
            }


            starthud();
            ThreadPool.QueueUserWorkItem(state =>
            {
                bool useFalse = true;


                var lst = new iportogruaroLibraryShared.mainEventos().getMainCategorys(useFalse);

                InvokeOnMainThread(delegate {
                    TableView.Source = new sourceEvents(this, lst);
                    TableView.ReloadData();
                    setLoadingViewStyle(this.TableView);
                    stophud();
                }
                                   );
            });
        }
示例#2
0
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);



            ThreadPool.QueueUserWorkItem(state =>
            {
                bool refreshList = NSUserDefaults.StandardUserDefaults.BoolForKey("refreshList");

                if (refreshList)
                {
                    NSUserDefaults.StandardUserDefaults.SetBool(false, "refreshList");

                    InvokeOnMainThread(delegate {
                        starthud();
                    });

                    var lst = new iportogruaroLibraryShared.mainEventos().getMainCategorys(false);

                    InvokeOnMainThread(delegate {
                        TableView.Source = new sourceEvents(this, lst);
                        TableView.ReloadData();
                        setLoadingViewStyle(this.TableView);
                        stophud();
                        stophud();
                    }
                                       );
                }

                else
                {
                    InvokeOnMainThread(delegate {
                        stophud();
                    });
                }
            });
        }
示例#3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            if (UserInterfaceIdiomIsPhone && IsTall)
            {
                View.Frame = new RectangleF(0, -50, 480, 520);
            }
            else if (!UserInterfaceIdiomIsPhone)
            {
                this.View.Frame = new RectangleF(0, 0, 768, 1024);
            }


            vi = new UIView(new RectangleF(10, 5, this.View.Bounds.Width - 20f, View.Bounds.Height - 35f));
            if (!UserInterfaceIdiomIsPhone)
            {
                vi.Frame = new RectangleF(10, 5, this.View.Bounds.Width - 20f, View.Bounds.Height - 125f);
            }
            //vi.AutosizesSubviews = true;
            vi.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;



            vi.BackgroundColor        = UIColor.FromRGB(255, 255, 255);
            vi.Layer.MasksToBounds    = false;
            vi.Layer.CornerRadius     = 7;
            this.View.BackgroundColor = UIColor.FromRGB(255, 255, 255);
            this.View.BackgroundColor = UIColor.FromRGB(255, 255, 255);
            this.View.InsertSubview(vi, 0);

            if (search)
            {
                NSUserDefaults.StandardUserDefaults.SetBool(true, "refreshList");
                InvokeOnMainThread(delegate {
                    starthud();
                }
                                   );


                ThreadPool.QueueUserWorkItem(state => {
                    var lst = new iportogruaroLibraryShared.mainEventos().geteventsbyName(key);
                    if (lst != null)
                    {
                        dataPos = lst;

                        InvokeOnMainThread(delegate {
                            setstyle();
                            stophud();
                        }
                                           );
                    }
                });

                stophud();
            }
            else
            {
                setstyle();
            }
            // Perform any additional setup after loading the view, typically from a nib.
        }
示例#4
0
        public void loadData()
        {
            if (!InternetConnection.IsNetworkAvaialable(true))
            {
                using (var alert = new UIAlertView("iPortogruaro", "Spiacente nessun collegamento internet al momento", null, "OK", null))//Viajes Telcel//Aceptar
                {
                    alert.Show();
                }

                return;
            }

            if (reloading)
            {
                return;
            }

            reloading = true;

            UIView.BeginAnimations("slideAnimation");

            UIView.SetAnimationDuration(2);
            UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut);
            UIView.SetAnimationRepeatCount(2);
            UIView.SetAnimationRepeatAutoreverses(true);
            this.TableView.ContentInset = UIEdgeInsets.Zero;
            UIView.CommitAnimations();

            /*
             *  [UIView beginAnimations:nil context:NULL];
             *  [UIView setAnimationDuration:.3];
             *  [tblMain setContentInset:UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 0.0f)];
             *  [refreshHeaderView setStatus:kPullToReloadStatus];
             *  [refreshHeaderView toggleActivityView:NO];
             *  [UIView commitAnimations];
             */


            starthud();
            ThreadPool.QueueUserWorkItem(state =>
            {
                var lst = new iportogruaroLibraryShared.mainEventos().getMainCategorys(false);

                InvokeOnMainThread(delegate {
                    TableView.Source = new sourceEvents(this, lst);
                    TableView.ReloadData();
                    setLoadingViewStyle(this.TableView);
                    stophud();
                    reloading = false;
                }
                                   );
            });

            foreach (UIView vin in vLoading)
            {
                vin.RemoveFromSuperview();
                vin.Dispose();
            }
            vLoading.RemoveFromSuperview();
            vLoading.Dispose();
            vLoading = null;
            //startHud();
            //}
        }