URRobotSControl.cs 1.3 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 URRobotSControl : UserControl
    {
        public URRobotSControl()
        {
            InitializeComponent();
        }

        private void URRobotSControl_Load(object sender, EventArgs e)
        {

        }
        public void ShowPoint(URPointValue point)
        {
            txtRobotX.Text = point.X.ToString();
            txtRobotY.Text = point.Y.ToString();
            txtRobotZ.Text = point.Z.ToString();
            lblRX.Text = point.RX.ToString();
            lblRY.Text = point.RY.ToString();
            lblRZ.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(lblRX);
            double ry = FormUtil.getDoubleValue(lblRY);
            double rz = FormUtil.getDoubleValue(lblRZ);
            return new URPointValue(x, y, z, rx, ry, rz);
        }
    }
}