private void ScriptEditor_Load(object sender, EventArgs e)
{
if (this.DesignMode)
return;
try
{
_qbItem = (base.QbItem as QbItemScript);
if (_qbItem == null)
throw new Exception("Error");
eiItemQbKey.SetData(new GenericQbItem("Item QB Key", _qbItem.ItemQbKey, typeof(string), false, false, QbItemType.SectionScript, "ItemQbKey"));
eiUnknown.SetData(new GenericQbItem("Unknown", _qbItem.Unknown, typeof(byte[]), false, false, QbItemType.SectionScript, "Unknown"));
int w = (eiItemQbKey.LabelWidth > eiUnknown.LabelWidth ? eiItemQbKey.LabelWidth : eiUnknown.LabelWidth) + 6;
eiItemQbKey.TextBoxLeft = w;
eiUnknown.TextBoxLeft = w;
txtScript.Text = bytesToHexAsciiString(_qbItem.ScriptData);
_preventUpdate = false;
loadStringList();
}
catch (Exception ex)
{
base.ShowException("Script Load Item Error", ex);
}
}