AxisPointControl.cs
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
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;
namespace OnlineStore.CarriageClient.useControl
{
public partial class AxisPointControl : UserControl
{
public AxisPointControl()
{
InitializeComponent();
}
public string PointText
{
get { return btnMove.Text; }
set { btnMove.Text = value; }
}
public int PointValue
{
get { return FormUtil.GetIntValue( txtPoint.Text); }
set { txtPoint.Text = value.ToString(); }
}
public Color PointBackColor
{
get { return btnMove.BackColor; }
set { this.btnMove.BackColor = value; }
}
public Color PointForeColor
{
get { return btnMove.ForeColor; }
set { this.btnMove.ForeColor = value; }
}
private int MoveSpeed;
private AxisBean MoveAxis = null;
public void SetMoveData(AxisBean axisBean,int speed,int pointV)
{
this.MoveAxis = axisBean;
this.MoveSpeed = speed;
this.PointValue = pointV;
}
private void btnMove_Click(object sender, EventArgs e)
{
int v = FormUtil.GetIntValue(txtPoint);
LogUtil.info(this.Name+" "+ MoveAxis.AxisName + " 点击:" + btnMove.Text);
MoveAxis.AbsMove(null, v, MoveSpeed);
}
}
}