public CWide() { InitializeComponent(); //init menu images System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CWide)); copyToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image"))); cutToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image"))); pasteToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image"))); Raccoom.Windows.Forms.TreeStrategyShell32Provider shell32Provider = new Raccoom.Windows.Forms.TreeStrategyShell32Provider(); shell32Provider.EnableContextMenu = true; shell32Provider.ShowAllShellObjects = true; // collection.Add(shell32Provider); // treeViewPrj.DataSource = shell32Provider; TreeStrategyFolderBrowserProvider FolderBrowser = new Raccoom.Windows.Forms.TreeStrategyFolderBrowserProvider(); FolderBrowser.ShowFiles = true; FolderBrowser.sCustomRootDir = @"E:\_Project"; /// FolderBrowser.RootFolder; treeViewPrj.DataSource = FolderBrowser; treeViewPrj.fSetTheme(); treeViewPrj.CheckBoxBehaviorMode = CheckBoxBehaviorMode.None; treeViewPrj.Populate(true); }
public FolderBrowser() { InitializeComponent(); var provider = new TreeStrategyFolderBrowserProvider(); provider.RootFolder = Environment.SpecialFolder.MyComputer; treeViewFolderBrowser.ShowLines = true; treeViewFolderBrowser.ShowPlusMinus = true; treeViewFolderBrowser.ShowRootLines = true; treeViewFolderBrowser.DataSource = provider; treeViewFolderBrowser.CheckBoxBehaviorMode = CheckBoxBehaviorMode.RecursiveChecked; this.FormClosing += delegate { Invoke(SetSelectedFolders); }; }