/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void OnSystemObjectStateChanged(object sender, CheckedEventArgs e) { var i = (sender as CheckableStorageObject); switch (e.State) { case true: CheckedPaths.Add(i.Path); break; case false: case null: CheckedPaths.Remove(i.Path); break; } }
public void CheckForRecordData() { CheckedPaths.Clear(); foreach (string drive in Util.GetAllUsbDrivePaths()) { UpdateModel added = new UpdateModel() { Path = drive }; added.IsSelected = ScoutingJson.HasRecordInFolder(drive); CheckedPaths.Add(added); } OnPropertyChanged("CheckedPaths"); SelectedPathModel = CheckedPaths.FirstOrDefault((um) => um.IsSelected); }