From 30f43291e99c0b8a73a04a0a08aaa5fdcbc0406d Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Fri, 10 Jun 2022 12:34:34 +0200 Subject: [PATCH] Update addMeta --- .../Skins-And-Textures/addMeta.Designer.cs | 2 -- .../Forms/Skins-And-Textures/addMeta.cs | 18 ++++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.Designer.cs b/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.Designer.cs index 7d58941f..3f2d199f 100644 --- a/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.Designer.cs +++ b/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.Designer.cs @@ -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"; diff --git a/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.cs b/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.cs index edb48930..894123e1 100644 --- a/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.cs +++ b/MinecraftUSkinEditor/Forms/Skins-And-Textures/addMeta.cs @@ -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(textBox1.Text, textBox2.Text )); DialogResult = DialogResult.OK; Close(); } } -} +} \ No newline at end of file