private void Instance_DisplayHexaNumbersChanged() { if (threadsGrid.RowCount != 0) { for (int i = 0; i < threadsGrid.RowCount; i++) { GridEXCell idCell = threadsGrid.GetRow(i).Cells[0]; idCell.Value = NuGenHelperFunctions.FormatNumber(NuGenHelperFunctions.TaggedObjects[(int)idCell.Value]); } } }
public string GetFormattedDefaultValue() { string result = null; if (IsReformattableDefaultValue()) { result = NuGenHelperFunctions.FormatNumber(DefaultValueNumber); } else { result = DefaultValueAsString; } return(result); }
private void AssignNumberValueToCell <T>(GridEXCell cell, T tag) { NuGenHelperFunctions.TaggedObjects.Add(cell.Value.ToString(), tag); cell.Value = NuGenHelperFunctions.FormatNumber(tag); }
private void FormatNumberInCell(GridEXCell cell) { cell.Value = NuGenHelperFunctions.FormatNumber(NuGenHelperFunctions.TaggedObjects[cell.Value.ToString()]); }
private void ShowThreads() { threadsGrid.BeginGridUpdate(); threadsGrid.ClearItems(); List <ThreadWrapper> threads = NuGenDebugEventHandler.Instance.EventObjects.Controller.EnumerateThreads(); foreach (ThreadWrapper thread in threads) { EvaluatedThreadName = "<no name>"; ValueWrapper threadObject = null; ValueWrapper dereferencedObject = null; if (!HasSearchedForNameMethod) { threadObject = thread.GetObject(); if (threadObject != null && !threadObject.IsNull()) { dereferencedObject = threadObject.DereferenceValue(); if (dereferencedObject != null) { ClassWrapper threadClass = dereferencedObject.GetClassInformation(); uint threadTypeToken = threadClass.GetToken(); ModuleWrapper module = threadClass.GetModule(); FindGetThreadNameMethod(threadTypeToken, module); } } } if (HasSearchedForNameMethod) { if (GetThreadNameMethod == null) { EvaluatedThreadName = "<definition of the Thread class is not loaded>"; } else { if (threadObject == null) { threadObject = thread.GetObject(); if (threadObject != null && !threadObject.IsNull()) { dereferencedObject = threadObject.DereferenceValue(); } } if (dereferencedObject != null) { FrameWrapper threadActiveFrame = thread.GetActiveFrame(); if (threadActiveFrame != null) { NuGenFrameRefresher threadActiveFrameRefresher = new NuGenFrameRefresher(thread, threadActiveFrame.ChainIndex, threadActiveFrame.FrameIndex, threadActiveFrame.IsActiveFrame); GetThreadName(thread, threadObject, threadActiveFrameRefresher); } } } } GridEXRow row = threadsGrid.AddItem(); uint threadID = thread.GetID(); GridEXCell idCell = row.Cells[0]; NuGenHelperFunctions.TaggedObjects.Add((int)idCell.Value, threadID); idCell.Value = NuGenHelperFunctions.FormatNumber(threadID); row.Cells[1].Value = EvaluatedThreadName; AppDomainWrapper appDomain = thread.GetAppDomain(); if (appDomain != null) { row.Cells[2].Value = appDomain.GetName(); } NuGenHelperFunctions.TaggedObjects.Add((String)row.Cells[1].Value + (String)row.Cells[2].Value, thread); } threadsGrid.EndGridUpdate(); }