Example #1
0
        private void exportChartsToFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string ext = DateTime.Now.ToShortTimeString() + ".csv";

            ChartMethods.SaveChartCSV(wordsChart, "wordsChart" + ext);
            ChartMethods.SaveChartCSV(phrasesChart, "phrasesChart" + ext);
        }
Example #2
0
        private void ChartMouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right)
            {
                return;
            }

            var p = ChartMethods.GetPointAtMouse(sender as Chart, e);

            if (p == null)
            {
                return;
            }

            var label = p.AxisLabel;

            if (String.IsNullOrEmpty(label))
            {
                return;
            }

            var ll = ((Chart)sender).PointToScreen(new Point(e.X, e.Y));

            removeChartItemRC.Tag  = sender as Chart;
            removeChartItemRC.Name = label;
            //remove everything up to the first : if it exists
            if (addRemChartRCB.Text.Contains(":"))
            {
                addRemChartRCB.Text = addRemChartRCB.Text.Substring(0, addRemChartRCB.Text.IndexOf(":", System.StringComparison.Ordinal));
                addReqChartRCB.Text = addReqChartRCB.Text.Substring(0, addReqChartRCB.Text.IndexOf(":", System.StringComparison.Ordinal));
            }
            addRemChartRCB.Text += ":" + label;
            addReqChartRCB.Text += ":" + label;
            removeChartItemRC.Show(ll);
        }
Example #3
0
        public static void Refresh(List <String> excludedWords, List <string> requiredWords, Chart wordsChart, Chart phrasesChart, bool min3wordphrases, bool phrasecull)
        {
            int c     = ChartMethods.itemMax;
            var words = M.GetTopWords(c, excludedWords, requiredWords);

            ChartMethods.SetChart(words, wordsChart);

            var phrases = M.GetTopPhrases(c, excludedWords, requiredWords, min3wordphrases, phrasecull);

            ChartMethods.SetChart(phrases, phrasesChart);
        }
Example #4
0
 private void phrasesChart_MouseMove(object sender, MouseEventArgs e)
 {
     ChartMethods.HashMouseOver(phrasesChart, e, this);
 }