//15s检测一次是否需要提醒 private void remindTimer_Tick(object sender, EventArgs e) { scheduleService.CheckRemind(); if (scheduleService.remindSchedules.Count != 0) { string detail = scheduleService.remindSchedules[0].Details; int musicIndex = scheduleService.remindSchedules[0].MusicIndex; //音乐 string musicPath = scheduleService.remindSchedules[0].MusicPath; //自定音乐路径 scheduleService.remindSchedules.Clear(); //全部删除 //最小化时气球提示 if (!this.Visible && !mForm.Visible) { bgmusic.SetRemindMusic(musicIndex); notifyIcon1.ShowBalloonTip(3000, "日程到点啦!", detail + "!!", ToolTipIcon.Info); } else { //非最小化弹窗 bgmusic.SetMusic(musicPath); bgmusic.SelectMusic(musicIndex); bgmusic.PlayMusic(); MessageBox.Show(detail + "!!", "有一个日程时间到啦~"); bgmusic.SetPause(); } mForm.UpdateDisplayTodaySchedules(DateTime.Now); } }