public void GoToDestination(GoToDestination dest) { bool bringToFront = true; if (dest.RelativeAddress?.Type == _manager.CpuType.ToMemoryType()) { ScrollToAddress((uint)dest.RelativeAddress.Value.Address); } else if (dest.RelativeAddress != null) { DebugWindowManager.OpenDebugger(dest.RelativeAddress.Value.Type.ToCpuType())?.GoToAddress(dest.RelativeAddress.Value.Address); bringToFront = false; } else if (dest.SourceLocation != null) { ScrollToSourceLocation(dest.SourceLocation); } else if (dest.File != null) { SelectFile(dest.File); } if (bringToFront) { Form parent = this.ParentForm; if (parent.WindowState == FormWindowState.Minimized) { //Unminimize window if it was minimized parent.WindowState = FormWindowState.Normal; } parent.BringToFront(); } }
private void Spawn(int enemyIndex) { GameObject newEnemy = Instantiate(spawnableEnemies[enemyIndex].enemyPrefab, GetSpawnPosition(), Quaternion.identity, transform); GoToDestination goToDestination = newEnemy.GetComponent <GoToDestination>(); goToDestination.SetDestination(GetDestination()); }
private void lstSearchResult_DoubleClick(object sender, EventArgs e) { if (lstSearchResult.SelectedItems.Count > 0) { GoToDestination dest = lstSearchResult.SelectedItems[0].Tag as GoToDestination; Viewer.CodeViewerActions.GoToDestination(dest); } }
private void mnuEditCodeComment_Click(object sender, EventArgs e) { int startAddress, endAddress; string rangeString; GetSelectedAddressRange(out startAddress, out endAddress, out rangeString); if (startAddress >= 0) { AddressTypeInfo info = new AddressTypeInfo(); info.Address = startAddress; info.Type = AddressType.PrgRom; if (info.Address >= 0) { ctrlLabelList.EditComment((UInt32)info.Address, info.Type); GoToDestination destination = new GoToDestination(); destination.AddressInfo = info; GoToDestination(destination); } } }
public void GoToDestination(GoToDestination dest) { this.OnGoToDestination?.Invoke(Viewer, dest); }