Through the previous introduction, we can know thatMainThe method is inherited fromFormshellapplicationObject instances can perform initialization of many frameworks, such as loading modules and loading services. SlaveFormshellapplicationType Definition:
Public abstract class formshellapplication <tworkitem, tshell>:Windowsformsapplication<Tworkitem, tshell> where tworkitem:WorkitemWhere tshell: Form
We can see that two types of parameters are required, one isWorkitem, One isForm,FormshellapplicationThe two types are instantiated during initialization. AndFormType instanceShow. HereFormThe type of instance is our applicationProgram.
The main interface is the main interaction area between the user and the system. It serves as a container and carries other business interfaces.
CabProvidedWorkspaceComponent, which acts as a user control andSmartpartDisplay container of the control, which can display the business interface in a variety of unified display modes. That is to sayWorkspaceUser Controls can be displayed in different styles.WorkspaceAllows you to display, hide, activate, and disable user controls. Of course, cab currently provides several default display styles. Next we will introduce them one by one. If developers think these display styles are not enough, they can also expand them on their own.
All typesWorkspaceAll Implemented interfacesIworkspace.
CurrentlyCabProvidedWorkspaceInclude:
Windowworkspace
Mdiworkspace
Tabworkspace
Deckworkspace
Zoneworkspace
Next, let's talk about each type.WorkspaceFeatures:
1. windowworkspace
TheWorkspaceThe user control that you need to display in oneWinformAndWorkspaceCorrespondingWindowsmartpartinfoTo set the Display Properties of the user control, such as the title information and whether it is a mode window.
2. mdiworkspace
TheWorkspaceYesWindowworkspaceDeveloped on the basis of, he also put a user control in a separateFormAndMDITo display and manage its subforms. The corresponding user control display information is set throughSmartpartinfoAnd then passed in as a parameterWorkspaceOfShowMethod.
3. tabworkspace
TheWorkspaceYou can useTabPage, we canWorkspaceCorrespondingTabsmartpartinfoTo set the Display Properties of the user control, such as the title information.
4. deckworkspace
TheWorkspaceThe user control is displayed in a format similar to overlapping cards. The current active interface is located at the top of the card. The number order of cards is fromWorkspace. NoneWorkspaceCorrespondingSmartpartinfo.
5. zoneworkspace
TheWorkspaceThe user control will be displayed in a tiled manner, suchOutlookYou can divide one interface into multipleZone, EachZoneIs used as a container to render user controls. Similarly, we can setZonesmartpartinfoTo set the user control inWorkspace.