void JumpToInner(uint addr, uint event_current_addr = U.NOT_FOUND, EventHandler addressListExpandsEvent = null) { int existingTabIndex; string name = ConvertName(addr, out existingTabIndex); if (existingTabIndex >= 0) {//既存タブがある this.MainTab.SelectedIndex = existingTabIndex; return; } ProcsScriptInnerControl f = new ProcsScriptInnerControl(); InputFormRef.InitControl(f, this.ToolTip); f.Init(this.ToolTip, this.ProcsScriptForm_KeyDown); f.JumpTo(addr, event_current_addr); if (addressListExpandsEvent != null) { f.AddressListExpandsEvent += addressListExpandsEvent; } this.MainTab.Add(name, f, addr); f.Navigation += OnNavigation; f.AddressListExpandsEvent += OnAddressListExpandsEvent; //ProcsScriptForm_Resize(null, null); f.SetFocus(); }
void JumpToInnerCurrentTab(uint addr) { int existingTabIndex; string name = ConvertName(addr, out existingTabIndex); if (existingTabIndex >= 0) {//既存タブがある this.MainTab.SelectedIndex = existingTabIndex; return; } if (this.MainTab.SelectedIndex < 0) {//一つもタブがない場合、新規に開くしかない. JumpToInner(addr); return; } Control c = this.MainTab.GetTabControl(this.MainTab.SelectedIndex); if (!(c is ProcsScriptInnerControl)) { JumpToInner(addr); return; } ProcsScriptInnerControl f = (ProcsScriptInnerControl)c; f.JumpTo(addr); //タブの名前を更新. MainTab.UpdateTab(this.MainTab.SelectedIndex, name, addr); }