Esempio n. 1
0
        public CreateSearch(FoodModel.TimeOfDayEmum timeofday)
        {
            Invoker = this;
            InitializeComponent();
            timeOfDay         = timeofday;
            lastPortiong      = "100g";
            fullPortionString = "(100g)";
            List <string> portions = new List <string>();

            portions.Add("100g");
            portions.Add("Set Manually..");
            FoodPortions.ItemsSource = portions;
            usercall = true;
            FoodPortions.SelectedIndex = 0;
            ManualPortion.IsVisible    = false;

            FoodPortions.IsVisible = false;
            Calories2.IsVisible    = false;
            ProteinPg.IsVisible    = false;
            FatPg.IsVisible        = false;
            CarbsPg.IsVisible      = false;
            MoreInfo.IsVisible     = false;
            CreateBtn.IsVisible    = false;

            CaloriesLabel.IsVisible    = false;
            ProteinLabel.IsVisible     = false;
            FatLabel.IsVisible         = false;
            CarbsLabel.IsVisible       = false;
            MoreInfoLabel.IsVisible    = false;
            FoodPortionLabel.IsVisible = false;
        }
Esempio n. 2
0
        public CreateCustomButton(FoodModel.TimeOfDayEmum timeofday)
        {
            BindingContext = this;

            InitializeComponent();

            names = new List <ContentView>();
            //var zx = new ContentView
            //{
            //    Content = new Label
            //    {
            //        Text = "<-SEARCH    MANUAL->",
            //        TextColor = Color.Black,
            //        FontSize = 40,
            //        FontFamily= "NexaRustSlab-BlackShadow01-Free.otf#Nexa Rust Slab Black Shadow 01",
            //        HorizontalOptions = LayoutOptions.Center,
            //        VerticalOptions = LayoutOptions.Center
            //    },
            //};
            //names.Add(zx);
            var xyz = new  CreateSearch(timeofday);

            var xy = xyz.Content;

            var x = new ContentView
            {
                Content = xy,
            };

            names.Add(x);
            var xyq = new CreateManual(timeofday);

            xy = xyq.Content;
            x  = new ContentView
            {
                Content = xy,
            };
            names.Add(x);
            //x = new ContentView
            //{
            //    Content = new Label
            //    {
            //        Text = "OHAI22",
            //        TextColor = Color.Black,
            //        FontSize = 40,
            //        HorizontalOptions = LayoutOptions.Center,
            //        VerticalOptions = LayoutOptions.Center
            //    },
            //};
            //names.Add(x);
            //x = new ContentView
            //{
            //    Content = new Label
            //    {
            //        Text = "OHAI333",
            //        TextColor = Color.Black,
            //        FontSize = 40,
            //        HorizontalOptions = LayoutOptions.Center,
            //        VerticalOptions = LayoutOptions.Center
            //    },
            //};
            //names.Add(x);
            //x = new ContentView
            //{
            //    Content = new Label
            //    {
            //        Text = "OHAI22",
            //        TextColor = Color.Black,
            //        FontSize = 40,
            //        HorizontalOptions = LayoutOptions.Center,
            //        VerticalOptions = LayoutOptions.Center
            //    },
            //};
            //names.Add(x);
            //MainCardsView.ItemsSource = names;
            slideView.ItemsSource = names;
            createSearchRef       = xyz;
            createManualRef       = xyq;
            ApplyShadows(xyz);
        }
Esempio n. 3
0
        private async void ApplyShadows(CreateSearch page)
        {
            await Task.Delay(50);

            page.ApplyShadowLocal();
        }