VSoft/Source/VSoft_Dll/Skins/FrmMessageBox.cs
如果当时 2e557b5365 ### 2021-02-27更新
------
#### VSoft    V1.0.2102.2701
- *.[新增]全新的UI,更加美观。
2021-02-27 22:49:54 +08:00

59 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace VSoft.Skins
{
public partial class FrmMessageBox : Skins.SKinForm
{
public FrmMessageBox()
{
InitializeComponent();
}
public MessageBoxButtons ResultDg { get; set; } = MessageBoxButtons.OKCancel;
private void btnYes_Click(object sender, EventArgs e)
{
if (this.Modal)
{
switch (ResultDg)
{
case MessageBoxButtons.YesNo:
this.DialogResult = DialogResult.Yes;
break;
default:
this.DialogResult = DialogResult.OK;
break;
}
}
else
{
Close();
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
switch (ResultDg)
{
case MessageBoxButtons.YesNo:
this.DialogResult = DialogResult.No;
break;
default:
this.DialogResult = DialogResult.Cancel;
break;
}
}
private void LblMsg_TextChanged(object sender, EventArgs e)
{
lblMsg.UpdateInfo();
lblMsg.Refresh();
}
}
}