public Form1() { InitializeComponent(); var tmp = new MonitoredDir() { Path = Path.GetTempPath() }; MonitoredDirs.Add(tmp); RefreshDirs(); dirsListView.Items.Add(new ListViewItem() { Name = tmp.Path, SubItems = { tmp.Path, tmp.Size.ToString() } }); }
private void UpdateDirInfo(MonitoredDir dir) { dir.Size = Math.Round((double)(GetDirectorySize(dir.Path) / 1000000), 2); }