Exemplo n.º 1
0
 public static void remove(this BaseBundle bundle, string key)
 {
     bundle.Remove(key);
 }
Exemplo n.º 2
0
 public static ICollection <string> keySet(this BaseBundle bundle)
 {
     return(bundle.KeySet());
 }
Exemplo n.º 3
0
 public static void putString(this BaseBundle bundle, string key, string value)
 {
     bundle.PutString(key, value);
 }
Exemplo n.º 4
0
 public static string getString(this BaseBundle bundle, string key)
 {
     return(bundle.GetString(key));
 }
Exemplo n.º 5
0
 public static bool containsKey(this BaseBundle bundle, string key)
 {
     return(bundle.ContainsKey(key));
 }
Exemplo n.º 6
0
 public static int size(this BaseBundle bundle)
 {
     return(bundle.Size());
 }
Exemplo n.º 7
0
 public static int getInt(this BaseBundle bundle, string key, int defaultValue)
 {
     return(bundle.GetInt(key, defaultValue));
 }
Exemplo n.º 8
0
 public static bool isEmpty(this BaseBundle bundle)
 {
     return(bundle.IsEmpty);
 }
Exemplo n.º 9
0
        public static void DrawHeaderPaint(SKCanvas c, BaseBundle icon)
        {
            c.DrawRect(new SKRect(0, 0, icon.Width, icon.HeaderHeight), new SKPaint
            {
                IsAntialias   = true,
                FilterQuality = SKFilterQuality.High,
                Color         = icon.DisplayStyle.PrimaryColor
            });

            if (icon.DisplayStyle.CustomBackground != null && icon.DisplayStyle.CustomBackground.Height != icon.DisplayStyle.CustomBackground.Width)
            {
                icon.IsDisplayNameShifted = false;
                var bgPaint = new SKPaint {
                    IsAntialias = true, FilterQuality = SKFilterQuality.High, BlendMode = SKBlendMode.Screen
                };
                if (Properties.Settings.Default.UseChallengeBanner)
                {
                    bgPaint.Color = SKColors.Transparent.WithAlpha((byte)Properties.Settings.Default.ChallengeBannerOpacity);
                }
                c.DrawBitmap(icon.DisplayStyle.CustomBackground, new SKRect(0, 0, 1024, 256), bgPaint);
            }
            else if (icon.DisplayStyle.DisplayImage != null)
            {
                icon.IsDisplayNameShifted = true;
                if (icon.DisplayStyle.CustomBackground != null && icon.DisplayStyle.CustomBackground.Height == icon.DisplayStyle.CustomBackground.Width)
                {
                    c.DrawBitmap(icon.DisplayStyle.CustomBackground, new SKRect(0, 0, icon.HeaderHeight, icon.HeaderHeight),
                                 new SKPaint {
                        IsAntialias = true, FilterQuality = SKFilterQuality.High, BlendMode = SKBlendMode.Screen,
                        ImageFilter = SKImageFilter.CreateDropShadow(2.5F, 0, 20, 0, icon.DisplayStyle.SecondaryColor.WithAlpha(25))
                    });
                }

                c.DrawBitmap(icon.DisplayStyle.DisplayImage, new SKRect(0, 0, icon.HeaderHeight, icon.HeaderHeight),
                             new SKPaint {
                    IsAntialias = true, FilterQuality = SKFilterQuality.High,
                    ImageFilter = SKImageFilter.CreateDropShadow(-2.5F, 0, 20, 0, icon.DisplayStyle.SecondaryColor.WithAlpha(50))
                });
            }

            SKPath pathTop = new SKPath {
                FillType = SKPathFillType.EvenOdd
            };

            pathTop.MoveTo(0, icon.HeaderHeight);
            pathTop.LineTo(icon.Width, icon.HeaderHeight);
            pathTop.LineTo(icon.Width, icon.HeaderHeight - 19);
            pathTop.LineTo(icon.Width / 2 + 7, icon.HeaderHeight - 23);
            pathTop.LineTo(icon.Width / 2 + 13, icon.HeaderHeight - 7);
            pathTop.LineTo(0, icon.HeaderHeight - 19);
            pathTop.Close();
            c.DrawPath(pathTop, new SKPaint {
                IsAntialias = true, FilterQuality = SKFilterQuality.High, Color = icon.DisplayStyle.SecondaryColor,
                ImageFilter = SKImageFilter.CreateDropShadow(-5, -5, 0, 0, icon.DisplayStyle.AccentColor.WithAlpha(75))
            });

            c.DrawRect(new SKRect(0, icon.HeaderHeight, icon.Width, icon.HeaderHeight + icon.AdditionalSize), new SKPaint
            {
                IsAntialias   = true,
                FilterQuality = SKFilterQuality.High,
                Color         = icon.DisplayStyle.PrimaryColor.WithAlpha(200) // default background is black, so i'm kinda lowering the brightness here and that's what i want
            });
        }
Exemplo n.º 10
0
 public void NavigateToProfile(BaseBundle bundle)
 {
     NavigateTo <IProfileViewModel>(bundle);
 }
Exemplo n.º 11
0
 public void NavigateToAuthorization(BaseBundle bundle)
 {
     AuthNavigationVmService.NavigateToAuthorization(bundle);
 }