private void LoadClassTreeConfigs_old(TreeNodeCollection nodes, MOG_Project proj) { if (nodes == null || proj == null) { return; } foreach (classTreeNode tn in nodes) { MOG_Properties props = proj.GetClassificationProperties(tn.FullPath); props.SetImmeadiateMode(true); tn.props = props; // set icon string iconFilename = proj.GetProjectToolsPath() + "\\" + tn.props.ClassIcon; if (File.Exists(iconFilename)) { if (!this.imageArrayList.Contains(iconFilename.ToLower())) { // this image hasn't been loaded before Image img = Image.FromFile(iconFilename); this.imageList.Images.Add(img); this.imageArrayList.Add(iconFilename.ToLower()); //tn.ImageIndex = this.imageArrayList.Count - 1; //tn.SelectedImageIndex = this.imageArrayList.Count - 1; } else { // this image has already been loaded //tn.ImageIndex = this.imageArrayList.IndexOf(iconFilename.ToLower()); //tn.SelectedImageIndex = this.imageArrayList.IndexOf(iconFilename.ToLower()); } } LoadClassTreeConfigs(tn.Nodes); } }