Example #1
0
        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() }
            });
        }
Example #2
0
 private void UpdateDirInfo(MonitoredDir dir)
 {
     dir.Size = Math.Round((double)(GetDirectorySize(dir.Path) / 1000000), 2);
 }