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);
        }
Example #2
0
        public FavoriteTreeNode(FavoriteConfigurationElement favorite) : base(favorite.Name)
        {
            this.Name     = favorite.Name;
            this.Favorite = favorite;
            this.Tag      = favorite;

            this.ImageKey         = ConnectionImageHandler.GetTreeviewImageListKey(favorite);
            this.SelectedImageKey = this.ImageKey;

            new System.Threading.Thread(new System.Threading.ThreadStart(new MethodInvoker(delegate
            {
                this.ToolTipText = favorite.GetToolTipText();
            }))).Start();
        }
Example #3
0
        public FavoriteTreeNode(FavoriteConfigurationElement favorite) : base(favorite.Name)
        {
            this.Name = favorite.Name;
            this.Favorite = favorite;
            this.Tag = favorite;

            this.ImageKey = ConnectionImageHandler.GetTreeviewImageListKey(favorite);
            this.SelectedImageKey = this.ImageKey;

            new System.Threading.Thread(new System.Threading.ThreadStart(new MethodInvoker(delegate
            {
                this.ToolTipText = favorite.GetToolTipText();
            }))).Start();
        }
Example #4
0
        public FavoriteTreeNode(FavoriteConfigurationElement favorite) : base(favorite.Name)
        {
            this.Name     = favorite.Name;
            this.Favorite = favorite;
            this.Tag      = favorite;

            this.ImageKey         = ConnectionImageHandler.GetTreeviewImageListKey(favorite);
            this.SelectedImageKey = this.ImageKey;

            try
            {
                new System.Threading.Thread(new System.Threading.ThreadStart(new MethodInvoker(delegate
                {
                    this.ToolTipText = favorite.GetToolTipText();
                }))).Start();
            }
            catch (System.OutOfMemoryException ex)
            {
                Kohl.Framework.Logging.Log.Fatal("An out of memory exception has occured while trying to load the tool tip texts for each active favorite in the favorites tree view.", ex);
                return;
            }
        }
 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;
 }