Example #1
0
        private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            analyzer = new FolderAnalyzer(scannedpath, backgroundWorker);
            FolderItem root = analyzer.AnalyzeFolder();

            e.Result = root;
        }
Example #2
0
 private void pictureBoxMap_MouseMove(object sender, MouseEventArgs e)
 {
     if (root != null)
     {
         FolderItem res = FindItemAtPos(root, e.X - pictureBoxMap.Width / 2, e.Y - pictureBoxMap.Height / 2);
         if (hoverItem != res && res != null)
         {
             hoverItem = res;
             StringBuilder b = new StringBuilder();
             b.AppendLine("Size: " + FolderAnalyzer.FormatFileSize(res.Size));
             b.Append("Total: " + FolderAnalyzer.FormatFileSize(res.TotalSize));
             toolTip.ToolTipTitle = FolderAnalyzer.ShortFolderName(res.FolderName);
             toolTip.Show(b.ToString(), this, ItemPos(res));
         }
         if (res == null)
         {
             hoverItem = null;
             toolTip.Hide(this);
         }
     }
 }
Example #3
0
 public override string ToString()
 {
     return(FolderAnalyzer.ShortFolderName(foldername));
 }