Ejemplo n.º 1
0
        /// <summary>
        /// Добавить в решение новый проект
        /// </summary>
        /// <param name="Name">Имя нового проекта</param>
        public void AddProject(string Name)
        {
            InfoAboutPrj prj = new InfoAboutPrj();
            prj.FilePath = Name;

            string[] strs = Name.Split('\\');
            strs = strs[strs.Count() - 1].Split('.');

            prj.Name = strs[0];

            this.Projects.Add(prj);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Открыть решение
        /// </summary>
        /// <param name="filePath"></param>
        public void Open(string filePath)
        {
            this.FileSolution = filePath;
            string text = System.IO.File.ReadAllText(filePath);
            this.Projects = new List<InfoAboutPrj>();

            this.Name = ConfigReader.GetValue(text, "Name");

            foreach (string item in ConfigReader.GetValues(text, "path"))
            {
                if (!item.Equals(string.Empty))
                {
                    InfoAboutPrj info = new InfoAboutPrj();
                    info.LoadProject(item);
                    this.Projects.Add(info);
                }
            }
        }