Esempio n. 1
0
        void LoadFiles(string DirPath)
        {
            long SizeOfFiles = 0;

            try
            {
                ico.AddFolderIcon(DirPath);
                fileSystemWatcher1.EnableRaisingEvents = false;
                fileSystemWatcher1.Path = DirPath;
                string[] fPathes = Directory.GetFiles(DirPath);
                foreach (string fPath in fPathes)
                {
                    SizeOfFiles += AddItemToListView(fPath, true);
                }
            }
            catch
            {
            }
            finally
            {
                toolStripStatusLabel2.Text = String.Format(new FileSizeFormatProvider(), "File size: {0:fs}", SizeOfFiles);
                toolStripStatusLabel1.Text = listView1.Items.Count + " Objects.";

                fileSystemWatcher1.EnableRaisingEvents = true;
            }
        }
Esempio n. 2
0
 void solutionTreeView_AfterExpand(object sender, TreeViewEventArgs e)
 {
     e.Node.ImageIndex = _iconListManager.AddFolderIcon(FolderType.Open);
 }