You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
|
|
|
|
namespace Rs.Controls
|
|
{
|
|
public partial class MovePoint : UserControl
|
|
{
|
|
public double CurPosition { get; set; }
|
|
public event Action<string,string> TeachClicked;
|
|
public event Action<string, string> MoveClicked;
|
|
public string AxisName { get; set; }
|
|
public string VarName { get; set; }
|
|
public MovePoint()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void MovePoint_Load(object sender, EventArgs e)
|
|
{
|
|
txtPoint.Text = CurPosition.ToString("0.000");
|
|
}
|
|
|
|
private void btnTeach_Click(object sender, EventArgs e)
|
|
{
|
|
TeachClicked?.Invoke(AxisName,VarName);
|
|
}
|
|
|
|
private void btnMove_Click(object sender, EventArgs e)
|
|
{
|
|
MoveClicked?.Invoke(AxisName, VarName);
|
|
}
|
|
}
|
|
}
|