예제 #1
0
 public NotificationToastViewModel(MessageFilterEventArgs e, Window w)
 {
     this.Network   = e.Network;
     this.Channel   = e.Channel;
     this.TimeStamp = e.Timestamp;
     this.User      = e.Name;
     this.Message   = e.Message;
     this.SV        = (ShellView)w;
 }
예제 #2
0
 public NotificationToastViewModel(MessageFilterEventArgs e, Window w)
 {
     this.Network = e.Network;
       this.Channel = e.Channel;
       this.TimeStamp = e.Timestamp;
       this.User = e.Name;
       this.Message = e.Message;
       this.SV = (ShellView)w;
 }
예제 #3
0
 /// <summary>
 /// Notifies the user by making the taskbar icon blink.
 /// </summary>
 /// <param name="args">Contains the channel, user, etc. of the important message</param>
 public void Notify(MessageFilterEventArgs args)
 {
     Window x = screen.GetView() as Window;
       x.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate
       {
     IntPtr h = new WindowInteropHelper(x).Handle;
     TaskbarBlink.Flash(h);
       }));
 }
예제 #4
0
 /// <summary>
 /// Notifies the user by displaying a toast in the bottom right corner
 /// </summary>
 /// <param name="e">Contains the channel, user, etc. of the important message</param>
 public void Notify(MessageFilterEventArgs e)
 {
     Window x = screen.GetView() as Window;
       var ntvm = new NotificationToastViewModel(e, x);
       x.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate
       {
     this.windowManager.ShowWindow(ntvm);
       }));
 }
예제 #5
0
        /// <summary>
        /// Notifies the user by displaying a toast in the bottom right corner
        /// </summary>
        /// <param name="e">Contains the channel, user, etc. of the important message</param>
        public void Notify(MessageFilterEventArgs e)
        {
            Window x    = screen.GetView() as Window;
            var    ntvm = new NotificationToastViewModel(e, x);

            x.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate
            {
                this.windowManager.ShowWindow(ntvm);
            }));
        }
예제 #6
0
        /// <summary>
        /// Notifies the user by making the taskbar icon blink.
        /// </summary>
        /// <param name="args">Contains the channel, user, etc. of the important message</param>
        public void Notify(MessageFilterEventArgs args)
        {
            Window x = screen.GetView() as Window;

            x.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate
            {
                IntPtr h = new WindowInteropHelper(x).Handle;
                TaskbarBlink.Flash(h);
            }));
        }
예제 #7
0
 /// <summary>
 /// Plays sound to notify the user of an important message
 /// </summary>
 /// <param name="args"></param>
 public void Notify(MessageFilterEventArgs args)
 {
     if (this.settings.SoundPath != "")
     {
         try
         {
             ExtendedSoundPlayer sp = new ExtendedSoundPlayer(this.settings.SoundPath);
             sp.PlaySound();
         }
         catch (FileNotFoundException ex)
         {
             Console.WriteLine(ex.ToString());
         }
     }
     else
     {
         Console.WriteLine("Keine Sounddatei ausgewählt");
     }
 }
예제 #8
0
 /// <summary>
 /// Plays sound to notify the user of an important message
 /// </summary>
 /// <param name="args"></param>
 public void Notify(MessageFilterEventArgs args)
 {
     if (this.settings.SoundPath != "")
       {
     try
     {
       ExtendedSoundPlayer sp = new ExtendedSoundPlayer(this.settings.SoundPath);
       sp.PlaySound();
     }
     catch (FileNotFoundException ex)
     {
       Console.WriteLine(ex.ToString());
     }
       }
       else
       {
     Console.WriteLine("Keine Sounddatei ausgewählt");
       }
 }