public NotificationWindow(Event temp) { InitializeComponent(); EventText.Text = temp.Text; Title = temp.Name; if (temp is Note) { BackgroundImage.Source = new BitmapImage(new Uri("Resources/pen.jpg", UriKind.Relative)); } else { BackgroundImage.Source = new BitmapImage(new Uri("Resources/alarmback.jpg", UriKind.Relative)); AlarmClock alarm = temp as AlarmClock; try { alarm.Music.Play(); }catch (Exception ex) { try { alarm.Music.SoundLocation = @"Resources/standart.wav"; alarm.Music.Play(); } catch (Exception exeption) { MessageBox.Show(exeption.Message); } } } TrayPos tpos = new TrayPos(); tpos.getXY((int)this.Width, (int)this.Height, out top, out left, out prop, out end); this.Top = top; this.Left = left; anim = new DoubleAnimation(end, TimeSpan.FromSeconds(1)); }
public NotificationWindow() { InitializeComponent(); TrayPos tpos = new TrayPos(); tpos.getXY((int)this.Width, (int)this.Height, out top, out left, out prop, out end); this.Top = top; this.Left = left; anim = new DoubleAnimation(end, TimeSpan.FromSeconds(1)); }