In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you what the assimilation dialog box styles are in the Winform development framework, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
The main results are as follows: 1) based on the traditional classical mode, the interface adopts the OutLookBar toolbar and the famous Weifengluo multi-document layout control, integrates paging controls, and uses custom reports based on Apose.Cell controls, which can adapt to the references of most business systems. The frame data editing interface and the general query form interface all adopt the form integration mode, which simplifies the development code, improves the form development efficiency and the consistency of the unified interface.
2) based on the Winform framework based on the traditional classical mode, the excellent interface components of DotNetBar are introduced to improve the style and layout of the interface to a great extent. The toolbar is centrally placed on the Ribbon toolbar, which can be folded and grouped, etc., and also supports multi-document interface operation, which is very convenient and beautiful.
3) the interface design based on DevExpress also introduces DevExpress, the most excellent interface component of DotNet, on the basis of the Winform framework based on the traditional classical mode, which promotes the interface layout, style and other modules to a very high height, and provides this style of paging control, which makes the integration more *.
After introducing the layout and general style of the three frameworks, let's get back to the point, introducing the encapsulation of dialog box operations that are often used in Winform development, general dialog box operations, including a variety of different ways, the traditional way is shown below.
The above picture is the effect of Win7, XP or 2000 is basically the effect of gray face, if but in different interface styles, you can not always use the MessageBox.Show method, because different interface styles provide different dialog box encapsulation operations. The following are based on the traditional way, based on DotNetBar interface controls, based on DevExpress interface style, three ways of dialog box processing wrapper class.
1) the traditional dialog box handles the wrapper class code as follows
Public class MessageUtil {/ display general prompt information / prompt message public static DialogResult ShowTips (string message) {return MessageBox.Show (message, "prompt message", MessageBoxButtons.OK, MessageBoxIcon.Information) / display warning message / warning message public static DialogResult ShowWarning (string message) {return MessageBox.Show (message, "warning message", MessageBoxButtons.OK, MessageBoxIcon.Warning);} / display error message / error message public static DialogResult ShowError (string message) {return MessageBox.Show (message, "error message", MessageBoxButtons.OK, MessageBoxIcon.Error) } / display the information asking for the user and display the error flag / error message public static DialogResult ShowYesNoAndError (string message) {return MessageBox.Show (message, "error message", MessageBoxButtons.YesNo, MessageBoxIcon.Error) } / display the information asking for the user, and display the prompt sign / error message public static DialogResult ShowYesNoAndTips (string message) {return MessageBox.Show (message, "prompt message", MessageBoxButtons.YesNo, MessageBoxIcon.Information) } / display the information asking for the user, and display the warning sign / warning message public static DialogResult ShowYesNoAndWarning (string message) {return MessageBox.Show (message, "warning message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) } / display the information asking for the user, and display the prompt sign / error message public static DialogResult ShowYesNoCancelAndTips (string message) {return MessageBox.Show (message, "prompt message", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information) } / display a YesNo selection dialog box / dialog box selection prompt / return true if you select Yes, otherwise return false public static bool ConfirmYesNo (string prompt) {return MessageBox.Show (prompt, "confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = = DialogResult.Yes } / display a YesNoCancel selection dialog box / dialog box selection prompt / return the DialogResult value of the selection result public static DialogResult ConfirmYesNoCancel (string prompt) {return MessageBox.Show (prompt, "confirm", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);}}
2) the dialog box processing wrapper class in the DotNetBar style is as follows
Public class MessageExUtil {/ display general prompt information / prompt message public static DialogResult ShowTips (string message) {return MessageBoxEx.Show (message, "prompt message", MessageBoxButtons.OK, MessageBoxIcon.Information) / display warning message / warning message public static DialogResult ShowWarning (string message) {return MessageBoxEx.Show (message, "warning message", MessageBoxButtons.OK, MessageBoxIcon.Warning);} / display error message / error message public static DialogResult ShowError (string message) {return MessageBoxEx.Show (message, "error message", MessageBoxButtons.OK, MessageBoxIcon.Error) } / display the information asking for the user and display the error flag / error message public static DialogResult ShowYesNoAndError (string message) {return MessageBoxEx.Show (message, "error message", MessageBoxButtons.YesNo, MessageBoxIcon.Error) } / display the information asking for the user, and display the prompt sign / error message public static DialogResult ShowYesNoAndTips (string message) {return MessageBoxEx.Show (message, "prompt message", MessageBoxButtons.YesNo, MessageBoxIcon.Information) } / display the information asking for the user, and display the warning sign / warning message public static DialogResult ShowYesNoAndWarning (string message) {return MessageBoxEx.Show (message, "warning message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) } / display the information asking for the user and display the prompt flag / error message public static DialogResult ShowYesNoCancelAndTips (string message) {return MessageBoxEx.Show (message, "prompt message", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);}}
3) the dialog box processing wrapper class in DevExpress style is as follows
Public class MessageDxUtil {/ display general prompt information / prompt message public static DialogResult ShowTips (string message) {return DevExpress.XtraEditors.XtraMessageBox.Show (message, "prompt message", MessageBoxButtons.OK, MessageBoxIcon.Information) } / display warning message / warning message public static DialogResult ShowWarning (string message) {return DevExpress.XtraEditors.XtraMessageBox.Show (message, "warning message", MessageBoxButtons.OK, MessageBoxIcon.Warning) } / display error message / error message public static DialogResult ShowError (string message) {return DevExpress.XtraEditors.XtraMessageBox.Show (message, "error message", MessageBoxButtons.OK, MessageBoxIcon.Error) } / display the information asking for the user and display the error flag / error message public static DialogResult ShowYesNoAndError (string message) {return DevExpress.XtraEditors.XtraMessageBox.Show (message, "error message", MessageBoxButtons.YesNo, MessageBoxIcon.Error) } / display the information asking for the user, and display the prompt sign / error message public static DialogResult ShowYesNoAndTips (string message) {return DevExpress.XtraEditors.XtraMessageBox.Show (message, "prompt message", MessageBoxButtons.YesNo, MessageBoxIcon.Information) } / display the information asking for the user, and display the warning sign / warning message public static DialogResult ShowYesNoAndWarning (string message) {return DevExpress.XtraEditors.XtraMessageBox.Show (message, "warning message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) } / display the information asking for the user and display the prompt flag / error message public static DialogResult ShowYesNoCancelAndTips (string message) {return DevExpress.XtraEditors.XtraMessageBox.Show (message, "prompt message", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);}}
Three different dialog box packaging classes, designed for different Winform interface style services, the interface is the same, the dialog results returned are the same, simplifying the encapsulation of these commonly used operations at the same time, but also makes the interface as a whole to achieve a more consistent, better user experience, otherwise in the beautiful DevExpress interface effect, suddenly pop up a gray-faced dialog prompt message, very bad impression to the user.
The above is what the assimilation dialog styles are in the Winform development framework, and have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.