From fe09fca3e77be09fed738a975ff9c5a508c2dd0d Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 25 十月 2024 08:31:56 +0800 Subject: [PATCH] 检验 --- DevApp/Gs.DevApp/UserControl/ShowDialogForm.cs | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 172 insertions(+), 0 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/ShowDialogForm.cs b/DevApp/Gs.DevApp/UserControl/ShowDialogForm.cs new file mode 100644 index 0000000..900ace8 --- /dev/null +++ b/DevApp/Gs.DevApp/UserControl/ShowDialogForm.cs @@ -0,0 +1,172 @@ +锘縰sing System.ComponentModel; + +namespace Gs.DevApp.UserControl +{ + public partial class ShowDialogForm : DevExpress.XtraEditors.XtraForm + { + #region Fields & Properties + /// <summary> + /// 鏍囬 + /// </summary> + private string caption; + + public string Caption + { + get { return caption; } + set { caption = value; } + } + /// <summary> + /// 娑堟伅 + /// </summary> + private string message; + + public string Message + { + get { return message; } + set { message = value; } + } + /// <summary> + /// 鎻忚堪 + /// </summary> + private string content; + + public string Content + { + get { return content; } + set { content = value; } + } + /// <summary> + /// 杩涘害鏉℃渶灏忓�� + /// </summary> + private int minProcess = 1; + + public int MinProcess + { + get { return minProcess; } + set { minProcess = value; } + } + /// <summary> + /// 杩涘害鏉℃渶澶у�� + /// </summary> + private int maxProcess = 100; + + public int MaxProcess + { + get { return maxProcess; } + set { maxProcess = value; } + } + #endregion + + #region Constructed Function + public ShowDialogForm() + { + InitializeComponent(); + } + /// <summary> + /// 璁剧疆 + /// </summary> + /// <param name="_caption">鎻愮ず</param> + public ShowDialogForm(string _caption) + : this(_caption, "", "", 100) + { + } + + /// <summary> + /// 璁剧疆 + /// </summary> + /// <param name="_caption"></param> + /// <param name="_message"></param> + public ShowDialogForm(string _caption,string _message) + : this(_caption, _message, "",100) + { + } + + /// <summary> + /// 璁剧疆 + /// </summary> + /// <param name="_caption"></param> + /// <param name="_message"></param> + /// <param name="_content"></param> + public ShowDialogForm(string _caption, string _message,string _content) + : this(_caption, _message, _content, 100) + { + } + + /// <summary> + /// 璁剧疆 + /// </summary> + /// <param name="_caption">鎻愮ず</param> + /// <param name="_message">娑堟伅鍐呭</param> + /// <param name="_content">璇︾粏鎻忚堪</param> + /// <param name="_maxProcess">杩涘害鏉℃渶澶у��</param> + public ShowDialogForm(string _caption, string _message,string _content,int _maxProcess) + : this() + { + this.Caption = ""; + this.Message = ""; + this.Content = ""; + + this.Caption = _caption == "" ? "鎻愮ず" : _caption; + this.Message = _message == "" ? "姝e湪鍔犺浇锛岃绋嶅悗......" : _message; + this.Content = _content; + this.maxProcess = _maxProcess > this.MinProcess ? _maxProcess : MinProcess; + + lblCaption.Text = this.Caption; + // lblMessage.Text = this.Message; + lblContent.Text = this.Content; + progressShow.Properties.Minimum = MinProcess; + progressShow.Properties.Maximum = MaxProcess; + progressShow.Properties.Step = 1; + progressShow.PerformStep(); + + this.ShowInTaskbar = false; + this.TopMost = true; + this.Show(); + this.Refresh(); + } + #endregion + + #region Methods + /// <summary> + /// 璁剧疆鎻愮ず + /// </summary> + /// <param name="newCaption"></param> + public void SetCaption(string newCaption) + { + this.Caption = newCaption; + lblCaption.Text = this.Caption; + progressShow.PerformStep(); + this.Refresh(); + } + /// <summary> + /// 璁剧疆娑堟伅 + /// </summary> + /// <param name="newMessage"></param> + public void SetMessage(string newMessage) + { + this.Message = newMessage; + // lblMessage.Text = this.Message; + progressShow.PerformStep(); + this.Refresh(); + } + /// <summary> + /// 璁剧疆鎻忚堪 + /// </summary> + /// <param name="newContent"></param> + public void SetContent(string newContent) + { + this.Content = newContent; + lblContent.Text = this.Content; + progressShow.PerformStep(); + this.Refresh(); + } + #endregion + + #region Events + protected override void OnClosing(CancelEventArgs e) + { + base.OnClosing(e); + } + #endregion + } +} \ No newline at end of file -- Gitblit v1.9.3