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 DPumpHydr.WinFrmUI.WenSkin.Controls;
|
using DPumpHydr.WinFrmUI.WenSkin.Forms;
|
|
namespace DPumpHydr.WinFrmUI.WenSkin
|
{
|
public partial class PopupInputBoxForm : WenForm
|
{
|
public PopupInputBoxForm(string text,bool readOnly)
|
{
|
InitializeComponent();
|
this.Message = text;
|
this.ReadOnly = readOnly;
|
|
this.StartPosition = FormStartPosition.CenterScreen;
|
Size = new Size(500, 350);
|
Text = "文本输入框";
|
|
WenTextBox textBox = new WenTextBox()
|
{
|
Text = Message,
|
Dock = DockStyle.Fill,
|
Multiline = true,
|
ScrollBars = ScrollBars.Both,
|
WordWrap = false,
|
ReadOnly = this.ReadOnly,
|
};
|
textBox.TextChanged += (s, e) =>
|
{
|
Message = textBox.Text;
|
};
|
|
WenButton button = new WenButton()
|
{
|
Text = "确定",
|
Dock = DockStyle.Bottom,
|
};
|
button.Click += (s, ex) =>
|
{
|
this.DialogResult = DialogResult.OK;
|
};
|
|
this.Controls.Add(textBox);
|
this.Controls.Add(button);
|
}
|
|
#region 私有属性
|
|
|
#endregion
|
|
#region 共有属性
|
|
public string Message { get; set; }
|
public bool ReadOnly { get; set; }
|
|
#endregion
|
}
|
}
|