/** * Starts the program. * * @author Rian Drake. */ void FileCreatorV2() { // Get the list of template files from the template directory. var Files = Directory.GetFiles(Directory.GetCurrentDirectory() + "\\Templates"); // Create the template list. m_FileCreatorV2 = new List<FileCreator>(); // Create persistent buttons. CreatePersistentButtons(); // Iterate through the template files. foreach(var file in Files) { // Ignore the globals file. if(!file.EndsWith("_globals.xml")) { // Create a new template file. FileCreator newFile = new FileCreator(); // Parse the template. newFile.ParseTemplateFile(file); // Add the template to the template list. m_FileCreatorV2.Add(newFile); } } // Create controls that persist throughout form lifetime. CreatePersistentControls(); m_Controls[0].Select(); }
public static void Main(string[] args) { fileCreator = new FileCreator(); fileCreator.createFile("test", ".txt", "test Text"); }