Ejemplo n.º 1
0
 internal static Brush GetBackgroundColorBrush()
 {
     return(Properties.Settings.Default.BgColorChoice switch
     {
         0 => Brushes.Transparent,
         1 => Properties.Settings.Default.LightTheme ? Brushes.Black : Brushes.White,
         2 => DrawingBrushes.CheckerboardDrawingBrush(Colors.White),
         _ => Brushes.Transparent,
     });
Ejemplo n.º 2
0
 internal static Brush GetBackgroundColorBrush()
 {
     return(Properties.Settings.Default.BgColorChoice switch
     {
         0 => Brushes.Transparent,
         1 => Properties.Settings.Default.DarkTheme ? Brushes.White : Brushes.Black,
         2 => DrawingBrushes.CheckerboardDrawingBrush(Colors.White),
         3 => DrawingBrushes.CheckerboardDrawingBrush(Color.FromRgb(76, 76, 76), Color.FromRgb(32, 32, 32), 55),
         _ => Brushes.Transparent,
     });
Ejemplo n.º 3
0
        internal static void ChangeBackground(object sender, RoutedEventArgs e)
        {
            if (LoadWindows.GetMainWindow.MainImageBorder == null)
            {
                return;
            }

            Properties.Settings.Default.BgColorChoice++;

            if (Properties.Settings.Default.BgColorChoice > 3)
            {
                Properties.Settings.Default.BgColorChoice = 0;
            }

            switch (Properties.Settings.Default.BgColorChoice)
            {
            case 0:
                var x = new SolidColorBrush(Colors.Transparent);
                if (LoadWindows.GetMainWindow.MainImageBorder.Background == x)
                {
                    goto case 1;
                }
                LoadWindows.GetMainWindow.MainImageBorder.Background = x;
                break;

            case 1:
                var brush = Properties.Settings.Default.DarkTheme ? Brushes.White : Brushes.Black;
                LoadWindows.GetMainWindow.MainImageBorder.Background = brush;
                break;

            case 2:
                var checkerboardBg = DrawingBrushes.CheckerboardDrawingBrush(Colors.White);
                if (checkerboardBg != null)
                {
                    LoadWindows.GetMainWindow.MainImageBorder.Background = checkerboardBg;
                }
                break;

            case 3:
                var checkerboardBg2 = DrawingBrushes.CheckerboardDrawingBrush(Color.FromRgb(76, 76, 76));
                if (checkerboardBg2 != null)
                {
                    LoadWindows.GetMainWindow.MainImageBorder.Background = checkerboardBg2;
                }
                break;

            default:
                LoadWindows.GetMainWindow.MainImageBorder.Background = Brushes.Transparent;
                break;
            }
        }
Ejemplo n.º 4
0
        internal static void SetColors()
        {
            mainColor = (Color)Application.Current.Resources["IconColor"];

            switch (Properties.Settings.Default.BgColorChoice)
            {
            case 0:
                LoadWindows.GetMainWindow.ParentContainer.Background = Brushes.Transparent;
                break;

            case 1:
                var brush = Properties.Settings.Default.LightTheme ? Brushes.Black : Brushes.White;
                LoadWindows.GetMainWindow.ParentContainer.Background = brush;
                break;

            case 2:
                LoadWindows.GetMainWindow.ParentContainer.Background = DrawingBrushes.CheckerboardDrawingBrush(Colors.White);
                break;
            }

            backgroundBorderColor = (Color)Application.Current.Resources["BackgroundColorAlt"];
        }