private static void InsertRecordedNode(TagTreeNode todayGroup, HistoryRecordedEventArgs args) { FavoriteConfigurationElement favorite = Settings.GetOneFavorite(args.ConnectionName, false); // shouldn't happen, because the favorite was actualy processed if (favorite != null) { int insertIndex = TreeListLoader.FindFavoriteNodeInsertIndex(todayGroup.Nodes, favorite); FavoriteTreeNode favoriteNode = new FavoriteTreeNode(favorite); todayGroup.Nodes.Insert(insertIndex, favoriteNode); } }
public FavoritesTreeView() { // This prevents SharpDevelop and Visual Studio from both an exception in design mode for controls using this HistoryTreeView and from crashing when opening the // designer for this class. if (LicenseManager.UsageMode == LicenseUsageMode.Runtime) { this.ImageList = ConnectionImageHandler.GetProtocolImageList(); this.ImageIndex = 0; this.LineColor = Color.Black; this.SelectedImageIndex = 0; this.ShowNodeToolTips = true; this.AfterExpand += this.OnTreeViewExpand; this.ImageList.ImageSize = new Size(Settings.FavoritesImageWidth, Settings.FavoritesImageHeight); this.ImageList = ConnectionImageHandler.GetProtocolImageList(); this.ImageList.ImageSize = new Size(Settings.FavoritesImageWidth, Settings.FavoritesImageHeight); this.Font = FontParser.FromString(Settings.FavoritesFont); this.BackColor = ColorParser.FromString(Settings.FavoritesFontBackColor); this.ForeColor = ColorParser.FromString(Settings.FavoritesFontForeColor); this.loader = new TreeListLoader(this); } }
public DBTreeView() { this.ImageList = new ImageList(); if (LicenseManager.UsageMode == LicenseUsageMode.Runtime) { this.ImageList = ConnectionImageHandler.GetProtocolImageList(); this.ImageIndex = 0; this.LineColor = Color.Black; this.SelectedImageIndex = 0; this.ShowNodeToolTips = true; this.AfterExpand += this.OnTreeViewExpand; this.ImageList.ImageSize = new Size(Settings.FavoritesImageWidth, Settings.FavoritesImageHeight); this.ImageList = ConnectionImageHandler.GetProtocolImageList(); this.ImageList.ImageSize = new Size(Settings.FavoritesImageWidth, Settings.FavoritesImageHeight); this.Font = FontParser.FromString(Settings.FavoritesFont); this.BackColor = ColorParser.FromString(Settings.FavoritesFontBackColor); this.ForeColor = ColorParser.FromString(Settings.FavoritesFontForeColor); this.loader = new TreeListLoader(this); } }