void SetText()
        {
            //ShopName.Text = Settings.MobileSettings.main_name;
            //LabelPhone.Text = "+" + Settings.Person.Phone;
            Color hexColor = (Color)Application.Current.Resources["MainColor"];

            IconViewTech.SetAppThemeColor(IconView.ForegroundProperty, hexColor, Color.White);
            LabelTech.SetAppThemeColor(Label.TextColorProperty, hexColor, Color.White);
            PancakeViewKind.SetAppThemeColor(PancakeView.BorderColorProperty, hexColor, Color.Transparent);
            GoodsLayot.SetAppThemeColor(PancakeView.BorderColorProperty, hexColor, Color.White);
            PancakeBot.SetAppThemeColor(PancakeView.BorderColorProperty, hexColor, Color.Transparent);
        }
Exemple #2
0
        public BasketPage(Dictionary <string, Goods> goodset, ShopPage shopPage, AdditionalService additional)
        {
            //заглушка для номера заказа
            orderNum = " №" + Convert.ToString(1234567890);

            Goodset     = goodset;
            _shopPage   = shopPage;
            _Additional = additional;
            InitializeComponent();
            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                // BackgroundColor = Color.White;
                // ImageTop.Margin = new Thickness(0, 0, 0, 0);
                // StackLayout.Margin = new Thickness(0, 33, 0, 0);
                break;

            case Device.Android:
            default:
                break;
            }
            try
            {
                Settings.AppPAge.Remove(this);
                Settings.AppPAge.Add(this);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            NavigationPage.SetHasNavigationBar(this, false);
            var backClick = new TapGestureRecognizer();

            backClick.Tapped += async(s, e) =>
            {
                UpdateShop();
                try
                {
                    _ = await Navigation.PopAsync();
                }
                catch { }
            };

            BackStackLayout.GestureRecognizers.Add(backClick);
            var techSend = new TapGestureRecognizer();

            techSend.Tapped += async(s, e) => { await Navigation.PushAsync(new AppPage()); };
            LabelTech.GestureRecognizers.Add(techSend);

            //var PayPageShop = new TapGestureRecognizer();
            //PayPageShop.Tapped += async (s, e) =>
            //{
            //    if (!LabelPriceBuscket.Text.Equals("0 \u20BD"))
            //    {
            //        await Navigation.PushAsync(new PayShopPage(Goodset, _Additional));
            //    }
            //    else
            //    {
            //        await DisplayAlert(AppResources.ErrorTitle, "Корзина пуста", "OK");
            //    }
            //};
            //StackLayoutBasket.GestureRecognizers.Add(PayPageShop);
            hex = (Color)Application.Current.Resources["MainColor"];
            Color hexColor = (Color)Application.Current.Resources["MainColor"];

            IconViewTech.SetAppThemeColor(IconView.ForegroundProperty, hexColor, Color.White);
            LabelTech.SetAppThemeColor(Label.TextColorProperty, hexColor, Color.White);
            GoodsLayot.SetAppThemeColor(PancakeView.BorderColorProperty, hexColor, Color.White);
            PancakeBot.SetAppThemeColor(PancakeView.BorderColorProperty, hexColor, Color.Transparent);
            //SetText();
            SetPriceAndWeight();
            setBasket();
            BindingContext = this;
        }