年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.9 KiB

using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KGIS.Plugin.LayerProperty.View
{
public partial class FormInputBox : XtraForm
{
private string inputMessage;
private string m_DefaultResponse = string.Empty;
public string InputMessage
{
get
{
return this.inputMessage;
}
set
{
this.inputMessage = value;
}
}
public FormInputBox()
{
InitializeComponent();
}
public void InputBox(string Prompt, string Title, string DefaultResponse)
{
if (Title == null || Title == string.Empty)
{
this.Text = Application.ProductName;
}
else
{
this.Text = Title;
}
this.lblTitle.Text = Prompt;
this.txtInputBox.Text = DefaultResponse;
this.m_DefaultResponse = DefaultResponse;
}
public void InputBox(string Prompt, string Title)
{
this.InputBox(Prompt, Title, "");
}
public void InputBox(string Prompt)
{
this.InputBox(Prompt, "", "");
}
private void btnOk_Click(object sender, System.EventArgs e)
{
base.DialogResult = DialogResult.OK;
this.inputMessage = this.txtInputBox.Text;
base.Close();
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
this.inputMessage = this.m_DefaultResponse;
base.DialogResult = DialogResult.Cancel;
base.Close();
}
}
}