public void Clear() { LastStartedFiles lsfs = LastStartedFiles.Load(); lsfs.Clear(); lsfs.Save(); }
public void AddlastStartedFile(string path) { LastStartedFiles lsfs = LastStartedFiles.Load(); LastStartedFile lsf = new LastStartedFile(path); List <LastStartedFile> rem = new List <LastStartedFile>(); foreach (var l in lsfs) { if (l.Path == lsf.Path) { rem.Add(l); } } foreach (var l in rem) { lsfs.Remove(l); } lsfs.Insert(0, lsf); lsfs.Save(); }