using System;
using System.Drawing;
using System.Windows.Forms;
namespace CompressorXN.Untils
{
public partial class FrmAckDialog : Form
{
///
/// 确认弹框
///
/// 消息内容
/// 弹框标题
public FrmAckDialog(string content, string title = "系统提示")
{
InitializeComponent();
this.TopLevel = true;
lbl_Title.Text = title;
lbl_Content.Text = content;
}
///
/// 点击确定按钮
///
///
///
private void btn_Sure_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
///
/// 点击取消按钮
///
///
///
private void btn_cancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
#region 无边框拖动
private void Panel_MouseDown(object sender, MouseEventArgs e)
{
mPoint = new Point(e.X, e.Y);
}
private void Panel_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
}
}
private Point mPoint;
#endregion
}
}