コード例 #1
0
        private void chart1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var pos     = e.Location;
            var results = chart1.HitTest(pos.X, pos.Y, false, ChartElementType.DataPoint);

            foreach (var result in results)
            {
                if (result.ChartElementType == ChartElementType.DataPoint)
                {
                    int         day  = int.Parse(result.Series.Points[result.PointIndex].AxisLabel);
                    DateTime    date = new DateTime(year, month, day);
                    HistoryForm hf   = new HistoryForm();
                    hf.dt = date;
                    hf.ShowDialog();
                }
            }
        }
コード例 #2
0
 private void lịchSửToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     Views.History.HistoryForm hf = new Views.History.HistoryForm();
     hf.dt = DateTime.Now;
     hf.ShowDialog();
 }