Ejemplo n.º 1
0
        /// <summary>
        /// </summary>
        private void ShowPreview(JToken mapset)
        {
            MapBanner.Alpha = 0;

            MapBanner.ClearAnimations();
            Title.ClearAnimations();
            Artist.ClearAnimations();
            Creator.ClearAnimations();
            DownloadButton.ClearAnimations();
            CancelButton.ClearAnimations();
            ViewMapsetPageButton.ClearAnimations();

            Title.Alpha                = 0;
            Artist.Alpha               = 0;
            Creator.Alpha              = 0;
            DownloadButton.Alpha       = 0;
            CancelButton.Alpha         = 0;
            ViewMapsetPageButton.Alpha = 0;

            Title.Text = mapset["title"].ToString();
            Title.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            Artist.Text = mapset["artist"].ToString();
            Artist.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            Creator.Text = "Created By: " + mapset["creator_username"];
            Creator.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            DownloadButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));
            CancelButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));
            ViewMapsetPageButton.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));

            Task.Run(async() =>
            {
                MapBanner.Image = await ImageDownloader.DownloadMapsetBanner((int)mapset["id"]);
                MapBanner.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, 1, 300));
            });
        }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 private void FetchMapsetBanner() => Task.Run(async() =>
 {
     Banner.Image = await ImageDownloader.DownloadMapsetBanner(MapsetId);
     Banner.Animations.Add(new Animation(AnimationProperty.Alpha, Easing.Linear, 0, IsAlreadyOwned ? 0.45f : 1, 300));
 });
 /// <summary>
 /// </summary>
 private void FetchMapsetBanner() => Task.Run(async() =>
 {
     MapBanner.Image = await ImageDownloader.DownloadMapsetBanner(Item.MapsetId);
     MapBanner.FadeTo(1, Easing.OutQuint, 4000);
 });