void FavoriteButtonPressed(object sender, EventArgs ea)
        {
            var searchResultVC = (SearchResultVC)Storyboard.InstantiateViewController("SearchResultVC");

            searchResultVC.jobList       = DbHelper.GetFavoriteJobs();
            searchResultVC.isFavoriteJob = true;
            NavController.PushViewController(searchResultVC, true);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            AppDelegate appDelegate = (AppDelegate)UIApplication.SharedApplication.Delegate;


            if (appDelegate.Window.Frame.Size.Width == 414)
            {
                appDelegate.storyboard = "Phone6PluS";
            }
            else if (appDelegate.Window.Frame.Size.Width == 375)
            {
                appDelegate.storyboard = "Phone";
            }
            else if (appDelegate.Window.Frame.Size.Width == 320 && appDelegate.Window.Frame.Size.Height == 568)
            {
                appDelegate.storyboard = "Phone5";
            }
            else
            {
                appDelegate.storyboard = "Phone5";
            }


            //appDelegate.storyboard = "Phone";

            var introController = (IntroController)Storyboard.InstantiateViewController("IntroController");
            var menuController  = (MenuController)Storyboard.InstantiateViewController("MenuController");

            // create a slideout navigation controller with the top navigation controller and the menu view controller
            NavController = new NavController();
            NavController.PushViewController(introController, false);
            SidebarController                = new SidebarNavigation.SidebarController(this, NavController, menuController);
            SidebarController.MenuWidth      = 260;
            SidebarController.ReopenOnRotate = false;
            SidebarController.MenuLocation   = SidebarController.MenuLocations.Left;

            //SidebarController.Disabled = true;

            appDelegate.SidebarController = SidebarController;


            NavController.NavigationBar.BarTintColor = UIColor.Clear.FromHexString("#ef2e24", 1.0f);
            NavController.NavigationBar.TintColor    = UIColor.White;
        }
        private void displaySettingView()
        {
            UIView tempView = new UIView();

            tempView.Frame           = this.View.Bounds;
            tempView.BackgroundColor = UIColor.Black;
            tempView.Alpha           = 0.7f;
            this.View.AddSubview(tempView);

            var _settingViewContrroler = (SettingViewContrroler)Storyboard.InstantiateViewController("SettingViewContrroler");

            NavController.PushViewController(_settingViewContrroler, true);
            _settingViewContrroler.View.Frame           = this.View.Bounds;
            _settingViewContrroler.View.Alpha           = 0.7f;
            _settingViewContrroler.View.BackgroundColor = UIColor.Clear;
            //_settingViewContrroler.bgView.BackgroundColor = UIColor.White;
            //_settingViewContrroler.bgView.Alpha = 1.0f;
            _settingViewContrroler.View.Center = this.View.Center;
            this.View.AddSubview(_settingViewContrroler.View);
            this.AddChildViewController(_settingViewContrroler);
            _settingViewContrroler.DidMoveToParentViewController(this);

            return;
        }
#pragma warning disable RECS0165 // Asynchronous methods should return a Task instead of void
        private async void GetJobSearchData(string keyword, string location)
#pragma warning restore RECS0165 // Asynchronous methods should return a Task instead of void
        {
            NetworkStatus remoteHostStatus = Reachability.RemoteHostStatus();

            if (remoteHostStatus == NetworkStatus.NotReachable)
            {
                var alert = UIAlertController.Create("Network Error", "Please check your internet connection", UIAlertControllerStyle.Alert);
                alert.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Default, null));
                PresentViewController(alert, animated: true, completionHandler: null);

                return;
            }
            //var _JobAlertVC = (JobAlertVC)Storyboard.InstantiateViewController("JobAlertVC");
            //NavController.PushViewController(_JobAlertVC, true);

            //return;

            //location = "nederland";
            //Constants.LocationLatLong = "";

            if (keyword.Equals("N/A"))
            {
                keyword = "";
            }

            if (location.Equals("N/A"))
            {
                location = "";
            }

            Constants.JobKeyword  = keyword.Trim();
            Constants.JobLocation = location.Trim();



            location = System.Net.WebUtility.UrlEncode(location);
            keyword  = System.Net.WebUtility.UrlEncode(keyword);


            BTProgressHUD.Show("Loading...", -1, ProgressHUD.MaskType.Black);


            jobRequest          = new JobRequest();
            jobRequest.Keyword  = "";
            jobRequest.Location = "";

            //jobRequest.CurrentLanguage = "nl-NL";
            //jobRequest.SitenameForRegister = Constants.JobDetailSiteName;

            jobRequest.CurrentLanguage     = Constants.JobDetailCurrentLanguage;
            jobRequest.SitenameForRegister = Constants.JobDetailSiteName;


            jobRequest.FilterURL = Constants.JobSearchFilterURL + "pageNum=" + Constants.CurrentpageNum + "&display=" + Constants.displayCount + "&k=" + keyword + "&l=" + location;

            if (!Constants.LocationLatLong.Equals("") && location.Contains("%2C"))
            {
                jobRequest.FilterURL = jobRequest.FilterURL + "&xy=" + Constants.LocationLatLong;
            }


            jobRequest.FacetSettingId = Constants.JobSearchFacetSettingID;
            jobRequest.BaseAddress    = Constants.JobBaseAddress;


            List <JobCMS> searchResults = new List <JobCMS>();

            ServiceManager jobService = new ServiceManager();

            Dictionary <string, dynamic> serverResponse = await jobService.AsyncJobSearch(jobRequest);

            Constants.jobSearchResponse = serverResponse;

            if (searchJobButtonPressed)
            {
                if (serverResponse.ContainsKey("jobList"))
                {
                    searchResults = serverResponse["jobList"];
                }
            }
            else
            {
                if (serverResponse.ContainsKey("jobList"))
                {
                    jobList = serverResponse["jobList"];
                }
            }


            BTProgressHUD.Dismiss();


            if (jobList == null)
            {
                BTProgressHUD.ShowToast("No record found.", false, 3000);
                return;
            }

            if (searchResults == null)
            {
                BTProgressHUD.ShowToast("No record found.", false, 3000);
                return;
            }

            if (jobList == null)
            {
                jobList = new List <JobCMS>();
            }

            if (searchJobButtonPressed)
            {
                if (searchResults == null)
                {
                    searchResults = new List <JobCMS>();
                }

                var searchResultVC = (SearchResultVC)Storyboard.InstantiateViewController("SearchResultVC");
                searchResultVC.jobList         = searchResults;
                searchResultVC.isFavoriteJob   = false;
                searchResultVC._keyword        = this.txtKeyword.Text.Trim();
                searchResultVC._location       = this.txtLocation.Text.Trim();
                searchResultVC.LocationLatLong = Constants.LocationLatLong;
                searchResultVC.aJobRequest     = jobRequest;
                NavController.PushViewController(searchResultVC, true);
                searchJobButtonPressed = false;
            }
            else
            {
                tblView.Source = new TableSource(jobList, _recentSearchs, isRecentSearch, this);
                //Delegate = new TableViewDelegate(list);
                //tblView.Delegate = new TableViewDelegate(jobList);
                //tblView.WeakDelegate = this;
                tblView.ReloadData();
            }


            tblView.AllowsSelection        = true;
            tblView.UserInteractionEnabled = true;
        }