Esempio n. 1
0
        private void PreferStaticCatch()
        {
            if (this.ptb_Gather.Image == null)
            {
                return;
            }
            try
            {
                Image img = (Image)this.ptb_Gather.Image.Clone();
                img = FileOperator.CutImg(img);
                if (frmMainForm.GatherOrRpt == 1)
                {
                    if (frmMainForm.myMainForm.qQuery.frm.isCanOpe)
                    {
                        FileOperator.BackCatchImg(img);
                        frmMainForm.myMainForm.qQuery.frm.frmRptImg.AddPreferImage(img);
                        frmMainForm.myMainForm.qQuery.frm.frmRptImg.Activate();
                        this.preferImages.LoadImages();
                        int i = Beep(1000, 500);
                        //System.Media.SystemSounds.Asterisk.Play();
                    }
                }
                if (frmMainForm.GatherOrRpt == 0 && this.Visible)
                {
                    FileOperator.BackCatchImg(img);
                    this.preferImages.AddPreferImage(img);
                    this.preferImages.Activate();
                    int i = Beep(1000, 500);

                    //System.Media.SystemSounds.Asterisk.Play();
                }
            }
            catch { }
        }
Esempio n. 2
0
        private void btn_Catch_Click(object sender, EventArgs e)
        {
            Image img = (Image)frmMainForm.myMainForm.iGather.GetCatch();

            if (img != null)
            {
                img = FileOperator.CutImg(img);
                FileOperator.BackCatchImg(img);
                this.frmRptImg.AddPreferImage(img);
            }
        }
Esempio n. 3
0
        //private void axHYImage1_OnEventCallback(object sender, EventArgs e)
        //{
        //    int size = this.axHYImage1.GetImgBufsize();
        //    byte[] data = new byte[size];
        //    int width = 768, height = 580,length=data.Length;
        //    this.axHYImage1.GetVideoData(data, ref length, ref width, ref height, 100);
        //    Bitmap bt = ImageOpe.ByteToImage(data);
        //    if (bt != null)
        //        this.ptb_Gather.Image = bt;
        //}

        private void btn_StaticCatch_Click(object sender, EventArgs e)
        {
            if (this.ptb_Gather.Image == null)
            {
                return;
            }
            Image img = FileOperator.CutImg(this.ptb_Gather.Image);

            if (this.rb_Back.Checked)
            {
                this.backImages.AddBackImage(img);
                this.backImages.Activate();
            }
            if (this.rb_Prefer.Checked)
            {
                FileOperator.BackCatchImg(img);//备份一份到本地
                this.preferImages.AddPreferImage(img);
                this.preferImages.Activate();
            }
        }