示例#1
0
        public void setPointLocation(PointF p, PointF leading, PointF falling)
        {
            window.DeleteObjectPoint(point);

            if (point.onSurface)
            {
                if (MainWindow.level != 3)
                {
                    p = MyImage.GetPointOnProfile(MainWindow.arrayProfile, p);
                }
                else if (MainWindow.level == 3)
                {
                    p = MyImage.GetPointOnProfile(window.images.getActual().getArrayProfile(), p);
                }
                try
                {
                    point.sufraceDist = double.Parse(tb_sur_coor.Text.Replace(',', '.'), CultureInfo.InvariantCulture);
                }
                catch { }
            }
            point.setPointLocationByPoint(p, leading, falling);
            window.SetObjectPoint(point);
            update();
        }
示例#2
0
 private void btn_PointFixedInObject_Click(object sender, EventArgs e)
 {
     if (!Application.OpenForms.OfType<FixedInObject>().Any() && !Application.OpenForms.OfType<FixedInImage>().Any())
         {
             if (tabControl1.SelectedTab.Equals(tabAirfoil) && !calibrateProfilePoint1.IsEmpty() && !calibrateProfilePoint2.IsEmpty()
                 || tabControl1.SelectedTab.Equals(tabAnalyze) && !images.getActual().point1.IsEmpty() && !images.getActual().point2.IsEmpty())
             {
                 ObjectPoint tmp = new ObjectPoint(new Pen(Color.Green,2));
                 tmp.setPointLocationByPoint(cross, calibrateProfilePoint1.Point, calibrateProfilePoint2.Point);
                 listFixedInObject.Add(tmp);
                 formFixedInObject = new FixedInObject(this, tmp);
                 formFixedInObject.Show();
                 imageBox.Invalidate();
             }
             else
             {
                 MessageBox.Show("There is no object to get fixed on!");
             }
         }
 }