public void restoreBackup(LocationPathHolder path, string user, RunWorkerCompletedEventHandler when_done) { string target; if(path.GetType()==typeof(ManualLocationPathHolder)) { target = path.ToString(); } else { target = Core.locations.getAbsolutePath(path,user); } restoreBackup(target, when_done); }
public void addPathCandidate(LocationPathHolder location) { foreach(LocationPathHolder path in path_candidates) { if(location.GetType()==typeof(ManualLocationPathHolder)) { if(path.GetType()==typeof(ManualLocationPathHolder)) { path_candidates.Remove(path); break; } } else if(path.ToString().Equals(location.ToString())) { if(location.GetType()==typeof(DetectedLocationPathHolder)) { path_candidates.Remove(path); path_candidates.Add(location); } return; } } path_candidates.Add(location); }