private void AddNotify(NotifyUnit notifyUnit) { if (!this.Notify_Timer.Enabled) { this.Notify_Timer.Start(); } this.NotifyArr[notifyUnit.TypeNum] = notifyUnit; }
private void Notify_Timer_Tick(object sender, EventArgs e) { if (NotifyOn) { NotifyUnit notifyUnit = NotifyArr.FirstOrDefault(ntf => ntf != null); if (notifyUnit != null) { this.notifyIcon.ShowBalloonTip( this.NotifyTipShowTime, notifyUnit.TipTitle, notifyUnit.TipText, ToolTipIcon.Info ); this.notifyIcon.Tag = NotifyTag[notifyUnit.TypeNum]; NotifyArr[notifyUnit.TypeNum] = null; } else { this.Notify_Timer.Stop(); } } else { Boolean hasNewNotify = false; for (int i = 0; i != NotifyArr.Length; i++) { NotifyUnit ntu = NotifyArr[i]; if (ntu != null) { hasNewNotify = true; ntu = null; } } if (hasNewNotify) { Notify_Eject(); } } }
private void AddNotify(NotifyUnit notifyUnit) { if(!this.Notify_Timer.Enabled) this.Notify_Timer.Start(); this.NotifyArr[notifyUnit.TypeNum] = notifyUnit; }