URRobotMControl.cs 1.2 KB
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using URSoldering.DeviceLibrary;
using URSoldering.Common;

namespace UserFromControl
{
    public partial class URRobotMControl : UserControl
    {
        public URRobotMControl()
        {
            InitializeComponent();
        }
        public void ShowPoint(URPointValue point)
        {
            txtRobotX.Text = point.X.ToString();
            txtRobotY.Text = point.Y.ToString();
            txtRobotZ.Text = point.Z.ToString();
            txtRX.Text = point.RX.ToString();
            txtRY.Text = point.RY.ToString();
            txtRZ.Text = point.RZ.ToString();
        }
        public URPointValue GetPoint()
        {
            double x = FormUtil.getDoubleValue(txtRobotX);
            double y = FormUtil.getDoubleValue(txtRobotY);
            double z = FormUtil.getDoubleValue(txtRobotZ);
            double rx = FormUtil.getDoubleValue(txtRX);
            double ry = FormUtil.getDoubleValue(txtRY);
            double rz = FormUtil.getDoubleValue(txtRZ);
            return new URPointValue(x, y, z, rx, ry, rz);
        }

    }
}