Nanook.QueenBee.ScriptEditor.ScriptEditor_Load C# (CSharp) Method

ScriptEditor_Load() private method

private ScriptEditor_Load ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        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);
            }
        }