|
using System;
using ClassGeneratorControls;
namespace ClassGeneratorEvents
{
/// <summary>
/// The class that handles the event of the class generator button.
/// </summary>
public class ClassGeneratorButtonEvents
{
private ClassGeneratorButton classGeneratorButton;
private FileCreator fileCreator;
private UIEntryStore uiEntryStore;
/// <summary>
/// The constructor that initializes the class generator button event class.
/// </summary>
/// <param name="classGeneratorButton">The class file generator button class.</param>
/// <param name="uiEntryStore">The class that stores all the values that are entered in the ui.</param>
public ClassGeneratorButtonEvents(ClassGeneratorButton classGeneratorButton, UIEntryStore uiEntryStore)
{
this.classGeneratorButton = classGeneratorButton;
this.uiEntryStore = uiEntryStore;
fileCreator = new FileCreator(uiEntryStore);
}
/// <summary>
/// The method that creates the class files.
/// </summary>
/// <returns>Returns the paths of the class files created.</returns>
public string CreateClassFiles()
{
System.Text.StringBuilder resultBuilder = new System.Text.StringBuilder();
resultBuilder.AppendLine(fileCreator.CreateVOClass());
resultBuilder.AppendLine(fileCreator.CreateBLLClass());
resultBuilder.AppendLine(fileCreator.CreateDALClass());
resultBuilder.AppendLine("Files are created successfully.!");
return resultBuilder.ToString();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.