mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-21 11:39:35 +08:00
Update ShowMessage #2
This commit is contained in:
parent
8ab7110d8a
commit
2da0407fa9
@ -43,7 +43,7 @@ namespace FunGame.Desktop.Models.Component
|
|||||||
* objs:
|
* objs:
|
||||||
* 0 = title
|
* 0 = title
|
||||||
* 1 = msg
|
* 1 = msg
|
||||||
* 2 = autoclose(msecond)
|
* 2 = autoclose(second)
|
||||||
* 3 = button type
|
* 3 = button type
|
||||||
* 4 = mid text
|
* 4 = mid text
|
||||||
* 5 = left text
|
* 5 = left text
|
||||||
@ -53,6 +53,7 @@ namespace FunGame.Desktop.Models.Component
|
|||||||
if (length > 0 && objs[0] != null)
|
if (length > 0 && objs[0] != null)
|
||||||
{
|
{
|
||||||
Title.Text = (string)objs[0];
|
Title.Text = (string)objs[0];
|
||||||
|
Text = Title.Text;
|
||||||
}
|
}
|
||||||
if (length > 1 && objs[1] != null)
|
if (length > 1 && objs[1] != null)
|
||||||
{
|
{
|
||||||
@ -105,19 +106,17 @@ namespace FunGame.Desktop.Models.Component
|
|||||||
MessageResult = MessageResult.Cancel;
|
MessageResult = MessageResult.Cancel;
|
||||||
Dispose();
|
Dispose();
|
||||||
}
|
}
|
||||||
if (Title.Text == "Message") Text = MsgText.Text; // 窗体默认标题
|
|
||||||
if (AutoClose > 0)
|
if (AutoClose > 0)
|
||||||
{
|
{
|
||||||
Action action = new(() =>
|
Action action = new(() =>
|
||||||
{
|
{
|
||||||
string msg = MsgText.Text;
|
string msg = MsgText.Text;
|
||||||
MsgText.Text = msg + "\n[ " + AutoClose/1000 + " 秒后自动关闭 ]";
|
MsgText.Text = msg + "\n[ " + AutoClose + " 秒后自动关闭 ]";
|
||||||
while (AutoClose > 0)
|
while (AutoClose > 0)
|
||||||
{
|
{
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
AutoClose -= 1000;
|
AutoClose--;
|
||||||
MsgText.Text = msg + "\n[ " + AutoClose / 1000 + " 秒后自动关闭 ]";
|
MsgText.Text = msg + "\n[ " + AutoClose + " 秒后自动关闭 ]";
|
||||||
BringToFront();
|
|
||||||
}
|
}
|
||||||
MessageResult = MessageResult.OK;
|
MessageResult = MessageResult.OK;
|
||||||
Dispose();
|
Dispose();
|
||||||
|
2
FunGame.Desktop/UI/Main/Main.Designer.cs
generated
2
FunGame.Desktop/UI/Main/Main.Designer.cs
generated
@ -158,7 +158,7 @@ namespace FunGame.Desktop.UI
|
|||||||
this.SendTalkText.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Teal;
|
this.SendTalkText.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Teal;
|
||||||
this.SendTalkText.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
this.SendTalkText.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||||
this.SendTalkText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.SendTalkText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.SendTalkText.Font = new System.Drawing.Font("阿丽达黑体", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
this.SendTalkText.Font = new System.Drawing.Font("LanaPixel", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||||
this.SendTalkText.Location = new System.Drawing.Point(608, 421);
|
this.SendTalkText.Location = new System.Drawing.Point(608, 421);
|
||||||
this.SendTalkText.Name = "SendTalkText";
|
this.SendTalkText.Name = "SendTalkText";
|
||||||
this.SendTalkText.Size = new System.Drawing.Size(51, 27);
|
this.SendTalkText.Size = new System.Drawing.Size(51, 27);
|
||||||
|
@ -627,7 +627,7 @@ namespace FunGame.Desktop.UI
|
|||||||
SetServerStatusLight((int)LightType.Green);
|
SetServerStatusLight((int)LightType.Green);
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{ // DEBUG
|
{ // DEBUG
|
||||||
ShowMessage.TipMessage("欢迎回来, " + Usercfg.LoginUserName + "!", "登录成功", 5000);
|
ShowMessage.TipMessage("欢迎回来, " + Usercfg.LoginUserName + "!", "登录成功", 5);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user