public void InitialFolder(string path) { RootPath = path; try { string dir = path; sListViewItemCollection.Clear(); foreach (string currDir in Directory.GetDirectories(dir)) { SymbolViewItem n = new SymbolViewItem(); n.Symbol = System.IO.Path.GetFileName(currDir); n.FullPath = currDir; sListViewItemCollection.Add(n); } } catch (System.IO.DirectoryNotFoundException exc) { } }
public void InitialFolder(string path) { if (string.IsNullOrEmpty(path)) { path = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), "sourcedata"); } RootPath = path; try { string dir = path; sListViewItemCollection.Clear(); foreach (string currDir in Directory.GetDirectories(dir)) { SymbolViewItem n = new SymbolViewItem(); n.Symbol = System.IO.Path.GetFileName(currDir); n.FullPath = currDir; sListViewItemCollection.Add(n); } } catch (System.IO.DirectoryNotFoundException exc) { } }