public oTabManager(TabControl tabController, ToolStrip toolStrip, oVisMain visMain, oVisPlayBar visPlayBar, Panel panelMain) { this.tabController = tabController; this.toolStrip = toolStrip; this.visMain = visMain; this.visPlayBar = visPlayBar; this.panelMain = panelMain; tabs = new List <oTab>(0); activeTab = tabController.SelectedIndex; // Create the toolstrip mainToolStrip = new ToolStrip(); panelMain.Controls.Add(this.mainToolStrip); // Let's create callbacks from the tab controller. tabController.SelectedIndexChanged += tabController_SelectedIndexChanged; }
public formFilter(oFunctionList functionList, oTabManager tabManager, oTabFunctionList tab, FILTER_TYPE filterType, oVisPlayBar playBar) { InitializeComponent(); this.tabManager = tabManager; this.tab = tab; this.functionGrid.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.functionGrid_CellValueNeeded); this.functionList = functionList; this.functionListOutput = functionList.Clone(); updatePredictedOutput(); timerRefreshOutput.Enabled = false; this.playBar = playBar; // Make changes to the interface as determined by the filterType this.filterType = filterType; switch (filterType) { case FILTER_TYPE.FUNCTION_LIST_FILTERED: // Do nothing special break; case FILTER_TYPE.FUNCTION_LIST_FULL: // We cannot replace this list this.buttonApplyReplace.Visible = false; break; case FILTER_TYPE.GENERAL: // We do not want to change any tabs, just provide functionListOutput as the result buttonApplyReplace.Visible = false; buttonApplyNew.Text = "Apply"; // We cannot clip data to selection this.radioTimeRangeClip.Enabled = false; break; } }
public oTabFunctionList(oTabManager parent, ToolStrip toolStrip, Panel panelMain, ToolStrip mainToolStrip, string tabTitle, oFunctionList functionList, oVisMain visMain, oVisPlayBar visPlayBar) : base(parent, toolStrip, panelMain, mainToolStrip, tabTitle) { // Initialize the controls we need InitializeComponents(); // Set the data source for the control functionListControl.FunctionList = functionList; // Set the function list parent tab if (functionList != null) { functionList.parentControl = functionListControl; } }
/// <summary> /// Returns the row and column text for a listgridview of functions. /// </summary> /// <param name="row">Cell row</param> /// <param name="column">Cell column</param> /// <returns></returns> public string getFunctionListCell(int row, int column, oVisPlayBar playBar) { // Get this row and column if (row < functions.Count && row >= 0 && functions[row] != null) { switch (column) { case 0: // Get the address description for this function HEAP_INFO heap = oMemoryFunctions.LookupAddressInMap(oProcess.map, functions[row].address); string name; // Generate the string representation of this address if (heap.associatedModule != null) { name = heap.associatedModule.ModuleName + " + 0x" + (functions[row].address - (uint)heap.associatedModule.BaseAddress).ToString("X"); } else { name = "0x" + functions[row].address.ToString("X"); } // Add the known name on a second line if (functions[row].name != "") { name = functions[row].name + " - " + name; } if (functions[row].disabled) { name = "DISABLED " + name; } return(name); case 1: // Address return(functions[row].address.ToString("X")); case 2: // Call count if (dataVis != null) { // Lets count the number of calls int tmpCount = dataVis.getCallCount(functions[row].address); // If we are near the maximum number of calls, lets add a + sign. This is because this function // stopped recorded further calls for performance reasons. (eg. a function being called millions // of times a second uses up a lot of diskspace to record!) string totalCount = tmpCount < Properties.Settings.Default.MaxRecordedCalls ? tmpCount.ToString() : tmpCount.ToString() + @"+"; // Get the selected region call count string selectedRegionCount; if (playBar != null) { selectedRegionCount = playBar.countCallSelected(functions[row].address).ToString(); } else { selectedRegionCount = ""; } // Return the two results return(String.Concat(totalCount, "/", selectedRegionCount)); } return("no data"); case 3: // Number of arguments and calling convention return(String.Concat(functions[row].getNumParams().ToString(), " args")); default: return("?"); } } return("?"); }