mirror of
https://github.com/kwsch/NHSE.git
synced 2026-03-22 01:34:51 -05:00
31 lines
745 B
C#
31 lines
745 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using NHSE.Core;
|
|
|
|
namespace NHSE.WinForms;
|
|
|
|
public partial class SingleItemEditor : Form
|
|
{
|
|
public Item Item { get; }
|
|
|
|
public SingleItemEditor(Item item)
|
|
{
|
|
InitializeComponent();
|
|
this.TranslateInterface(GameInfo.CurrentLanguage);
|
|
|
|
// disassociate from original reference
|
|
Item = item.ToBytesClass().ToClass<Item>();
|
|
|
|
ItemEditor.Initialize(GameInfo.Strings.ItemDataSource);
|
|
ItemEditor.LoadItem(Item);
|
|
}
|
|
|
|
private void B_Cancel_Click(object sender, EventArgs e) => Close();
|
|
|
|
private void B_Save_Click(object sender, EventArgs e)
|
|
{
|
|
ItemEditor.SetItem(Item);
|
|
DialogResult = DialogResult.OK;
|
|
Close();
|
|
}
|
|
} |