Ejemplo n.º 1
0
        private void MainForm_Resize(object sender, EventArgs e)
        {
            if (WindowState == FormWindowState.Minimized)
            {
                Hide();

                MatchEvent matchNext = getNextMatch();
                string     tipText   = matchNext != null?matchNext.getDescription() : "No matches in calendar";

                niTray.ShowBalloonTip(500, Application.ProductName, tipText, ToolTipIcon.Info);
            }
        }
Ejemplo n.º 2
0
        private void niTray_MouseMove(object sender, MouseEventArgs e)
        {
            MatchEvent matchNext = getNextMatch();

            if (matchNext != null)
            {
                TimeSpan delay       = matchNext.DateBegin - DateTime.Now;
                string   description = matchNext.getDescription();
                string   through     = "Match through " + delay.Days.ToString("00") + ":" + delay.Hours.ToString("00") + ":" + delay.Minutes.ToString("00");
                string   tipText     = (description + "\n" + through);

                niTray.Text = tipText.Length < 64 ? tipText : description;
            }
            else
            {
                niTray.Text = "No matches in calendar";
            }
        }