protected void GraphixPlots_MouseClick(object sender, MouseEventArgs e) { int strip = (drawAreaY + drawAreaHight - e.Y) / (stripHeight + 1); if (strip < data.Count && strip >= 0) { if (cbAutoClose.Checked && Hist != null) { Hist.Close(); } List <int> data_ = data[strip]; if (cbSort.Checked) { data_ = new List <int>(data[strip]); data_.Sort((a, b) => b.CompareTo(a)); } Hist = new PlotResults(labels[strip], data_); Hist.Location = new Point((this.Width - Hist.Width) / 2, (this.Height - Hist.Height) / 2); Hist.Show(); } Console.WriteLine("Strip: " + strip + " eY: " + e.Y); }
private void GraphixPlotVertical_MouseDown(object sender, MouseEventArgs e) { int strip = (int)((e.X - drawAreaX) / (stripHeight + stripSpacing)); if (strip < data.Count && strip >= 0) { if (cbAutoClose.Checked && Hist != null) { Hist.Close(); } List <int> data_ = data[strip]; if (cbSort.Checked) { data_ = new List <int>(data[strip]); data_.Sort((a, b) => b.CompareTo(a)); } Hist = new PlotResults(Text + " " + labels[strip], data_); Hist.Location = new Point((this.Width - Hist.Width) / 2, (this.Height - Hist.Height) / 2); Hist.Show(); } Console.WriteLine("Strip: " + strip + " eX: " + e.X); }