Esempio n. 1
0
        private static ToolStripMenuItem CreateFavoriteMenuItem(FavoriteConfigurationElement favorite)
        {
            ToolStripMenuItem item = new ToolStripMenuItem(favorite.Name)
            {
                Tag   = FAVORITE,
                Image = ConnectionImageHandler.GetFavoriteIcon(favorite)
            };

            return(item);
        }
Esempio n. 2
0
        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);
        }