You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.6 KiB
C#
60 lines
1.6 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CompressorXN.Untils
|
|
{
|
|
public partial class FrmAckDialog : Form
|
|
{
|
|
/// <summary>
|
|
/// 确认弹框
|
|
/// </summary>
|
|
/// <param name="content">消息内容</param>
|
|
/// <param name="title">弹框标题</param>
|
|
public FrmAckDialog(string content, string title = "系统提示")
|
|
{
|
|
InitializeComponent();
|
|
this.TopLevel = true;
|
|
lbl_Title.Text = title;
|
|
lbl_Content.Text = content;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击确定按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void btn_Sure_Click(object sender, EventArgs e)
|
|
{
|
|
DialogResult = DialogResult.OK;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击取消按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
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
|
|
}
|
|
}
|