예제 #1
0
        /// <summary>
        /// Создание файла с текстом
        /// </summary>
        /// <param name="filename"></param>
        /// <param name="projectFolder"></param>
        public static VHDL_Code_File CreateFile(string filename, string text, ProjectExplorer.ProjectFolder projectFolder)
        {
            string         path = System.IO.Path.Combine(projectFolder.Path, string.Concat(filename, ".vhdl"));
            VHDL_Code_File res  = new VHDL_Code_File(path, projectFolder);

            projectFolder.AddElement(res);

            var writer = System.IO.File.CreateText(path);

            writer.Write(text);
            writer.Close();

            projectFolder.Save();

            return(res);
        }
예제 #2
0
        /// <summary>
        /// Создание файла с текстом
        /// </summary>
        /// <param name="filename"></param>
        /// <param name="projectFolder"></param>
        public static Text_File CreateFile(string filename, string text, ProjectExplorer.ProjectFolder projectFolder)
        {
            string    path = System.IO.Path.Combine(projectFolder.Path, filename);
            Text_File res  = new Text_File(path, projectFolder);

            projectFolder.AddElement(res);

            var writer = System.IO.File.CreateText(path);

            writer.Write(text);
            writer.Close();

            projectFolder.Save();

            return(res);
        }