protected virtual void OnCanSee(MoviesEventArgs e) { EventHandler <MoviesEventArgs> handler = CanSee; if (handler != null) { handler(this, e); } }
void _model_CanSee(object sender, MoviesEventArgs e) { if (NotifyIcon.IsPopupOpen) { return; } Balloon.Title = TranslationManager.Instance.Translate("HasNewSeries"); var builder = new System.Text.StringBuilder(); foreach (var movie in e.Movies) { builder.AppendLine(movie.Title); } Balloon.Text = builder.ToString(); //show balloon and close it after 4 seconds NotifyIcon.ShowCustomBalloon(Balloon, PopupAnimation.Slide, 4000); }