private static ToolStripMenuItem CreateFavoriteMenuItem(FavoriteConfigurationElement favorite) { ToolStripMenuItem item = new ToolStripMenuItem(favorite.Name) { Tag = FAVORITE, Image = ConnectionImageHandler.GetFavoriteIcon(favorite) }; return(item); }
private ToolStripButton CreateFavoriteButton(FavoriteConfigurationElement favorite) { Image buttonImage = ConnectionImageHandler.GetFavoriteIcon(favorite); ToolStripButton favoriteBtn = new ToolStripButton(favorite.Name, buttonImage, this.serverToolStripMenuItem_Click) { ToolTipText = favorite.GetToolTipText(), Tag = favorite, Overflow = ToolStripItemOverflow.AsNeeded }; return(favoriteBtn); }