Esempio n. 1
0
 public ProductSkuInfo(ProductId aProductId, SpecificationId aSpecificationId, Money aUnitPrice, PictureId aPictureId)
 {
     ProductId       = aProductId;
     SpecificationId = aSpecificationId;
     UnitPrice       = aUnitPrice;
     PictureId       = aPictureId;
 }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Player != 0)
            {
                hash ^= Player.GetHashCode();
            }
            if (PictureId != 0)
            {
                hash ^= PictureId.GetHashCode();
            }
            if (Coordinate.Length != 0)
            {
                hash ^= Coordinate.GetHashCode();
            }
            if (Gain != 0D)
            {
                hash ^= Gain.GetHashCode();
            }
            if (IsEvo != 0)
            {
                hash ^= IsEvo.GetHashCode();
            }
            if (Sharpness != 0D)
            {
                hash ^= Sharpness.GetHashCode();
            }
            return(hash);
        }
Esempio n. 3
0
 public Picture(int aId, PictureId aPictureId, PictureUseType aUseType) : base(aId)
 {
     if (aId <= 0)
     {
         throw new ArgumentException("Id不能小于或等于0");
     }
     if (aPictureId == null)
     {
         throw new ArgumentException("图片Id不能为空");
     }
     PictureId = aPictureId;
     UseType   = aUseType;
 }
Esempio n. 4
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Do you want to DELETE a image of bicycle?", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                var restClient  = new RestClient("http://marichely.me:8099/");
                var restRequest = new RestRequest("bicycle/picture/id", Method.DELETE)
                {
                    RequestFormat = DataFormat.Json
                };
                restRequest.AddHeader("UserApiKey", User.ApiKey);
                restRequest.AddHeader("imageid", PictureId.ToString());

                IRestResponse restResponse = restClient.Execute(restRequest);
                if ((int)restResponse.StatusCode == 200)
                {
                    MessageBox.Show("You 're sucessfully deleted image!");
                }
            }
        }
Esempio n. 5
0
 public int CompareTo(Macroblock other)
 {
     if (other == null)
     {
         throw new ArgumentNullException("other");
     }
     if (LayerId != other.LayerId)
     {
         return(LayerId.CompareTo(other.LayerId));
     }
     if (PictureId != other.PictureId)
     {
         return(PictureId.CompareTo(other.PictureId));
     }
     if (SliceId != other.SliceId)
     {
         return(SliceId.CompareTo(other.SliceId));
     }
     return(Mb.CompareTo(other.Mb));
 }
Esempio n. 6
0
        private PictureBox getPictureBoxFromId(PictureId id)
        {
            switch (id)
            {
            case PictureId.Original:
                return(OriginalImage);

            case PictureId.Threshold:
                return(ThresholdImage);

            case PictureId.Masked:
                return(MaskedImage);

            case PictureId.Red:
                return(RedImage);

            default:
                return(null);
            }
        }
Esempio n. 7
0
 public int CompareTo(HashItem other)
 {
     return(other == null ? -1 : PictureId.CompareTo(other.PictureId));
 }
Esempio n. 8
0
 public ShowPictureEvent(PictureId pictureId, int x, int y)
 {
     PictureId = pictureId; X = x; Y = y;
 }
Esempio n. 9
0
 public ShowPicEvent(PictureId picId, int?x, int?y)
 {
     PicId = picId; X = x; Y = y;
 }
Esempio n. 10
0
 public void Update(PictureId aPictureId, PictureUseType aUseType)
 {
     PictureId = aPictureId;
     UseType   = aUseType;
 }
Esempio n. 11
0
        public void displayImage(ref Image <Bgr, byte> image, PictureId target)
        {
            PictureBox box = getPictureBoxFromId(target);

            box.Image = image.Resize(box.Size.Width, box.Size.Height, Emgu.CV.CvEnum.Inter.Linear).ToBitmap();
        }