public TrayStateManager(IContainer components) : this() { if (components == null) { throw new ArgumentNullException(nameof(components)); } _notifyIcon = new NotifyIconAnimation(components); _notifyIcon.Click += OnTrayIconClick; _notifyIcon.BalloonClick += OnTrayBalloonClick; _notifyIcon.BalloonTimeout += OnTrayBalloonTimeoutClose; _notifyIcon.AddState( new NotifyIconState(ApplicationTrayState.NormalIdle.ToString(), SR.GUIStatusIdle, Properties.Resources.AppTray) ); _notifyIcon.AddState( new NotifyIconState(ApplicationTrayState.BusyRefreshFeeds.ToString(), SR.GUIStatusBusyRefresh, Properties.Resources.AppBusy) ); _notifyIcon.AddState( new NotifyIconState(ApplicationTrayState.NewUnreadFeeds.ToString(), SR.GUIStatusUnreadFeedItemsAvailable, Properties.Resources.UnreadFeedItems) ); _notifyIcon.Visible = true; }
private void Dispose(bool disposing) { if (disposing) { if (_notifyIcon != null) { _notifyIcon.Dispose(); } _notifyIcon = null; } }