31 lines
611 B
C#
31 lines
611 B
C#
namespace YLErp.Forms
|
|
{
|
|
public partial class FormDataImport : Form, IDataImport
|
|
{
|
|
public FormDataImport()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public string Content => richTextBox1.Text;
|
|
|
|
public string[] Lines => richTextBox1.Lines;
|
|
|
|
public ContentType ContentType => radioButton1.Checked ? ContentType.form : ContentType.json;
|
|
}
|
|
|
|
public interface IDataImport
|
|
{
|
|
string Content { get; }
|
|
|
|
string[] Lines { get; }
|
|
|
|
ContentType ContentType { get; }
|
|
}
|
|
|
|
public enum ContentType
|
|
{
|
|
json, form
|
|
}
|
|
}
|