BoxEditor - Change Result type from string to SkinBOX

This commit is contained in:
miku-666
2024-01-19 18:14:24 +01:00
parent 22ba07709b
commit 11f4e4c36b

View File

@@ -7,9 +7,10 @@ namespace PckStudio.Forms.Editor
{
public partial class BoxEditor : MetroFramework.Forms.MetroForm
{
public string Result;
private SkinBOX result;
public SkinBOX Result => result;
public BoxEditor(string box, bool hasInflation)
public BoxEditor(string box, bool hasInflation)
: this(SkinBOX.FromString(box), hasInflation)
{
}
@@ -43,14 +44,14 @@ namespace PckStudio.Forms.Editor
private void saveButton_Click(object sender, EventArgs e)
{
Result =
result = SkinBOX.FromString(
$"{parentComboBox.SelectedItem} " +
$"{PosXUpDown.Value} {PosYUpDown.Value} {PosZUpDown.Value} " +
$"{SizeXUpDown.Value} {SizeYUpDown.Value} {SizeZUpDown.Value} " +
$"{uvXUpDown.Value} {uvYUpDown.Value} " +
$"{Convert.ToInt32(armorCheckBox.Checked)} " +
$"{Convert.ToInt32(mirrorCheckBox.Checked)} " +
$"{inflationUpDown.Value}";
$"{inflationUpDown.Value}");
DialogResult = DialogResult.OK;
}