Advertisement
Diaxon

Untitled

Nov 27th, 2023
572
0
178 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.47 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15.  
  16. namespace zadanko3
  17. {
  18.     /// <summary>
  19.     /// Interaction logic for MainWindow.xaml
  20.     /// </summary>
  21.     public partial class MainWindow : Window
  22.     {
  23.         public MainWindow()
  24.         {
  25.             InitializeComponent();
  26.         }
  27.  
  28.         private void BlackAndWhite(object sender, RoutedEventArgs e)
  29.         {
  30.             appName.Foreground = Brushes.Black;
  31.             appName.Background = Brushes.White;
  32.             this.Background = Brushes.Black;
  33.             text1.Foreground = Brushes.White;
  34.             text2.Foreground= Brushes.White;
  35.             text3.Foreground = Brushes.White;
  36.         }
  37.         private void GreenAndYellow(object sender, RoutedEventArgs e)
  38.         {
  39.             appName.Foreground = Brushes.Green;
  40.             appName.Background = Brushes.Yellow;
  41.             this.Background = Brushes.Green;
  42.             text1.Foreground = Brushes.Yellow;
  43.             text2.Foreground = Brushes.Yellow;
  44.             text3.Foreground = Brushes.Yellow;
  45.         }
  46.         private void BlueYellow(object sender, RoutedEventArgs e)
  47.         {
  48.             appName.Foreground = Brushes.Yellow;
  49.             appName.Background = Brushes.Blue;
  50.             this.Background = Brushes.Yellow;
  51.             text1.Foreground = Brushes.Blue;
  52.             text2.Foreground = Brushes.Blue;
  53.             text3.Foreground = Brushes.Blue;
  54.         }
  55.         private void RedBlue(object sender, RoutedEventArgs e)
  56.         {
  57.             appName.Foreground = Brushes.Red;
  58.             appName.Background = Brushes.Blue;
  59.             this.Background = Brushes.Red;
  60.             text1.Foreground = Brushes.Blue;
  61.             text2.Foreground = Brushes.Blue;
  62.             text3.Foreground = Brushes.Blue;
  63.         }
  64.         private void RedYellow(object sender, RoutedEventArgs e)
  65.         {
  66.             appName.Foreground = Brushes.Red;
  67.             appName.Background = Brushes.Yellow;
  68.             this.Background = Brushes.Yellow;
  69.             text1.Foreground = Brushes.Yellow;
  70.             text2.Foreground = Brushes.Yellow;
  71.             text3.Foreground = Brushes.Yellow;
  72.         }
  73.     }
  74. }
  75.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement