private void PopulateFolders(IMAPIFolder folder, TreeNode node) { IMAPIFolderID[] subFolders = folder.GetSubFolders((int)folder.NumSubFolders); foreach (IMAPIFolderID fId in subFolders) { IMAPIFolder f = fId.OpenFolder(); TreeNode newNode = new TreeNode(f.ToString() + " (" + f.NumSubItems.ToString() + " sub items)"); newNode.Tag = fId; node.Nodes.Add(newNode); PopulateFolders(f, newNode); } }
private void PopulateFolders(IMAPIFolder folder) { IMAPIFolderID[] subFolders = folder.GetSubFolders((int)folder.NumSubFolders); foreach (IMAPIFolderID fId in subFolders) { IMAPIFolder f = fId.OpenFolder(); _stackPanel.AddElement( new TextElement(" FOLDER:" + f.ToString() + " (" + f.NumSubItems.ToString() + " sub items)") { AutoSizeMode = TextElement.AutoSizeModeOptions.WrapText, Size = new Size(450, 70), } ); PopulateFolders(f); FillFolder(f); } }