public ProductSkuInfo(ProductId aProductId, SpecificationId aSpecificationId, Money aUnitPrice, PictureId aPictureId) { ProductId = aProductId; SpecificationId = aSpecificationId; UnitPrice = aUnitPrice; PictureId = aPictureId; }
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); }
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; }
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!"); } } }
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)); }
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); } }
public int CompareTo(HashItem other) { return(other == null ? -1 : PictureId.CompareTo(other.PictureId)); }
public ShowPictureEvent(PictureId pictureId, int x, int y) { PictureId = pictureId; X = x; Y = y; }
public ShowPicEvent(PictureId picId, int?x, int?y) { PicId = picId; X = x; Y = y; }
public void Update(PictureId aPictureId, PictureUseType aUseType) { PictureId = aPictureId; UseType = aUseType; }
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(); }