void FireChanegCommandByDirectMode() { ProcsScriptCategorySelectForm form = (ProcsScriptCategorySelectForm)InputFormRef.JumpFormLow <ProcsScriptCategorySelectForm>(); DialogResult dr = form.ShowDialog(); if (dr != System.Windows.Forms.DialogResult.OK) { //直接編集モードだったら、キャンセルされた場合は、コントロールパネルも消す. HideFloatingControlpanel(); return; } EventScript.Script script = form.Script; //選択した命令を代入 byte[] selectedByteData = script.Data; this.ASMTextBox.Text = U.convertByteToStringDump(selectedByteData); this.ScriptCodeName.Text = EventScript.makeCommandComboText(script, false); //イベントを逆アセンブルして確定する. OneLineDisassembler(); //値1を自動選択 if (ParamSrc1.Visible) { ParamSrc1.Focus(); } }
private void AddressList_SelectedIndexChanged(object sender, EventArgs e) { HideFloatingControlpanel(); string code = this.AddressList.Text; ScriptCodeName.Text = code; int pos; string jumpCode = " BL 0x"; pos = code.IndexOf(jumpCode); if (pos < 0) { jumpCode = " B 0x"; pos = code.IndexOf(jumpCode); } if (pos > 0) { pos += jumpCode.Length; ParamSrc1.Value = U.atoh(code.Substring(pos)); ParamLabel1.Show(); ParamSrc1.Show(); ParamExplain1.Show(); } else { ParamSrc1.Value = 0; ParamLabel1.Hide(); ParamSrc1.Hide(); ParamExplain1.Hide(); } }
private void ScriptChangeButton_Click(object sender, EventArgs e) { ProcsScriptCategorySelectForm form = (ProcsScriptCategorySelectForm)InputFormRef.JumpFormLow <ProcsScriptCategorySelectForm>(); DialogResult dr = form.ShowDialog(); if (dr != System.Windows.Forms.DialogResult.OK) { return; } EventScript.Script script = form.Script; //選択した命令を代入 byte[] selectedByteData = script.Data; this.ASMTextBox.Text = U.convertByteToStringDump(selectedByteData); this.ScriptCodeName.Text = EventScript.makeCommandComboText(script, false); //イベントを逆アセンブルして確定する. OneLineDisassembler(); //値1を自動選択 if (ParamSrc1.Visible) { ParamSrc1.Focus(); } }
void UpdateFloatingControlpanel() { string code = this.AddressList.Text; ScriptCodeName.Text = code; int pos; string jumpCode = " BL 0x"; pos = code.IndexOf(jumpCode); if (pos < 0) { jumpCode = " B 0x"; pos = code.IndexOf(jumpCode); } if (pos > 0) { pos += jumpCode.Length; ParamSrc1.Value = U.atoh(code.Substring(pos)); ParamLabel1.Show(); ParamSrc1.Show(); ParamExplain1.Show(); } else { ParamSrc1.Value = 0; ParamLabel1.Hide(); ParamSrc1.Hide(); ParamExplain1.Hide(); } }