Пример #1
0
 public void addForRecent(string fileName)
 {
     try
     {
         string contents = File.ReadAllText("recent.json");
         JsonSerializerSettings settings = new JsonSerializerSettings();
         projects = JsonConvert.DeserializeObject <RecentProject>(contents);
         bool exists = projects.projects.Exists(element => element.path == fileName);
         if (!exists)
         {
             projects.projects.RemoveAt(projects.projects.Count - 1);
             Project item = new Project();
             item.path = fileName;
             //item.projName = fileName.Split('')
         }
     }
     catch (Exception ex)
     {
     }
 }
Пример #2
0
 public Util(GlobalData globalData)
 {
     this.globalData = globalData;
     projects        = new RecentProject();
 }