Esempio n. 1
0
        private void ZedGraphControl_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            try
            {
                CurveItem n_curve;
                int       index;
                ZedGraphControl.GraphPane.FindNearestPoint(e.Location, out n_curve, out index);
                if (n_curve != null)
                {
                    string date         = ZedGraphControl.GraphPane.XAxis.Scale.TextLabels[index];
                    int    totalCutQty  = (int)ZedGraphControl.GraphPane.CurveList[0].Points[index].Y;
                    int    totalCutTime = (int)ZedGraphControl.GraphPane.CurveList[1].Points[index].Y;

                    DateTime Date;
                    DateTime.TryParseExact(date, "dd/MM/yyyy", null, System.Globalization.DateTimeStyles.None, out Date);

                    MachineTimeLineForm = new MachineTimeLine(Device, Date, totalCutQty, totalCutTime);
                    MachineTimeLineForm.Show();
                    MachineTimeLineForm.BringToFront();
                }
            }
            catch { }
        }