Main Menu

From OpenPetra Wiki
Revision as of 14:40, 31 October 2012 by Christiankatict (talk | contribs)
Jump to navigation Jump to search

WORK IN PROGRESS

This page is now outdated as the new Menu Navigation has been merged to trunk for the Alpha 0.2.22-1 release (End of October 2012). The page therefore needs updating and should not be relied on until this has happened.


General

MainWindowNew-generated.cs is the Main Menu Form.

  • It gets displayed after a successful login.
  • Its purpose is to allow the user to 'drill down' the OpenPetra Module and Menu hierarchy and to launch Tasks once the user navigated to the place in the Menu hierarchy where the Task is found.
  • If the Main Menu Form is closed, the OpenPetra Client is closed.

The Main Menu Form content is highly dynamic. It is driven by content in the file \csharp\ICT\Petra\Definitions\UINavigation.yml - in other words, if the content of UINavigation.yml is changed, the content of the Main Menu Form gets changed (after an OpenPetra Client restart).


Control Hierarchy and Layout

Instantiation hierarchy of Controls hosted on the Main Menu Form:

Variable Type
pnlContent System.Windows.Forms.Panel
--> dsbContent TDashboard {derives from System.Windows.Forms.Panel}
--> lstFolders TLstFolderNavigation {derives from System.Windows.Forms.Panel}
----> pnlAccordion [1..n] TPnlAccordion {derives from System.Windows.Forms.Panel}
------> FCurrentTaskList [1..n] TLstTasks {derives from System.Windows.Forms.UserControl}
--------> TaskGroup [1..n] TUcoTaskGroup {derives from System.Windows.Forms.UserControl}
----------> flpTaskGroup [1..n] System.Windows.Forms.FlowLayoutPanel
------------> SingleTask [1..n] TUcoSingleTask {derives from System.Windows.Forms.UserControl}

Note: The instantiation path does not correlate with the nesting of Controls in each other! The nesting is described in the section 'Description/Purpose'.


Description/Purpose:

  • pnlContent: contains every Control on the Main Menu Form (except for the Status Bar). It is not really seen on the Main Menu Form, although it is a Panel.
  • dsbContent: Fills the entire Main Menu Form space that lies right of the lstFolders Control. It is not really seen on the Main Menu Form, although it is a Panel.
    • Hosts several TLstTasks instances.
  • lstFolders: Is Docked to the left of the Main Menu Form.
    • Displays a dynamic list of OpenPetra Modules. Each OpenPetra Module is represented by a TRbtNavigationButton (a custom-painted RadioButton).
    • Also deals with the dynamic creation of one pnlAccordion per OpenPetra Module. Once an instance of TPnlAccordion got created and added to the Controls of lstFolders it is re-used once the user switches to it again!
    • Displays a Heading (inside pnlNavigationCaption) for the currently selected OpenPetra Module.
    • Layout:
      • The list of OpenPetra Modules is placed on a SplitContainer's Splitter Panel (sptNavigation.Panel2) that sits in the left bottom corner of the Main Form.
      • pnlAccordion instances are placed on a SplitContainer's Splitter Panel (sptNavigation.Panel1) that is displayed above the other SplitContainer's Splitter Panel.
      • The Headings are placed in a separate Panel above the SplitContainer (pnlNavigationCaption).
      • Also holds a Panel that has currently no functionality (pnlMoreButtons). It is displayed below the SplitContainer.
  • pnlAccordion:
    • Contains several sub-panels that can be expanded and collapsed; these represent Sub-Module items.
    • Also displays LinkLabels inside each sub-panel that represent the Areas of the Sub-Module.
      • Example: 'Main' Sub-Module in Partner Module, which has the following Areas: 'Partners', 'Extracts', 'Reports' and 'Setup'.
    • Shows the corresponding TLstTask in dsbContent when a LinkLabel got clicked. TLstTasks get instantiated by pnlAccordion; once an instance of TLstTask got created and added to the Controls of dsbContent it is re-used once the user switches to it again!
  • FCurrentTaskList: Holds a reference to the currently displayed TLstTask. TLstTask manages Tasks within Task Groups.
  • TaskGroup: Groups several SingleTasks into groups.
    • Each Task Group features a heading and a dividing line.
    • Each Task Group contains a flpTaskGroup Control.
    • Example: 'New Partner' Group in Partner Module, Partners Sub-Module.
  • flpTaskGroup:
    • Responsible for the layout of SingleTasks in TaskGroups.
    • Example: Layout of the SinlgeTasks 'Add New Family', 'Add New Person' and 'Add New Organisation' in the 'New Partner' Group in the Partner Module, Partners Sub-Module.
  • SingleTask: A single Main Menu item that the user can click to perform a Task in OpenPetra.
    • Example: 'Add New Family' in 'New Partner' Group in Partner Module, Partners Sub-Module.


Main Menu Screen with the various sections highlighted and annotated

NOTE: The annotated screenshot is now outdated as the new Menu Navigation has been merged to trunk for the Alpha 0.2.22-1 release (End of October 2012). The screenshot therefore needs updating and should not be relied on until this has happened.