void OnSelectInfo(object sender, SelectedItemChangedEventArgs e)
        {
            indicator = new ActivityIndicator {
                Color           = Device.OnPlatform(Color.Black, Color.Gray, Color.Default),
                IsRunning       = true,
                IsVisible       = true,
                VerticalOptions = LayoutOptions.CenterAndExpand,
            };

            ListView listView = sender as ListView;

            listView.SelectedItem = null;
            InfoOrder infoOrder = e.SelectedItem as InfoOrder;

            if (infoOrder != null && infoOrder.Page != InfoBasketPage.Empty)
            {
                switch (infoOrder.Page)
                {
                case InfoBasketPage.Delivery:
                    lblInfo.Text = OrderResult.DeliveryForCustomer?.Title;
                    OnePage.redirectApp.AddTransition(PageName.Order, "Доставка");
                    break;

                case InfoBasketPage.Address:
                    lblInfo.Text = OrderResult.Country + ", " +
                                   OrderResult.Zone + ", " +
                                   OrderResult.City + ", " +
                                   OrderResult.Street;

                    OnePage.redirectApp.AddTransition(PageName.Order, "Адрес");
                    break;

                case InfoBasketPage.Product:
                    OnePage.redirectApp.AddTransition(PageName.Login, "Состав заказа", HistoryStep.OrdersList);
                    Content = indicator;
                    string url = OrderPosition.GetUrl(OrderResult.Id);
                    ShowProducts(url);
                    break;

                default:
                    break;
                }
                layoutList.IsVisible  = false;
                layoutLabel.IsVisible = true;
//				Content = layout;
            }
            else
            {
//				infoListView.SelectedItem = null;
            }
        }
Exemple #2
0
        protected override void OnBindingContextChanged()
        {
            base.OnBindingContextChanged();
            InfoOrder info = BindingContext as InfoOrder;

            if (info.Page != InfoBasketPage.Empty)
            {
                layout.Children.Add(img);
            }
            else
            {
                layout.Children.Add(lblValue);
            }
        }