private void BoutonOption(object sender, RoutedEventArgs e) { var Option = new FenetreOption(); Option.Owner = this; Option.Show(); Option.OptionsEvent += OptionsApplyClick; Option.OptionsEventWindow += OptionsWindows; }
private void OptionsWindows(FenetreOption fen) { if (fen.RBFullscreen.IsChecked == true) { this.WindowState = WindowState.Maximized; this.WindowStyle = WindowStyle.None; } else { this.WindowState = WindowState.Normal; this.WindowStyle = WindowStyle.ThreeDBorderWindow; } }
private void OptionsApplyClick(FenetreOption fen) { if (fen.RectangleFond.Fill.ToString() == new SolidColorBrush(Colors.DarkGreen).ToString()) { BitmapImage glowIcon = new BitmapImage(); glowIcon.BeginInit(); glowIcon.UriSource = new Uri(@"C:\Users\Regis\Bureau\RegisServer\1. Info. de Gestion\2ème Année\C#\Laboratoire\labo-phase-3-DjangoVG\BlackJack\BlackJack\Images\Autres\FondVert.jpeg", UriKind.Relative); glowIcon.EndInit(); FondSP.ImageSource = glowIcon; } else { BitmapImage glowIcon = new BitmapImage(); glowIcon.BeginInit(); glowIcon.UriSource = new Uri(@"C:\Users\Regis\Bureau\RegisServer\1. Info. de Gestion\2ème Année\C#\Laboratoire\labo-phase-3-DjangoVG\BlackJack\BlackJack\Images\Autres\FondBleu.jpg", UriKind.Relative); glowIcon.EndInit(); FondSP.ImageSource = glowIcon; } }