Example #1
0
 private void PopulateDataGrid(string path)
 {
     try
     {
         DataGridController data = new DataGridController();
         ObservableCollection <FileAndDirAttributes> GridData = data.PopulateDataGrid(path);
         DirsAndFiles.ItemsSource = GridData;
         items.Content            = (GridData.Count - 1) + " items";
         size.Content             = "No file selected.";
     }
     catch (Exception e)
     {
         string error = e.ToString();
         MessageBox.Show("The process failed: " + error, "Data loading error.");
     }
 }