Пример #1
0
        void MainForm_KeyDown(object sender, KeyEventArgs e)
        {
            //回车键,刷新
            if (13 == e.KeyValue)
            {
                this.UpdateData();
            }

            //左键,左移
            if (37 == e.KeyValue)
            {
                drawK.MoveBack(20);
            }

            //右键,右移
            if (39 == e.KeyValue)
            {
                drawK.MoveAhead(20);
            }

            //上键,显示级别+1
            if (38 == e.KeyValue)
            {
                this.iKGrade = iKGrade + 1 > 10 ? 10 : iKGrade + 1;
                drawK.UpdateGrade(this.iKGrade);
            }

            //下键,显示级别-1
            if (40 == e.KeyValue)
            {
                this.iKGrade = iKGrade - 1 < 0 ? 0 : iKGrade - 1;
                drawK.UpdateGrade(this.iKGrade);
            }


            this.Refresh();
        }
Пример #2
0
        public MainForm()
        {
            InitializeComponent();

            this.lb_KInfo.Location = new Point(0, this.ClientSize.Height - 12);
            this.MouseMove        += new MouseEventHandler(MainForm_MouseMove);


            iKGrade                 = 10;
            this.SizeChanged       += new EventHandler(MainForm_SizeChanged);
            this.KeyDown           += new KeyEventHandler(MainForm_KeyDown);
            strOriginalDataFileName = System.Environment.CurrentDirectory + "\\K.txt";
            strLineDataFileName     = @"D:\快盘\Code\ChanClass\ChanClass\L.txt";
            strSegmentDataFileName  = @"D:\快盘\Code\ChanClass\ChanClass\S.txt";
            //strOriginalDataFileName = @"D:\new_tdx\vipdoc\sh\minline\sh999999.lc1";
            this.UpdateData();

            drawK = new ProcessDrawPoint(0, 0, this.ClientSize.Width, this.ClientSize.Height - 12);
            drawK.UpdateKData(this.KDataArray);
            drawK.UpdateLineData(this.LineDataArray);
            drawK.UpdateSegmentData(this.SegmentDataArray);
            drawK.UpdateGrade(this.iKGrade);
        }
Пример #3
0
        public MainForm()
        {
            InitializeComponent();

            this.lb_KInfo.Location = new Point(0, this.ClientSize.Height - 12);
            this.MouseMove += new MouseEventHandler(MainForm_MouseMove);

            iKGrade = 10;
            this.SizeChanged += new EventHandler(MainForm_SizeChanged);
            this.KeyDown += new KeyEventHandler(MainForm_KeyDown);
            strOriginalDataFileName = System.Environment.CurrentDirectory + "\\K.txt";
            strLineDataFileName = @"D:\快盘\Code\ChanClass\ChanClass\L.txt";
            strSegmentDataFileName = @"D:\快盘\Code\ChanClass\ChanClass\S.txt";
            //strOriginalDataFileName = @"D:\new_tdx\vipdoc\sh\minline\sh999999.lc1";
            this.UpdateData();

            drawK = new ProcessDrawPoint(0, 0, this.ClientSize.Width, this.ClientSize.Height - 12);
            drawK.UpdateKData(this.KDataArray);
            drawK.UpdateLineData(this.LineDataArray);
            drawK.UpdateSegmentData(this.SegmentDataArray);
            drawK.UpdateGrade(this.iKGrade);
        }