Creating a simple screen
In this article we'll:
- Create our ShowOrders UIController without any grid or data
- Call the ShowOrders UIController from the menu
Introduction to UIController
UI Controller is a class that controls the UI interaction.
It is the equivalent to the Online program in the original application.
The video shows how to create a Folder and in it a Simple UIController and how to add it to the menu, run the application and call the controller.
In the next session the UIController will be explained.
To create a new Folder in the solution explorer:
- Stand on the Project where you want to create the folder and RightClick
- Select 'Add' -> 'New Folder'
- Give it a name
To create a new UI Controller:
- In the solution explorer right click on the Folder you would like to add the new UI controller to it
- Select ‘Add’ -> ‘New item’
- On the left pane select ‘Templates’
- From the Templates list select UIController
- Give it a name and press the Add button
Two classes are automatically created: The Controller class – where the logic is written The View class – the design of the screen (the window of the program) The two classes will be explained in the next session
To Add the Controller to the menu:
- In the Solution explorer go to the Views folder and DbClick on the ApplicationMDI.cs file
- Click on the Menu bar and give the menu a name
- Click outside the menu to save it
- DbClick on the new created entry - a new method is automatically created.
- Inside this method call the Controller by typing new FolderName.[SubFolderName].ClassName().Run()
private void ApplicationMdi_Load(object sender, EventArgs e)
{
new Training.SimpleScreen.ShowOrders().Run();
}
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com