Esempio n. 1
0
        void ReleaseDesignerOutlets()
        {
            if (LoadingSpinner != null)
            {
                LoadingSpinner.Dispose();
                LoadingSpinner = null;
            }

            if (LoadingErrorImg != null)
            {
                LoadingErrorImg.Dispose();
                LoadingErrorImg = null;
            }

            if (LoadingText != null)
            {
                LoadingText.Dispose();
                LoadingText = null;
            }

            if (ReleasesNavSearchLoadingSpinner != null)
            {
                ReleasesNavSearchLoadingSpinner.Dispose();
                ReleasesNavSearchLoadingSpinner = null;
            }

            if (ReleasesNavCloseSearchBtn != null)
            {
                ReleasesNavCloseSearchBtn.Dispose();
                ReleasesNavCloseSearchBtn = null;
            }

            if (ReleasesNavSplitterLbl != null)
            {
                ReleasesNavSplitterLbl.Dispose();
                ReleasesNavSplitterLbl = null;
            }

            if (ReleasesSearchBtn != null)
            {
                ReleasesSearchBtn.Dispose();
                ReleasesSearchBtn = null;
            }

            if (ReleasesSearchBar != null)
            {
                ReleasesSearchBar.Dispose();
                ReleasesSearchBar = null;
            }

            if (ReleasesInStoresBtn != null)
            {
                ReleasesInStoresBtn.Dispose();
                ReleasesInStoresBtn = null;
            }

            if (ReleasesUpcomingBtn != null)
            {
                ReleasesUpcomingBtn.Dispose();
                ReleasesUpcomingBtn = null;
            }

            if (SectionHeader != null)
            {
                SectionHeader.Dispose();
                SectionHeader = null;
            }

            if (SectionTitle != null)
            {
                SectionTitle.Dispose();
                SectionTitle = null;
            }

            if (LoadingView != null)
            {
                LoadingView.Dispose();
                LoadingView = null;
            }
        }
Esempio n. 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            ReleasesSearchBtn.TouchUpInside += delegate {
                ReleasesNavCloseSearchBtn.Transform = Utilities.Hide;
                ReleasesSearchBar.Transform         = Utilities.Hide;
                ReleasesNavCloseSearchBtn.Hidden    = false;
                ReleasesSearchBar.Hidden            = false;
                ReleasesSearchBar.BecomeFirstResponder();
                UIView.AnimateNotify(0.4, 0, 0.65f, 0.0f, UIViewAnimationOptions.CurveEaseIn, delegate {
                    ReleasesSearchBtn.Transform   = Utilities.Hide;
                    ReleasesInStoresBtn.Transform = Utilities.Hide;
                    ReleasesUpcomingBtn.Transform = Utilities.Hide;
                    TableView.Alpha = 0;

                    ReleasesNavCloseSearchBtn.Transform = Utilities.Show;
                    ReleasesSearchBar.Transform         = Utilities.Show;
                }, null);
            };

            ReleasesSearchBar.SearchButtonClicked += delegate {
                ReleasesSearchBar.ResignFirstResponder();
                ReleasesNavSearchLoadingSpinner.Transform = Utilities.Hide;
                UIView.AnimateNotify(0.4, 0, 0.65f, 0f, UIViewAnimationOptions.CurveEaseIn, delegate {
                    ReleasesNavSearchLoadingSpinner.StartAnimating();
                    ReleasesNavCloseSearchBtn.Transform       = Utilities.Hide;
                    ReleasesNavSearchLoadingSpinner.Transform = Utilities.Show;
                }, null);

                DisplaySearchResults();
            };

            ReleasesNavCloseSearchBtn.TouchUpInside += delegate {
                UIView.AnimateNotify(0.4, 0, 0.65f, 0.0f, UIViewAnimationOptions.CurveEaseIn, delegate {
                    ReleasesSearchBtn.Transform = Utilities.Show;
                    SetReleaseTypeButtonDisplay();
                    TableView.Alpha = 1;
                    ReleasesNavCloseSearchBtn.Transform = Utilities.Hide;
                    ReleasesSearchBar.Transform         = Utilities.Hide;
                    ReleasesSearchBar.ResignFirstResponder();
                }, delegate {
                    ReleasesNavCloseSearchBtn.Hidden = true;
                    ReleasesSearchBar.Hidden         = true;
                    RefreshTable();
                });
            };

            ReleasesInStoresBtn.TouchUpInside += delegate {
                selectedSegmentBtn = 0;
                TableView.Source   = null;
                TableView.ReloadData();
                GetJson();
                UIView.AnimateNotify(0.2, 0, 0.65f, 0.0f, UIViewAnimationOptions.CurveEaseIn, delegate {
                    SetReleaseTypeButtonDisplay();
                }, null);
            };

            ReleasesUpcomingBtn.TouchUpInside += delegate {
                selectedSegmentBtn = 1;
                TableView.Source   = null;
                TableView.ReloadData();
                GetJson();
                UIView.AnimateNotify(0.2, 0, 0.65f, 0.0f, UIViewAnimationOptions.CurveEaseIn, delegate {
                    SetReleaseTypeButtonDisplay();
                }, null);
            };

            RefreshControl               = new UIRefreshControl();
            RefreshControl.TintColor     = UIColor.FromRGB(144, 199, 62);
            RefreshControl.ValueChanged += delegate {
                GetJson(true);
            };

            foreach (var subView in ReleasesSearchBar.Subviews)
            {
                foreach (var subView2nd in subView.Subviews)
                {
                    if (subView2nd.GetType() == typeof(UITextField))
                    {
                        UITextField searchField = (UITextField)subView2nd;
                        searchField.Font = UIFont.FromName("GillSans", 13);
                    }
                }
            }
        }