using System; using System.Windows; using System.Windows.Input; using System.Windows.Media; using System.Windows.Resources; using System.Windows.Media.Imaging; namespace Launcher_Client { public partial class PatchNotes : Window { public PatchNotes() { InitializeComponent(); } private ImageBrush ResourceBrush(String RName) { Uri RUri = new Uri(String.Format("Resources/{0}.png", RName), UriKind.Relative); StreamResourceInfo RInfo = Application.GetResourceStream(RUri); BitmapFrame RFrame = BitmapFrame.Create(RInfo.Stream); ImageBrush RBrush = new ImageBrush(); RBrush.ImageSource = RFrame; return RBrush; } private void Exit_MouseEnter(Object Sender, MouseEventArgs Args) { Dispatcher.BeginInvoke((Action)(() => { Exit.Background = ResourceBrush("PHExit"); })); } private void Exit_MouseLeave(Object Sender, MouseEventArgs Args) { Dispatcher.BeginInvoke((Action)(() => { Exit.Background = ResourceBrush("PExit"); })); } private void Exit_MouseLeftButtonUp(Object Sender, MouseButtonEventArgs Args) { Dispatcher.BeginInvoke((Action)(() => { Exit.Background = ResourceBrush("PExit"); })); Close(); } } }