AxisShowSControl.cs
1.5 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
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;
namespace UserFromControl
{
public partial class AxisShowSControl : UserControl
{
public int AxisNo { get; set; }
public int CommandValue { get; set; }
public int PositionValue { get; set; }
public int MontionValue { get; set; }
public int IoStatusValue { get; set; }
public void BingData(int axisNO, int command, int position, int io, int montion )
{
this.AxisNo = axisNO;
this.CommandValue = command;
this.PositionValue = position;
this.MontionValue = montion;
this.IoStatusValue = io;
}
public void ShowData()
{
box.Text = "Axis " + AxisNo;
txtCommand.Text = CommandValue.ToString();
string ioStatus = Convert.ToString(IoStatusValue, 2).PadLeft(9, '0');
txtIoStatus.Text = ioStatus;
String monIoStr = Convert.ToString(MontionValue, 2).PadLeft(9, '0');
txtMontion.Text = monIoStr;
txtPosition.Text = PositionValue.ToString();
}
public AxisShowSControl()
{
InitializeComponent();
}
private void AxisShowControl_Load(object sender, EventArgs e)
{
}
}
}