Beispiel #1
0
        /// <summary>
        /// 차트 타입 설정 메서드
        /// </summary>
        /// <param name="point"></param>
        /// <param name="e"></param>
        private void CheckChartType(int point, ChartFX.WinForms.HitTestEventArgs e)
        {
            if (e.Series >= 0)
            {
                if (_CType == ChartType.TOTAL)
                {
                    _TotalCode = uiChart_BarLine.Points[point].Tag.ToString();
                    material   = _TotalCode;
                }
                else if (_CType == ChartType.MATERIALS)
                {
                    _MaterialCode = uiChart_BarLine.Points[point].Tag.ToString();
                }
                else if (_CType == ChartType.OPENING)
                {
                    _OpeningCode = uiChart_BarLine.Points[point].Tag.ToString();
                }
            }

            _PCType = _CType;

            if (_PCType == ChartType.TOTAL)
            {
                _CType = ChartType.MATERIALS;
            }
            else if (_PCType == ChartType.MATERIALS)
            {
                _CType = ChartType.OPENING;
            }
        }
        /// <summary>
        /// 차트 더블클릭 시
        /// Sub 차트 보여주는 메서드
        /// </summary>
        /// <param name="point"></param>
        /// <param name="e"></param>
        private void ChartDeepSearch(int point, ChartFX.WinForms.HitTestEventArgs e)
        {
            //Total 결과 화면에서 세부 소재 클릭 시
            if (_CType == ChartType.MATERIALS)
            {
                materialDs = new DataSet();
                materialDs = DB_Process.Instance.Get_ParetoChart_SubData(RItem, opt, _TotalCode);

                //UpdateSubChart(materialDs);
            }
        }
        /// <summary>
        /// 차트 타입 설정 메서드
        /// </summary>
        /// <param name="point"></param>
        /// <param name="e"></param>
        private void CheckChartType(int point, ChartFX.WinForms.HitTestEventArgs e)
        {
            if (e.Series >= 0)
            {
                if (_CType == ChartType.TOTAL)
                {
                    _TotalCode = uiChart_Pareto.Points[point].Tag.ToString();
                }
                else if (_CType == ChartType.MATERIALS)
                {
                    _MaterialCode = uiChart_Pareto.Points[point].Tag.ToString();
                }
            }

            _PCType = _CType;

            if (_PCType == ChartType.TOTAL)
            {
                _CType = ChartType.MATERIALS;
            }
        }
Beispiel #4
0
        /// <summary>
        /// 차트 마우스 더블클릭 이벤트 핸들러
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Chart_MouseDouble_Click(object sender, ChartFX.WinForms.HitTestEventArgs e)
        {
            int point = 0;

            if (e.HitType == ChartFX.WinForms.HitType.Axis)
            {
                point = (int)e.Value;
            }

            if (e.HitType == ChartFX.WinForms.HitType.Point)
            {
                point = e.Point;
            }

            if (point >= 0)
            {
                if (uiChart_BarLine.Points[point].Tag == null)
                {
                    return;
                }

                if (_CType == ChartType.OPENING)
                {
                    return;
                }

                this.Cursor = Cursors.WaitCursor;

                this.ChartDoubleClickEvent?.Invoke(_CType.ToString(), uiChart_BarLine.Points[point].Tag.ToString(), uiChart_BarLine.Data[(int)Type.BAR, point].ToString());

                CheckChartType(point, e);

                ChartDeepSearch(point, e);

                this.Cursor = Cursors.Default;
            }
        }