Basic Framework Platform-basic management framework-GUI implementation design (I)

Source: Internet
Author: User
Tags sharpdevelop

The last post posted in the question area, after maximizing the form, the system prompts "the set has been modified in instantiation, I finally found out what the problem was: the delegated code is a ghost, and it will be okay if it is deleted, but why is there a delegate? The system will report an error. still a question. for the time being, focus on technology instead of technology.
Back to the GUI implementation design: at the beginning, we planned to implement the basic management framework by using the SharpDevelop interface. during this period of time, I found that my understanding of interface programming far could not meet the capability of interface-oriented programming. in fact, there is nothing to explain. I have never experienced interface-oriented programming. Of course I can't understand it anymore. Haha. however, abstract understanding of things is very beneficial by understanding the programming ideas of interfaces.

Through the abstract understanding of the user interface (GUI called basic management framework) in SharpDevelop, I have a deep understanding of the implementation of user interfaces similar to vs.net. combined with the practice during this period, I feel thatInterface callIt seems that the code is too easy to use. It is not only obscure, but does not know the actual process of code running at all. Sometimes, when it comes to the last function, it turns out to be an interface method definition without any implementation, it's really confusing. What have you done after the program runs here? Forget it. Use the "gradually enlightened" and "Epiphany" of Indian and Chinese Buddhism to comfort yourself.

Due to limited capabilities, APIs are not required to be called within the Assembly, and inter-assembly access is not allowed temporarily. Implementation classes are directly provided for communication.

The implementation of the basic management framework (GUI) is basically as follows:
The GUI part of the basic management framework is an Mdi window, which contains five main parts: menu, toolbar, panel, workbench form, and status bar.
The Mdi window is an empty template and does not create any Control (Note: Form is also an implementation class of Control ). it contains the listMenus, listPads, listBenchWindows, listStatuses, listToolbars fields, and the attributes of listMenus, listPads, listBenchWindows, listStatuses, listToolbars, And the repainting method of each object. onMenuRedraw (), OnToolbarRedraw (), OnBenchWindowsRedraw (), OnStatusesRedraw (), OnPadsRedraw ().
InitializeWorkSpace () is used to manage all fields, attributes, and methods.
In the core service: Layout Service (CLayoutService. cs) to read the configuration information of the overall style by reading the menu, panel, workbench form, Status Bar, and toolbar object set from the configuration file.
Use the workbenchsingleton. cs file to control workbench initialization and start the control.
Thanks to the fact that vs.netis float, we can manage weifen.winformsui.doc king, which is available on the Internet. The example can be found in its own demo.

The above functions have basically been implemented. The problem of maximizing the size of the form has been solved. The subsequent implementation of the Resource Configuration Manager has been completed.

You can use the Resource Configuration Manager to manage configuration files and provide the Automatic Code Generation and preview functions.
The configuration file is stored in Xml format. The code is automatically generated and previewed and executed based on the information stored in Xml format.
Next, we will first consider the specific format of the configuration file, and then how the resource manager generates menu objects and toolbar objects ., bind the menu/button events to the function class library and generate a code file.
This part still needs to be carefully considered. There are still many things to learn, such as the implementation of ORM and System. Reflection.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.