Exemple #1
0
        private void buttonLoadNewReport_Click(object sender, EventArgs e)
        {
            //Reset everybody
            resultParser.TheResults.Clear();
            if (termScoreCalculator != null)
            {
                termScoreCalculator.ClearTermScoreAnalysisCache();
            }
            if (termScoreAnalysisListForAllParameters != null)
            {
                termScoreAnalysisListForAllParameters.Clear();
            }


            openFileDialog1.Title  = "Load result file.";
            openFileDialog1.Filter = "Text file (*.txt)|*.txt";

            openFileDialog1.ShowDialog();

            resultParser.ParseTrendQuestACFoldOrIndex(openFileDialog1.FileName);
            resultParser.PrepareTranslatedDictionary(ref gt);

            richTextBoxLog.AppendText("User expression data loaded\n");
            termScoreCalculator = new TermScoreCalculator(ref gt, ref resultParser);
        }
Exemple #2
0
        /// <summary>
        /// This method should alwys be called in a try catch
        /// </summary>
        private void checkIfResultsAreLoaded()
        {
            if (resultParser.TheResults.Count == 0)
            {
                openFileDialog1.Title  = "Load results";
                openFileDialog1.Filter = "PatternLab project file (*.plp)|*.plp|AC/TFold, TrendQuest files (*.txt)|*.txt";

                if (openFileDialog1.ShowDialog() != DialogResult.Cancel)
                {
                    resultParser.ParseTrendQuestACFoldOrIndex(openFileDialog1.FileName);
                    resultParser.PrepareTranslatedDictionary(ref gt);

                    richTextBoxLog.AppendText("User expression data loaded\n");
                    termScoreCalculator = new TermScoreCalculator(ref gt, ref resultParser);
                }
                else
                {
                    throw new InvalidOperationException();
                }
            }
        }