/******************************
* 说明:弹出确认框
* 创建人:龚宇超
* 创建日期:2017-10-31
* 修改人:
* 修改日期:
* 修改备注:
* 版本:1.0.0.0
******************************/
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;
using Lskj.Data;
using Lskj.Business.Impl;
namespace Lskj.Control
{
///
/// 弹出确认框
///
public partial class FrmPrompt : BaseForm
{
///
/// 提示信息
///
public string PromptMsg = string.Empty;
public FrmPrompt()
: this("")
{
}
public FrmPrompt(string hint)
{
InitializeComponent();
Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(this);
this.labelHint.Text = hint;
}
///
/// 说明:确认
/// 创建人:龚宇超
/// 创建日期:2017-10-31
/// 修改人:
/// 修改日期:
/// 修改备注:
/// 版本:1.0
///
/// The source of the event.
/// The instance containing the event data.
private void btnOk_Click(object sender, EventArgs e)
{
try
{
this.PromptMsg = memInput.Text.Trim();
if (string.IsNullOrWhiteSpace(this.PromptMsg))
{
MessageUtil.Show(ResourceKeys.ContentNotNull);
}
else
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
}
}
///
/// 说明:清除
/// 创建人:龚宇超
/// 创建日期:2017-10-31
/// 修改人:
/// 修改日期:
/// 修改备注:
/// 版本:1.0
///
/// The source of the event.
/// The instance containing the event data.
private void btnCancel_Click(object sender, EventArgs e)
{
try
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
}
}
}
}