mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-24 13:14:32 +00:00
Update addMeta
This commit is contained in:
@@ -72,13 +72,11 @@
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox2);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "addMeta";
|
||||
|
||||
@@ -13,20 +13,26 @@ namespace PckStudio
|
||||
{
|
||||
public partial class addMeta : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
PCKFile.FileData file;
|
||||
|
||||
public addMeta(PCKFile.FileData fileIn)
|
||||
public string PropertyName => textBox1.Text;
|
||||
public string PropertyValue => textBox2.Text;
|
||||
|
||||
public addMeta(string name, string value)
|
||||
{
|
||||
InitializeComponent();
|
||||
textBox1.Text = name;
|
||||
textBox2.Text = value;
|
||||
}
|
||||
|
||||
public addMeta()
|
||||
{
|
||||
InitializeComponent();
|
||||
file = fileIn;
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
file.properties.Add(new ValueTuple<string, string>(textBox1.Text, textBox2.Text ));
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user