Files
KJD/TEMUKJD/ToolForms/Old/TextForm.cs
T

55 lines
1.3 KiB
C#

using AllBase;
using TemuKJD.BaseForms;
using NaiBa.Util.Extension;
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 TemuKJD.KJDForms.ToolForms
{
public partial class TextForm : LRBaseForm
{
public string Info { get; set; }
public delegate void OnSaveComplete(string msg);
public event OnSaveComplete onSaveComplete;
public TextForm()
{
Info = string.Empty;
InitializeComponent();
}
public TextForm(string info)
{
Info = info;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
onSaveComplete(this.txtInfo.Text.Trim());
this.Close();
}
private void TextForm_Load(object sender, EventArgs e)
{
if (BaseClass.Ico != null)
Icon = BaseClass.Ico;
this.txtInfo.Text = Info.ParseToString().Trim();
}
private void txtInfo_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.A)
{
((TextBox)sender).SelectAll();
}
}
}
}