temu客户端程序
This commit is contained in:
commit
4aaf264e89
694 files changed
+263780
No files matched your search
@@ -0,0 +1,91 @@
|
||||
using AllBase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LittleRabbit.LittleRabbitForms.BaseForms
|
||||
{
|
||||
public partial class BaseMsgForm : LRBaseForm
|
||||
{
|
||||
public BaseMsgForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.ShowMinimizedBox = false;
|
||||
this.AcceptButton = pnlConfirm;
|
||||
}
|
||||
|
||||
public static BaseMsgForm ShowInfo(string msg, string caption = "", FormLevel fl = FormLevel.MEDIUM)
|
||||
{
|
||||
string title = string.IsNullOrEmpty(caption) ? "系统提示" : caption;
|
||||
BaseMsgForm msgBox = CreateMsgForm(msg, fl, title);
|
||||
msgBox.picTip.Image = global::LittleRabbit.Properties.Resources.BaseMsgInfo;
|
||||
msgBox.ShowDialog();
|
||||
return msgBox;
|
||||
}
|
||||
|
||||
private static BaseMsgForm CreateMsgForm(string msg, FormLevel fl, string title)
|
||||
{
|
||||
BaseMsgForm msgBox = new BaseMsgForm { Text = title, lblMsg = { Text = msg }, TitleText = title };
|
||||
if (fl.Equals(FormLevel.LARGE))
|
||||
{
|
||||
msgBox.Width = (int)FormLevel.LARGE;
|
||||
msgBox.Height = 280;
|
||||
}
|
||||
msgBox.pnlConfirm.Location = msgBox.pnlCancel.Location; // 把确认按钮移到取消按钮上面
|
||||
msgBox.pnlCancel.Visible = false;
|
||||
return msgBox;
|
||||
}
|
||||
|
||||
public static BaseMsgForm ShowError(string msg, string caption = "", FormLevel fl = FormLevel.MEDIUM)
|
||||
{
|
||||
string title = string.IsNullOrEmpty(caption) ? "系统错误" : caption;
|
||||
BaseMsgForm msgBox = CreateMsgForm(msg, fl, title);
|
||||
msgBox.picTip.Image = global::LittleRabbit.Properties.Resources.BaseMsgErr;
|
||||
msgBox.ShowDialog();
|
||||
return msgBox;
|
||||
}
|
||||
|
||||
public static BaseMsgForm ShowConfirm(string msg, string caption = "", FormLevel fl = FormLevel.MEDIUM, bool isTopMost = false)
|
||||
{
|
||||
string title = string.IsNullOrEmpty(caption) ? "系统提示确认" : caption;
|
||||
BaseMsgForm msgBox = new BaseMsgForm
|
||||
{
|
||||
Text = title,
|
||||
lblMsg = { Text = msg },
|
||||
TitleText = title,
|
||||
picTip = { Image = global::LittleRabbit.Properties.Resources.BaseMsgQue },
|
||||
TopMost = isTopMost
|
||||
};
|
||||
if (fl.Equals(FormLevel.LARGE))
|
||||
{
|
||||
msgBox.Width = (int)FormLevel.LARGE;
|
||||
}
|
||||
msgBox.ShowDialog();
|
||||
return msgBox;
|
||||
}
|
||||
|
||||
private void PnlConfirm_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void PnlCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
|
||||
public enum FormLevel
|
||||
{
|
||||
SMALL,
|
||||
MEDIUM,
|
||||
LARGE = 500
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user