public ReminderForm(IResource task) { InitializeComponent(); this.Icon = Core.UIManager.ApplicationIcon; RestoreSettings(); Text += " at " + DateTime.Now.ToShortTimeString(); int index = Core.SettingStore.ReadInt("Tasks", "ReminderInterval", 0); _snoozePeriodList.SelectedIndex = index; _targetList.JetListView.SelectionStateChanged += new StateChangeEventHandler(OnSelectedTaskChanged); InitSpyResourceList(task); InitDescription(task); InitListWithAttachments(task); WindowsMultiMedia.PlaySound(Path.Combine(Application.StartupPath, "reminder.wav"), new IntPtr(0), WindowsMultiMedia.SND_FILENAME | WindowsMultiMedia.SND_ASYNC); }
public void Exec(IResource res, IActionParameterStore actionStore) { string soundFileName = actionStore.ParameterAsString(); WindowsMultiMedia.PlaySound(soundFileName, (IntPtr)0, WindowsMultiMedia.SND_FILENAME); }