Пример #1
0
        public async override void ViewDidLoad()
        {
            try
            {
                orders = await OrderController.GetInstance();

                OrdersSource source = new OrdersSource(orders.ListOfOrders);
                OrderTableView.Source = source;
                OrderTableView.ReloadData();
                ActivityIndicator.StopAnimating();
                this.RefreshControl = new UIRefreshControl();
                this.RefreshControl.ValueChanged += (sender, e) =>
                {
                    this.RefreshControl.BeginRefreshing();
                    OrderTableView.ReloadData();
                    this.RefreshControl.EndRefreshing();
                };
            }
            catch
            {
                ActivityIndicator.StopAnimating();
                PresentViewController(GetAlertsClass.GetAlert("Не удалось подключиться к серверу"), true, null);
            }
        }