private void iPG_SourceData_Log_CloseFromNext(SymWizardPageTransitionEvent aEventArgs) { string logFileName = iPG_SourceData_Log_FB.EntityName; if (!iPG_SourceData_Log_FB.IsValid) { aEventArgs.SuggestedNewPage = iPG_SourceData_Log; } else { iSettings.Save("Wizard", iPG_SourceData_Log_FB); // iEngine.HeapDataOptions = new Options(); // DataSourceAnalyser analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse(logFileName); SeedAnalysisFiltersAfterDataSourceScan(analyser.DataSources, iPG302_Combo_Filter); // Only allowed to continue if we found a valid source if (iPG302_Combo_Filter.Items.Count > 0) { aEventArgs.SuggestedNewPage = iPG_Cmn_Symbolics; } else { aEventArgs.SuggestedNewPage = aEventArgs.CurrentPage; } } }
private void iPG_OutputToDirectory_CloseFromNext(SymWizardPageTransitionEvent aEventArgs) { if (!iPG_OutputToDirectory_FB.IsValid) { aEventArgs.SuggestedNewPage = iPG_OutputToDirectory; } else { string dir = iPG_OutputToDirectory_FB.EntityName; iEngine.ComparisonEngineCSV.OutputDirectory = dir; iSettings.Save("Wizard", iPG_OutputToDirectory_FB); aEventArgs.SuggestedNewPage = iPG_Final; } }
private void iPG_SourceData_CompareCSV_PageClosedFromButtonNext(SymWizardPageTransitionEvent aEventArgs) { // Check we have at least one valid file. if (iPG_SourceData_CompareCSV_Files.FileNames.Count == 0) { aEventArgs.SuggestedNewPage = iPG_SourceData_CompareCSV; } else { iSettings.Save("PG_SourceData_CompareCSV_Files", iPG_SourceData_CompareCSV_Files); iEngine.ComparisonEngineCSV.SourceFileNames = iPG_SourceData_CompareCSV_Files.FileNames; aEventArgs.SuggestedNewPage = iPG_OutputToDirectory; } }
private void iPG302_Cmn_Filters_CloseFromNext(SymWizardPageTransitionEvent aEventArgs) { if (SetDataSourceFromFirstAvailableThread()) { // Clear any error iErrorProvider.SetError(iPG302_Combo_Filter, string.Empty); // Decide where to go next... aEventArgs.SuggestedNewPage = iPG_Final; } else { iErrorProvider.SetError(iPG302_Combo_Filter, "No thread's were detected. Is the log corrupt?"); aEventArgs.SuggestedNewPage = iPG_Cmn_Filters; } }
private void iPG500_Comparison_Output_CloseFromNext(SymWizardPageTransitionEvent aEventArgs) { if (iPG_OutputToFile_FB.IsValid) { iSettings.Save("Wizard", iPG_OutputToFile_FB); // if (iEngine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps) { iEngine.ComparisonEngineData.OutputFileName = iPG_OutputToFile_FB.EntityName; } // aEventArgs.SuggestedNewPage = iPG_Final; } else { aEventArgs.SuggestedNewPage = iPG_OutputToFile; } }
private void iPG202_SourceData_Comparison_CloseFromNext(SymWizardPageTransitionEvent aEventArgs) { iEngine.ComparisonEngineData.DataSource1 = DataSourceFromFilterCombo(iPG202_Combo_ThreadName1); iEngine.ComparisonEngineData.DataSource2 = DataSourceFromFilterCombo(iPG202_Combo_ThreadName2); // if (!(iPG202_TB_LogFile1.IsValid && iPG202_TB_LogFile2.IsValid)) { aEventArgs.SuggestedNewPage = iPG_SourceData_CompareHeapData; } else if (iEngine.ComparisonEngineData.DataSource1 == null) { iPG202_TB_LogFile1.SetError("Select a valid MemSpy heap data log"); aEventArgs.SuggestedNewPage = iPG_SourceData_CompareHeapData; } else if (iEngine.ComparisonEngineData.DataSource2 == null) { iPG202_TB_LogFile2.SetError("Select a valid MemSpy heap data log"); aEventArgs.SuggestedNewPage = iPG_SourceData_CompareHeapData; } else { // Get both data sources and check thread names are common DataSource ds1 = (DataSource )iPG202_Combo_ThreadName1.SelectedItem; DataSource ds2 = (DataSource)iPG202_Combo_ThreadName2.SelectedItem; // if (ds1.ThreadName.ToLower() != ds2.ThreadName.ToLower()) { aEventArgs.SuggestedNewPage = iPG_SourceData_CompareHeapData; iErrorProvider.SetError(iPG202_Combo_ThreadName2, "Thread names differ"); } else { iSettings.Save("Wizard", iPG202_TB_LogFile1); iSettings.Save("Wizard", iPG202_TB_LogFile2); iErrorProvider.Clear(); aEventArgs.SuggestedNewPage = iPG_Cmn_Symbolics; } } }
private void iPG1_OpType_CloseFromNext(SymWizardPageTransitionEvent aEventArgs) { if (iPG1_RB_OpType_HeapViewer.Checked) { iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeAnalyseAndView; aEventArgs.SuggestedNewPage = iPG_SourceData_Log; } else if (iPG1_RB_OpType_CompareHeapDump.Checked) { iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps; aEventArgs.SuggestedNewPage = iPG_SourceData_CompareHeapData; } else if (iPG1_RB_OpType_CompareCSV.Checked) { iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeCompareHeapCSV; aEventArgs.SuggestedNewPage = iPG_SourceData_CompareCSV; } Setup_Output_File_Dynamic(); Setup_Output_Directory_Dynamic(); iSettings["Wizard", "OperationType"] = iEngine.OperationType.ToString(); }
private void iPG301_AnalysisSymbolics_CloseFromNext(SymWizardPageTransitionEvent aEventArgs) { string errorText = string.Empty; if (iPG301_DebugControl.IsReadyToPrime(out errorText)) { iPG301_DebugControl.Prime(); if (iEngine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps) { aEventArgs.SuggestedNewPage = iPG_OutputToFile; } else { // If there is only one thread available, then there's no point // asking the user to pick it... int number = 0; bool okayToProceed = SetDataSourceFromFirstAvailableThread(out number); if (okayToProceed && number == 1) { aEventArgs.SuggestedNewPage = iPG_Final; } else { aEventArgs.SuggestedNewPage = iPG_Cmn_Filters; } } // Also save debug engine configuration iPG301_DebugControl.XmlSettingsSave(); } else { MessageBox.Show(errorText, "Error"); aEventArgs.SuggestedNewPage = iPG_Cmn_Symbolics; } }