private void CreateSolution(HeadInfo hi) { var sln = new Solution(hi); _solutionList.Add(sln); sln.Save(); }
public void CreateSolution(string strName, string strPath, string strComment) { var hi = new HeadInfo(strName, strPath, strComment, "Solution"); _solutionHeadList.Add(hi); CreateSolution(hi); }
public static Solution LoadSolution(HeadInfo hi) { try { var xml = UTools.FileHelper.ReadFileStr(hi.Path + hi.Name + "." + _ext); Solution sln = UTools.XmlHelper.XmlDeserialize <Solution>(xml, Encoding.UTF8) as Solution; return(sln); } catch (Exception e) { Console.WriteLine(e.Message); } return(null); }
public bool LoadSolution(HeadInfo hi) { var sln = _solutionList.Find(x => x.HeadInfo == hi); if (sln != null) { return(true); } sln = Solution.LoadSolution(hi); if (sln == null) { CreateSolution(hi); } else { _solutionList.Add(sln); } return(true); }