Example #1
0
        /// <summary>
        /// app SplashScreen
        /// </summary>
        public async Task SplashScreenAnimation()
        {
            await Functions.ShowSystemTrayAsync(0);

            Point centerPoint = new Point(grid_Splash.ActualWidth / 2.0, grid_Splash.ActualHeight / 2.0);

            this.sfr.CenterX = centerPoint.X;
            this.sfr.CenterY = centerPoint.Y;
            if (sfr.ScaleX < 0.3 && sfr.ScaleY < 0.3)
            {
                return;
            }

            DoubleAnimation ScaleXAnimation = new DoubleAnimation()
            {
                From = 1, To = 1.10, Duration = TimeSpan.FromSeconds(3)
            };

            Storyboard.SetTarget(ScaleXAnimation, sfr);
            Storyboard.SetTargetProperty(ScaleXAnimation, "ScaleX");


            DoubleAnimation ScaleYAnimation = new DoubleAnimation()
            {
                From = 1, To = 1.15, Duration = TimeSpan.FromSeconds(3)
            };

            Storyboard.SetTargetProperty(ScaleYAnimation, "ScaleY");
            Storyboard.SetTarget(ScaleYAnimation, sfr);

            //DoubleAnimation CenterXAnimation = new DoubleAnimation() { From = 0, To = centerPoint.X + 50, Duration = TimeSpan.FromSeconds(5) };
            //Storyboard.SetTargetProperty(CenterXAnimation, "CenterX");
            //Storyboard.SetTarget(CenterXAnimation, sfr);


            //DoubleAnimation Opacity = new DoubleAnimation() { From = 1, To = 0.2, Duration = TimeSpan.FromSeconds(3) };
            //Storyboard.SetTargetProperty(Opacity, "Opacity");
            //Storyboard.SetTarget(Opacity, img); //mark

            Storyboard storyboard = new Storyboard();

            storyboard.Completed += Storyboard_Completed;
            storyboard.Children.Add(ScaleXAnimation);
            storyboard.Children.Add(ScaleYAnimation);
            // storyboard.Children.Add(Opacity);
            storyboard.Begin();

            if (AppSettings.Instance.IsUsingTile)
            {
                LiveTileUtils.RegisterLiveTileTask();
            }
            await AppSettings.Instance.AppInit();

            AutoLogin();
        }
Example #2
0
 private AppSettings()
 {
     this.ToggledCommand = new RelayCommand <object>((e) =>
     {
         if (e.ToString() == "true")
         {
             LiveTileUtils.RegisterLiveTileTask();
         }
         else
         {
             var updater = TileUpdateManager.CreateTileUpdaterForApplication();
             updater.Clear();
             LiveTileUtils.UnRegisterLiveTileTask();
         }
     });
 }