Esempio n. 1
0
    public void AddRecentFile(string path)
    {
        if (RecentFileList.Contains(path) == false)
        {
            if (RecentFileList.Count == this.MaxRecentFiles)
            {
                RecentFileList.RemoveAt(RecentFileList.Count - 1);
            }
            RecentFileList.Insert(0, path);
        }
        else
        {
            if (RecentFileList.Count == this.MaxRecentFiles)
            {
                RecentFileList.RemoveAt(RecentFileList.Count - 1);
            }

            RecentFileList.Remove(path);
            RecentFileList.Insert(0, path);
        }
        this.Save();
    }