示例#1
0
        private void btnComment_Click(object sender, EventArgs e)
        {
            isDraw = !isDraw;
            if (isDraw)
            {
                Booth.fnOnLButtonDown();
                isPause = true;
                this.btnComment.Text = "结束批注";
                EnablePenControl();
                btnRecordControl.Enabled = false;
                btnNear.Enabled          = false;
                btnFar.Enabled           = false;
                gp = plCamera.CreateGraphics();
                gp.SmoothingMode      = SmoothingMode.AntiAlias; //使绘图质量最高,即消除锯齿
                gp.InterpolationMode  = InterpolationMode.HighQualityBicubic;
                gp.CompositingQuality = CompositingQuality.HighQuality;

                ImageFromControl(ref gp1);
                NoticeShow("已经开始批注。");
            }
            else
            {
                this.btnComment.Text = "开始批注";
                DisablePenControl();
                btnRecordControl.Enabled = true;
                btnNear.Enabled          = true;
                btnFar.Enabled           = true;

                btnEnlargeReset_Click(null, null);
                NoticeShow("已经结束批注。");
            }
        }
示例#2
0
 // 录制暂停/恢复
 // 录制暂停
 private void RecordPause()
 {
     isPause = true;
     Booth.fnOnLButtonDown();
     timer1.Stop();
     btnRecordPause.Text = "恢复录像";
 }
示例#3
0
        // 点击批注历史
        private void imglist1_PictureBoxClick(int i)
        {
            isDraw  = true;
            isPause = true;
            Booth.fnOnLButtonDown();
            this.btnComment.Text = "结束批注";
            EnablePenControl();
            btnRecordControl.Enabled = false;
            btnNear.Enabled          = false;
            btnFar.Enabled           = false;
            gp = plCamera.CreateGraphics();
            gp.SmoothingMode = SmoothingMode.AntiAlias;  //使绘图质量最高,即消除锯齿

            img = Image.FromFile(imglist1.GetImage(i));
            gp.DrawImage(img, 0, 0, plCamera.Width, plCamera.Height);
            ImageFromControl(ref gp1);
        }
示例#4
0
        private void panelCamera_MouseDown(object sender, MouseEventArgs e)
        {
            if (!isRecord)
            {
                if (e.Button == MouseButtons.Left)
                {
                    if (!isDraw)
                    {
                        isDraw = true;
                        Booth.fnOnLButtonDown();
                        isPause = true;
                        this.btnComment.Text = "结束批注";
                        EnablePenControl();
                        btnRecordControl.Enabled = false;
                        btnNear.Enabled          = false;
                        btnFar.Enabled           = false;
                        gp = plCamera.CreateGraphics();
                        gp.SmoothingMode      = SmoothingMode.AntiAlias; //使绘图质量最高,即消除锯齿
                        gp.InterpolationMode  = InterpolationMode.HighQualityBicubic;
                        gp.CompositingQuality = CompositingQuality.HighQuality;

                        ImageFromControl(ref gp1);
                        NoticeShow("已经开始批注。");
                    }

                    if (isDraw)
                    {
                        isPause = true;
                        pStart  = new Point(e.X, e.Y);// ?
                        Booth.fnOnLButtonDown();
                        DrawRectangle();
                        isMouseDown = true;
                        DrawStart(e.Location);
                    }
                }
            }
        }