public TrayIcon(Curator.Utils.IConfigManager configManager) { this._configManager = configManager; _contextMenu = new ContextMenuStrip(); this._contextMenu.Items.Add("&Configure", null, this.ConfigureContextMenuClickHandler).Font = new Font(this._contextMenu.Font, FontStyle.Bold); this._contextMenu.Items.Add("-"); this._contextMenu.Items.Add("&Next wallpaper", null, this.NextContextMenuClickHandler); this._contextMenu.Items.Add("&Previous wallpaper", null, this.PreviousContextMenuClickHandler); this._contextMenu.Items.Add("Pause slideshow", null, this.PauseContextMenuClickHandler); this._contextMenu.Items.Add("Resume slideshow", null, this.ResumeContextMenuClickHandler); this._contextMenu.Items.Add("-"); this._contextMenu.Items.Add("Force new shuffling", null, this.ShuffleContextMenuClickHandler); this._contextMenu.Items.Add("-"); this._contextMenu.Items.Add("&About", null, this.AboutContextMenuClickHandler); this._contextMenu.Items.Add("-"); this._contextMenu.Items.Add("E&xit", null, this.ExitContextMenuClickHandler); this._contextMenu.Items[5].Enabled = false; // Application starts with slideshow timer enabled _notifyIcon = new NotifyIcon() { Text = "Desktop Curator Alpha", Icon = Properties.Resources.TrayIcon, ContextMenuStrip = _contextMenu, Visible = true, }; this._notifyIcon.MouseClick += this.TrayIconClickHandler; this._notifyIcon.MouseDoubleClick += this.TrayIconDoubleClickHandler; }
public ConfigureForm(Curator.Utils.IConfigManager configManager) { InitializeComponent(); this._configManager = configManager; }