Пример #1
0
        private void NotifyPlanAppointCount(int count)
        {
            if (count == 0 && notifyIcon != null && notifyIcon.Visible)
            {
                notifyIcon.Visible = false;
                if (notifyForm != null)
                {
                    notifyForm.Close();
                }
            }

            if (count > 0 && NeedNotify())
            {
                if (notifyIcon == null)
                {
                    notifyIcon = CreateNotifyIcon();
                }

                notifyIcon.Visible = true;
                string notificationText = EntryControl.Resources.Message.Notify.HasNewPlanAppoint.Replace("@count", count.ToString());
                notifyIcon.ShowBalloonTip(10000, EntryControl.Resources.Message.Notify.HasNewPlanAppointTitle, notificationText, ToolTipIcon.Warning);
                PlayNotifySound();

                ShowNotifyWindow();
            }
        }