예제 #1
0
 private void ResetFaceData(FaceData fdata)
 {
     if (string.IsNullOrEmpty(fdata.Path13) == false)
     {
         fdata.Path13 = null;
     }
     if (string.IsNullOrEmpty(fdata.Path18) == false)
     {
         fdata.Path18 = null;
     }
     if (string.IsNullOrEmpty(fdata.Path20) == false)
     {
         fdata.Path20 = null;
     }
     if (string.IsNullOrEmpty(fdata.Path22) == false)
     {
         fdata.Path22 = null;
     }
     if (string.IsNullOrEmpty(fdata.Path81) == false)
     {
         fdata.Path81 = null;
     }
     if (string.IsNullOrEmpty(fdata.Path82) == false)
     {
         fdata.Path82 = null;
     }
     if (string.IsNullOrEmpty(fdata.Path83) == false)
     {
         fdata.Path83 = null;
     }
 }
예제 #2
0
        private void ButtonBindFaceData(Button btn, FaceData fdata)
        {
            Image img = null;

            if (string.IsNullOrEmpty(fdata.Path22))
            {
                img = ThumbHelper.GetThumb(fdata.PageInThumb, fdata.XPosInThumb, fdata.YPosInThumb);
            }
            else
            {
                img = Bitmap.FromFile(fdata.Path22);
            }
            var bmp = new Bitmap(img, new Size(buttonsize, buttonsize));

            btn.Image = bmp;
            btn.Text  = fdata.Number.ToString("D5");
            if (fdata.IsCustomed)
            {
                btn.ForeColor = Color.Red;
            }
            else
            {
                btn.ForeColor = Color.GreenYellow;
            }
        }
예제 #3
0
 public void SetFaceData(FaceData fdata, Image imgsrc)
 {
     this.picSrc.Image = imgsrc;
     this.lblSrc.Text  = fdata.Number.ToString();
     this.fdata        = fdata;
     this.f13          = this.fdata.Path13;
     this.f18          = this.fdata.Path18;
     this.f20          = this.fdata.Path20;
     this.f22          = this.fdata.Path22;
     this.f81          = this.fdata.Path81;
     this.f82          = this.fdata.Path82;
     this.f83          = this.fdata.Path83;
     this.SetButtonImage(this.btn13, this.f13);
     this.SetButtonImage(this.btn18, this.f18);
     this.SetButtonImage(this.btn20, this.f20);
     this.SetButtonImage(this.btn22, this.f22);
     this.SetButtonImage(this.btn81, this.f81);
     this.SetButtonImage(this.btn82, this.f82);
     this.SetButtonImage(this.btn83, this.f83);
     this.moded = false;
 }