using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PunchAndWeld
{
public class BusinessHelper
{
///
/// 补打标签后
///
///
public static void SetRePrint(TextBox tb)
{
DialogResult result = MessageBox.Show("是否补打标签?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
if (result == DialogResult.OK)
{
FrmPassWord pass = new FrmPassWord();
pass.OkBtnClick += (arg1) =>
{
if (!string.IsNullOrEmpty(arg1) &&
arg1.ToLower() == ConfigurationManager.AppSettings["password"].ToLower())
{
pass.Close();
tb.Text = "";
tb.Visible = true;
tb.Focus();
}
else
{
MessageBox.Show("密码错误,请重新输入!", "提示", MessageBoxButtons.OK);
return;
}
};
pass.ShowDialog();
tb.Focus();
}
else
{
return;
}
}
}
}