Example #1
0
        public FixedInObject(Form w, ObjectPoint p)
        {
            InitializeComponent();
            window = (MainWindow)w;
            point = p;

            if (p.isElastic)
                this.Text = "Set elastic axis";

            if (!double.IsNaN(GlobalSettings.ratio))
            {
                tb_x.Text = px2mm(p.locationWithOutOffset.X).ToString();
                tb_y.Text = px2mm((p.locationWithOutOffset.Y * (-1))).ToString();
            }
            else
            {
                tb_x.Text = "NaN";
                tb_y.Text = "Nan";
            }
            tb_label.Text = p.label;
            tb_ratio.Text = p.ratio.ToString();

            checkBox1.Checked = p.onSurface;
            if (checkBox1.Checked)
            {
                if (p.locationWithOutOffset.Y > 0)
                    cb_upper.Checked = true;
                else
                    cb_upper.Checked = false;

                tb_sur_coor.Text = p.sufraceDist.ToString().Replace(',', '.');
            }

            btn_color.BackColor = p.pen.Color;
        }
Example #2
0
        public FixedInImage(Form w, ImagePoint p)
        {
            InitializeComponent();
            window = (MainWindow)w;
            point = p;

            if (GlobalSettings.ratio != Double.NaN)
            {
                tb_x.Text = px2mm(point.location.X).ToString();
                tb_y.Text = px2mm(point.location.Y).ToString();
            }
            else
            {
                tb_x.Text = "NaN";
                tb_y.Text = "Nan";
            }

            tb_label.Text = p.label;
            tb_ratio.Text = p.ratio.ToString();

            btn_color.BackColor = p.pen.Color;
        }