示例#1
0
        public static void SetStyleForTextBlock(object sender)
        {
            TextBlock Obj = (TextBlock)sender;

            if (Design.Black() == true)
            {
                Obj.Foreground = Design.GetBrush("White");
            }
            else
            {
                Obj.Foreground = Design.GetBrush("Black");
            }
        }
示例#2
0
        private void Image_Loaded(object sender, RoutedEventArgs e)
        {
            string url_pvsp;
            string url_pvsc;

            if (Design.Black() != true)
            {
                url_pvsp = "/Assets/Tiles/player_vs_player_black.png";
                url_pvsc = "/Assets/Tiles/player_vs_computer_black.png";
            }
            else
            {
                url_pvsp = "/Assets/Tiles/player_vs_player_white.png";
                url_pvsc = "/Assets/Tiles/player_vs_computer_white.png";
            }

            Uri imageUri = new Uri(url_pvsp, UriKind.Relative);

            pvsp.Source = new BitmapImage(imageUri);
            imageUri    = new Uri(url_pvsc, UriKind.Relative);
            pvsc.Source = new BitmapImage(imageUri);
        }
示例#3
0
 private void TextBox_Loaded(object sender, RoutedEventArgs e)
 {
     Design.SetStyleForTextBlock(Text);
 }
示例#4
0
 private void Text_Loaded(object sender, RoutedEventArgs e)
 {
     Design.SetStyleForTextBlock(Text1);
     Design.SetStyleForTextBlock(Text2);
     Game1.ShowStat(Text1, Text2);
 }
示例#5
0
 private void TextMessages_Loaded(object sender, RoutedEventArgs e)
 {
     Design.SetStyleForTextBlock(TextMessages);
     TextMessages.Text = "X- ваш ход!";
 }