public void StopNotifying(int alertIndex, bool tryRemovingAlert) { _soundPlayer.Stop(); _popup.Hide(); if (tryRemovingAlert) { MainForm.TryRemoveAlert(alertIndex); } }
/// <summary> /// closes the popup and stops playing the sound /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Notifier_Click(object sender, EventArgs e) { try { PopupNotifier pn = (PopupNotifier)sender; pn.Hide(); try { if (wp.PlaybackState != PlaybackState.Stopped) { wp.Stop(); } } catch (Exception ex) { Logging.WriteLine(string.Format("Unable to stop playback of sound file: {0}", ex.ToString())); } } catch { } }
void c_click(object sender, EventArgs e, Outlook.MailItem mail, PopupNotifier notify) { mail.Display(); notify.Hide(); }
private void btnStop_Click(object sender, EventArgs e) { timer1.Stop(); popup.Hide(); }