ab56a9bcf7
SVN-Revision: r240
107 lines
3.0 KiB
C#
107 lines
3.0 KiB
C#
/******************************
|
|
* 说明:弹出确认框
|
|
* 创建人:龚宇超
|
|
* 创建日期: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
|
|
{
|
|
/// <summary>
|
|
/// 弹出确认框
|
|
/// </summary>
|
|
public partial class FrmPrompt : BaseForm
|
|
{
|
|
/// <summary>
|
|
/// 提示信息
|
|
/// </summary>
|
|
public string PromptMsg = string.Empty;
|
|
|
|
public FrmPrompt()
|
|
: this("")
|
|
{
|
|
|
|
}
|
|
|
|
public FrmPrompt(string hint)
|
|
{
|
|
InitializeComponent();
|
|
Lskj.Control.Model.AutoSizeChange.ControllInitializeSize(this);
|
|
this.labelHint.Text = hint;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>说明:确认</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2017-10-31 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <param name="sender">The source of the event.</param>
|
|
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
|
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);
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
/// <para>说明:清除</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2017-10-31 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <param name="sender">The source of the event.</param>
|
|
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
|
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);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|