/// <summary> /// updates the notify icons tool tip. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="BritishMicro.TaskClerk.TaskActivityEventArgs"/> instance containing the event data.</param> void UpdateNotifyToolTip(object sender, TaskActivityEventArgs e) { TaskActivity current = e.TaskActivity; if (current.IsNotEmpty() && !current.TaskDescription.IsEvent) { if (current.TaskDescription.IsNotEmpty() & current.TaskDescription.IsEvent == false) { int MAXSIZEOFNOTIFYTEXT = 63; string notifyToolTip = string.Format(CultureInfo.CurrentCulture, "{0}:{1}", Resources.NotifyToolTip, current.TaskDescription.Name); notifyToolTip = notifyToolTip.Substring( 0, (notifyToolTip.Length <= MAXSIZEOFNOTIFYTEXT ? notifyToolTip.Length : MAXSIZEOFNOTIFYTEXT)); notifyIcon.Text = notifyToolTip; } } else { notifyIcon.Text = Resources.NotifyToolTip; } }