public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            if (FromMenu)
            {
                NavigationItem.SetLeftBarButtonItem(
                    new UIBarButtonItem(UIImage.FromBundle("menu.png"),
                        UIBarButtonItemStyle.Plain,
                        (s, e) => NavigationController.PopViewController(true)),
                    true);
            }

            recentCities = AppDelegate.databaseConnection.GetAllRecentCitiesAsync().Result;
            recentCities.Sort((s1, s2)=>s2.Updated.CompareTo(s1.Updated));

            recentCitySource = new RecentCityTableViewSource(this, recentCities);
            TableView.Source = recentCitySource;
            TableView.BackgroundColor = ColorScheme.Clouds;
        }
Пример #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            if (FromMenu)
            {
                NavigationItem.SetLeftBarButtonItem(
                    new UIBarButtonItem(UIImage.FromBundle("menu.png"),
                                        UIBarButtonItemStyle.Plain,
                                        (s, e) => NavigationController.PopViewController(true)),
                    true);
            }

            recentCities = AppDelegate.databaseConnection.GetAllRecentCitiesAsync().Result;
            recentCities.Sort((s1, s2) => s2.Updated.CompareTo(s1.Updated));

            recentCitySource          = new RecentCityTableViewSource(this, recentCities);
            TableView.Source          = recentCitySource;
            TableView.BackgroundColor = ColorScheme.Clouds;
        }