private void AddAnnotationPoint(Stage stage, AnnotationPoint annotationPoint) { stage.AnnotationPoints[currentPoint++] = annotationPoint; //annotationPoints.Add(annotationPoint); //pictureBox1.Controls.Add(annotationPoint); Size size = pictureBox1.Image.Size; annotationPoint.Location = new Point((int)(annotationPoint.XFraction * (float)size.Width), (int)(annotationPoint.YFraction * size.Height)); }
private void LoadData() { for (int j = 0; j < 3; j++) { Stage stage = new Stage(); currentPoint = 0; currentStage = j; AddAnnotationPoint(stage, new AnnotationPoint("Other - Rock - 22%", 0.25f, 0.25f)); AddAnnotationPoint(stage, new AnnotationPoint("Coral - Pink - 72%", 0.25f, 0.75f)); AddAnnotationPoint(stage, new AnnotationPoint("Coral - Pink - 92%", 0.75f, 0.75f)); AddAnnotationPoint(stage, new AnnotationPoint("Other - Alga - 90%", 0.75f, 0.25f)); AddAnnotationPoint(stage, new AnnotationPoint("Fish - Pike - 96%", 0.50f, 0.50f)); stages[currentStage] = stage; } stages[0].Picture = Properties.Resources.corail1; stages[1].Picture = Properties.Resources.fond_marin2; stages[2].Picture = Properties.Resources.Tropical_fish_nocturnal_mirage_37596601_1000_633; currentPoint = 0; currentStage = 0; stages[0].AnnotationPoints[currentPoint].StartTimer(); oldSize = pictureBox1.Size; }