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

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

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

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

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

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

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

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

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

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

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

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

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

            if (DownloadableSgmntdBtn != null)
            {
                DownloadableSgmntdBtn.Dispose();
                DownloadableSgmntdBtn = null;
            }
        }
Esempio n. 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            DownloadsNavSearchBtn.TouchUpInside += delegate {
                DownloadsNavCloseBtn.Transform  = Utilities.Hide;
                DownloadsNavSearchBar.Transform = Utilities.Hide;
                DownloadsNavCloseBtn.Hidden     = false;
                DownloadsNavSearchBar.Hidden    = false;
                DownloadsNavSearchBar.BecomeFirstResponder();
                UIView.AnimateNotify(0.4, 0, 0.65f, 0.0f, UIViewAnimationOptions.CurveEaseIn, delegate {
                    DownloadsNavSearchBtn.Transform   = Utilities.Hide;
                    DownloadsNavOutNowBtn.Transform   = Utilities.Hide;
                    DownloadsNavUpcomingBtn.Transform = Utilities.Hide;

                    TableView.Alpha = 0;

                    DownloadsNavCloseBtn.Transform  = Utilities.Show;
                    DownloadsNavSearchBar.Transform = Utilities.Show;
                }, null);
            };

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

                DisplaySearchResults();
            };

            DownloadsNavCloseBtn.TouchUpInside += delegate {
                UIView.AnimateNotify(0.4, 0, 0.65f, 0.0f, UIViewAnimationOptions.CurveEaseIn, delegate {
                    DownloadsNavSearchBtn.Transform = Utilities.Show;
                    SetDownloadTypeButtonDisplay();

                    TableView.Alpha = 1;

                    DownloadsNavCloseBtn.Transform  = Utilities.Hide;
                    DownloadsNavSearchBar.Transform = Utilities.Hide;
                    DownloadsNavSearchBar.ResignFirstResponder();
                }, delegate {
                    DownloadsNavCloseBtn.Hidden  = true;
                    DownloadsNavSearchBar.Hidden = true;
                    RefreshTable();
                });
            };

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

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

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

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