Example #1
0
        private void GetPtbImage(BaseControls.PictureBoxs.userCtrPicture ctl)
        {
            this.CurrentObj             = (ImgObj)ctl.ImgObj;
            this.drawArea.ImageLocation = ctl.FilePath;
            this.lb_ImageName.Text      = ctl.FileName;
            this.drawArea.GraphicsList.Clear();
            this.drawArea.Controls.Clear();
            this.drawArea.Initialize();
            FileStream fs = new FileStream(this.drawArea.ImageLocation, FileMode.Open);

            try
            {
                this.sourceImage   = new Bitmap(fs);
                this.filteredImage = (Bitmap)this.sourceImage.Clone();
            }
            catch { }
            finally { fs.Dispose(); }
            this.drawArea.Left = (this.p_Picture.Width - this.sourceImage.Width) / 2;
            this.drawArea.Top  = (this.p_Picture.Height - this.sourceImage.Height) / 2;
            if (!this.IsBack && GetConfig.IsAddLocMap && this.frmSLocMap != null)
            {
                this.frmSLocMap.Get(ctl);
            }
            this.InitLocationSize();
        }
Example #2
0
 private void PtbCtlDbClick(BaseControls.PictureBoxs.userCtrPicture ctl)
 {
     if (ctl == null)
     {
         this.ptb_View.Visible = false;
         this.ptb_View.Image   = null;
     }
     else
     {
         this.ptb_View.Visible = true;
         this.ptb_View.Image   = ctl.Image;
     }
 }
Example #3
0
 private void BackPtbDbClick(BaseControls.PictureBoxs.userCtrPicture ctl)
 {
     InitTools();
     if (ctl != null)
     {
         IsBack = true;
         GetPtbImage(ctl);
     }
     else
     {
         ClearPtbImage();
     }
     if (GetConfig.IsAddLocMap)
     {
         MarkLine();
     }
 }