Exemple #1
0
        public WelcomPage()
        {
            InitializeComponent();
            var assembly = typeof(WelcomPage);

            getClientDetailsForMobile = null;
            logoImage.Source          = ImageSource.FromResource("MaxVonGrafKftMobile.Assets.logo_high_resolution_white-1.png", assembly);
            if (!App.Current.Properties.ContainsKey("CustomerId"))
            {
                App.Current.Properties.Add("CustomerId", 0);
            }

            var loginTap = new TapGestureRecognizer();

            loginTap.Tapped += async(s, e) =>
            {
                if ((int)App.Current.Properties["CustomerId"] == 0)
                {
                    await Navigation.PushAsync(new LoginPage());
                }
                else
                {
                    IsBusy = false;
                    if (!IsBusy)
                    {
                        IsBusy = true;
                        await HomeBtn.FadeTo(0, 100, Easing.SinInOut);

                        //await loginBtnFrame.FadeTo(0, 100, Easing.SinInOut);
                        try
                        {
                            if (Navigation.NavigationStack[Navigation.NavigationStack.Count - 1].GetType() != typeof(HomePage))
                            {
                                await Navigation.PushAsync(new HomePage());
                            }
                        }
                        finally
                        {
                            IsBusy = false;
                            await HomeBtn.FadeTo(1, 1000);

                            //await loginBtnFrame.FadeTo(1, 1000);
                        }
                    }
                }
            };
            //loginBtnFrame.GestureRecognizers.Add(loginTap);
            HomeBtn.GestureRecognizers.Add(loginTap);
        }
Exemple #2
0
        private async void StartAnimation()
        {
            await HomeBtn.FadeTo(0, 50);

            await HomeBtn.FadeTo(1, 50);
        }