mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-26 05:15:48 +00:00
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
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 PckStudio.Forms.Utilities.Grf
|
|
{
|
|
public partial class AddParameter : MetroFramework.Forms.MetroForm
|
|
{
|
|
public string ParameterName => NameTextBox.Text;
|
|
public string ParameterValue => ValueTextBox.Text;
|
|
public AddParameter()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
public AddParameter(string parameterName, string parameterValue) : this()
|
|
{
|
|
NameTextBox.Text = parameterName;
|
|
ValueTextBox.Text = parameterValue;
|
|
}
|
|
|
|
public AddParameter(string parameterName, string parameterValue, bool parameterNameBoxEnabled = true) : this(parameterName, parameterValue)
|
|
{
|
|
NameTextBox.Enabled = parameterNameBoxEnabled;
|
|
}
|
|
|
|
private void ConfirmButton_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(ParameterName) || string.IsNullOrWhiteSpace(ParameterValue))
|
|
{
|
|
MessageBox.Show("Name and Value need valid values");
|
|
return;
|
|
}
|
|
DialogResult = DialogResult.OK;
|
|
Close();
|
|
}
|
|
}
|
|
}
|