コード例 #1
0
        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 Analyser_Observer(DataSourceAnalyser.TEvent aEvent, DataSourceAnalyser aSender)
        {
            if (InvokeRequired)
            {
                DataSourceAnalyser.Observer observer = new DataSourceAnalyser.Observer(Analyser_Observer);
                this.BeginInvoke(observer, new object[] { aEvent, aSender });
            }
            else
            {
                switch (aEvent)
                {
                case DataSourceAnalyser.TEvent.EReadingStarted:
                    iProgressBar.Maximum = 100;                           //%
                    iProgressBar.Minimum = 0;                             //%
                    iProgressBar.Value   = 0;
                    break;

                case DataSourceAnalyser.TEvent.EReadingProgress:
                    iProgressBar.Value = iAnalyser.Progress;
                    break;

                case DataSourceAnalyser.TEvent.EReadingComplete:
                    Close();
                    break;
                }
            }
        }
コード例 #3
0
        public void TestOnLogFileRemoved()
        {
            var analyser = new DataSourceAnalyser(_template, _logFile, _engine.Object);
            var id       = DataSourceId.CreateNew();

            new Action(() => analyser.OnLogFileRemoved(id, new Mock <ILogFile>().Object)).ShouldNotThrow();
        }
コード例 #4
0
        private void iPG202_TB_LogFile1_FileSelectionChanged(SymbianUtilsUi.Controls.SymbianFileControl aSelf, string aFileName)
        {
            DataSourceAnalyser analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse(aFileName);

            SeedAnalysisFiltersAfterDataSourceScan(analyser.DataSources, iPG202_Combo_ThreadName1);

            iPG_SourceData_CompareHeapData_GP_Log2.Enabled = (iPG202_Combo_ThreadName1.Items.Count > 0);
        }
 internal HeapReconstructorDataSourceAnalyserDialog(string aFileName)
 {
     InitializeComponent();
     //
     iAnalyser            = new DataSourceAnalyser(aFileName);
     iAnalyser.iObserver += new DataSourceAnalyser.Observer(Analyser_Observer);
     //
     iTimer_OpStart.Start();
 }
コード例 #6
0
        public void TestAnalysisWithoutConfiguration()
        {
            _template.Configuration = null;

            var analyser = new DataSourceAnalyser(_template, _logFile, _engine.Object);

            analyser.Configuration.Should().BeNull("because this analyser doesn't need any configuration");

            _engine.Verify(x => x.CreateAnalysis(It.IsAny <ILogFile>(), It.IsAny <DataSourceAnalysisConfiguration>(), It.IsAny <IDataSourceAnalysisListener>()),
                           Times.Once);
        }
コード例 #7
0
        private DataSource PrepareDataSource(string aFileName)
        {
            DataSourceAnalyser   analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse(aFileName);
            DataSourceCollection sources  = analyser.DataSources;
            DataSource           source   = sources[iInputs.ThreadName];

            if (source == null)
            {
                throw new HAUIException("Thread was not found in source data", HAUIException.KErrCommandLineAnalysisThreadNameInvalid);
            }
            //
            return(source);
        }
コード例 #8
0
        private void iPG202_TB_LogFile2_FileSelectionChanged(SymbianUtilsUi.Controls.SymbianFileControl aSelf, string aFileName)
        {
            DataSourceAnalyser analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse(aFileName);

            // Get the master thread name
            string threadName = ThreadNameFromFilterCombo(iPG202_Combo_ThreadName1);

            if (threadName != string.Empty)
            {
            }
            else
            {
                analyser.DataSources.Clear();
            }

            // Seed combobox with filter options
            SeedAnalysisFiltersAfterDataSourceScan(analyser.DataSources, iPG202_Combo_ThreadName2);
        }
コード例 #9
0
 public ReaderLines(DataSourceAnalyser aParent, string[] aLines)
     : base(aLines)
 {
     iParent = aParent;
 }
コード例 #10
0
        public void TestConstruction()
        {
            var analyser = new DataSourceAnalyser(_template, _logFile, _engine.Object);

            analyser.Configuration.Should().BeSameAs(_template.Configuration);
        }
コード例 #11
0
 public ReaderFile(DataSourceAnalyser aParent, string aFileName)
     : base(aFileName)
 {
     iParent = aParent;
 }