freeso/TSOClient/FSO.IDE/ResourceBrowser/GenericTextInput.cs
riperiperi b57ebbd141 Cleanup: Remove most unused usings and MPL per-file licenses
MPL per-file was used in older project files, but should apply to the whole project, so having it there was redundant.
2023-11-25 03:45:29 +00:00

39 lines
968 B
C#

using System;
using System.Windows.Forms;
namespace FSO.IDE.ResourceBrowser
{
public partial class GenericTextInput : Form
{
public string StringResult;
public GenericTextInput()
{
InitializeComponent();
}
public GenericTextInput(string description, string origValue) : this()
{
DescLabel.Text = description;
TextInput.Text = origValue;
}
private void OKButton_Click(object sender, EventArgs e)
{
if (TextInput.Text == "")
{
MessageBox.Show("Please enter a valid name.");
}
else
{
StringResult = TextInput.Text;
DialogResult = DialogResult.OK;
Close();
}
}
private void CancelButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}