添加项目文件。
This commit is contained in:
6390
CowainHmi/Axis/AxisDebug.Designer.cs
generated
Normal file
6390
CowainHmi/Axis/AxisDebug.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
414
CowainHmi/Axis/AxisDebug.cs
Normal file
414
CowainHmi/Axis/AxisDebug.cs
Normal file
@@ -0,0 +1,414 @@
|
||||
using CowainHmi.UIEditor;
|
||||
using PCHMI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CowainHmi
|
||||
{
|
||||
public partial class AxisDebug : UserControl
|
||||
{
|
||||
private string axisIdAddr = "";
|
||||
[Category("PCHMI"), Description("轴编号地址")]
|
||||
public string AxisIdAddr
|
||||
{
|
||||
get
|
||||
{
|
||||
return axisIdAddr;
|
||||
}
|
||||
set
|
||||
{
|
||||
axisIdAddr = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string dataAddr = "";
|
||||
[Category("PCHMI"), Description("轴控制DB地址")]
|
||||
public string DataAddr
|
||||
{
|
||||
get
|
||||
{
|
||||
return dataAddr;
|
||||
}
|
||||
set
|
||||
{
|
||||
dataAddr = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string torqueAddr = "";
|
||||
[Category("PCHMI"), Description("轴扭矩DB地址")]
|
||||
public string TorqueAddr
|
||||
{
|
||||
get
|
||||
{
|
||||
return torqueAddr;
|
||||
}
|
||||
set
|
||||
{
|
||||
torqueAddr = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string errAddr = "";
|
||||
[Category("PCHMI"), Description("轴错误DB地址")]
|
||||
public string ErrAddr
|
||||
{
|
||||
get
|
||||
{
|
||||
return errAddr;
|
||||
}
|
||||
set
|
||||
{
|
||||
errAddr = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string paramAddr = "";
|
||||
[Category("PCHMI"), Description("轴参数DB地址")]
|
||||
public string ParamAddr
|
||||
{
|
||||
get
|
||||
{
|
||||
return paramAddr;
|
||||
}
|
||||
set
|
||||
{
|
||||
paramAddr = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string posAddr = "";
|
||||
[Category("PCHMI"), Description("点位DB地址")]
|
||||
public string PosAddr
|
||||
{
|
||||
get
|
||||
{
|
||||
return posAddr;
|
||||
}
|
||||
set
|
||||
{
|
||||
posAddr = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string axisConfig = "S1";
|
||||
|
||||
[Browsable(true)]
|
||||
[Category("PCHMI"), Description("轴配置")]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
||||
[Editor(typeof(UIAxisConfigEdit), typeof(UITypeEditor))]
|
||||
public string AxisConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
return axisConfig;
|
||||
}
|
||||
set
|
||||
{
|
||||
axisConfig = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private int id = 0;
|
||||
private int posId = 0;
|
||||
private string axisName = "";
|
||||
private List<string> posNames = new List<string>();
|
||||
private DataTable table;
|
||||
public AxisDebug()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SetAddress()
|
||||
{
|
||||
//id = PCHMI.VL.GET_UINT16(0, AxisIdAddr) - 1;//读轴编号
|
||||
//if (id < 0)
|
||||
//{
|
||||
// PCHMI.RT.SEND_UINT16(0, AxisIdAddr, 1);
|
||||
// id = 0;
|
||||
//}
|
||||
id = this.cbxAxisSel.SelectedIndex;
|
||||
axisName = $"轴{id + 1}"; //默认轴名称
|
||||
if (table != null)
|
||||
{
|
||||
DataRow row = table.Select($"轴号='{id + 1}'").FirstOrDefault();
|
||||
if (row != null)
|
||||
{
|
||||
axisName = row["轴名称"].ToString();
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
posNames[i] = row[$"位置名称{i}"].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.cbxPosSelect.DataSource = null;
|
||||
List<string> list = new List<string>();
|
||||
int idx = 0;
|
||||
foreach (var item in posNames)
|
||||
{
|
||||
list.Add($"{idx}-{item}");
|
||||
idx++;
|
||||
}
|
||||
this.cbxPosSelect.DataSource = list;
|
||||
this.btnEnable.开关功能.地址[0] = $"{DataAddr}.{id * 60}.6";
|
||||
this.btnEnable.开关功能.地址[1] = $"{DataAddr}.{id * 60 + 4}";
|
||||
this.btnEnable.开关功能.扩展[1] = "0";
|
||||
this.btnEnable.指示灯地址 = $"{DataAddr}.{id * 60}.6";
|
||||
this.btnHome.指示灯地址 = $"{DataAddr}.{id * 60}.2";
|
||||
this.lblEnable.指示灯地址 = $"{DataAddr}.{id * 60 + 36}.4";
|
||||
this.lblRef.指示灯地址 = $"{DataAddr}.{id * 60 + 36}.0";
|
||||
this.lblErr.指示灯地址 = $"{ErrAddr}.{id * 2 + 0}.2";
|
||||
this.lblAutoMode.指示灯地址 = $"{DataAddr}.{id * 60 + 37}.1";
|
||||
this.lblJogAddSafe.指示灯地址 = $"{DataAddr}.{id * 60 + 0}.7";
|
||||
this.lblJogDecSafe.指示灯地址 = $"{DataAddr}.{id * 60 + 1}.0";
|
||||
|
||||
this.btnJogAdd.指示灯地址 = $"{DataAddr}.{id * 60 + 4}";
|
||||
this.btnJogDec.指示灯地址 = $"{DataAddr}.{id * 60 + 4}";
|
||||
|
||||
this.btnJogSafe.开关功能.地址[0] = $"{DataAddr}.{id * 60 + 1}.1";
|
||||
this.btnJogSafe.监控地址 = $"{DataAddr}.{id * 60 + 1}.1";
|
||||
this.txtActPos.监控地址 = $"{DataAddr}.{id * 60 + 24}";
|
||||
this.txtActVel.监控地址 = $"{DataAddr}.{id * 60 + 20}";
|
||||
this.txtErrCode.监控地址 = $"{DataAddr}.{id * 60 + 42}";
|
||||
this.txtTipCode.监控地址 = $"{DataAddr}.{id * 60 + 44}";
|
||||
this.txtManualV.监控地址 = $"{ParamAddr}.{id * 38 + 6}";
|
||||
this.txtAutoV.监控地址 = $"{ParamAddr}.{id * 38 + 8}";
|
||||
this.txtAcc.监控地址 = $"{ParamAddr}.{id * 38 + 10}";
|
||||
this.txtDec.监控地址 = $"{ParamAddr}.{id * 38 + 12}";
|
||||
this.txtLockPos.监控地址 = $"{DataAddr}.{id * 60 + 28}";
|
||||
this.lblAxisLock.指示灯地址 = $"{ErrAddr}.{id * 2}.4";
|
||||
this.btnUnlock.开关功能.地址[0] = $"{DataAddr}.{id * 60 + 1}.2";
|
||||
this.btnUnlock.监控地址 = $"{DataAddr}.{id * 60 + 1}.2";
|
||||
|
||||
this.btnGoLock.监控地址 = $"{DataAddr}.{id * 60 + 4}";
|
||||
this.lblInPos.指示灯地址 = $"{DataAddr}.{id * 60 + 56 + posId / 8}.{posId % 8}"; //点位到位指示
|
||||
this.txtTargetPos.监控地址 = $"{PosAddr}.{id * 384 + posId * 12}";
|
||||
this.txtTargetVel.监控地址 = $"{PosAddr}.{id * 384 + posId * 12 + 8}";
|
||||
this.lblGoSafe.指示灯地址 = $"{DataAddr}.{id * 60 + 6 + posId / 8}.{posId % 8}"; //点位安全指示
|
||||
this.btnGoSafe.开关功能.地址[0] = $"{DataAddr}.{id * 60 + 10 + posId / 8}.{posId % 8}"; //安全解锁
|
||||
this.btnGoSafe.监控地址 = $"{DataAddr}.{id * 60 + 10 + posId / 8}.{posId % 8}";
|
||||
|
||||
this.btnGoto.监控地址 = $"{DataAddr}.{id * 60 + 4}";
|
||||
this.lblPosUnit1.监控地址 = $"{ParamAddr}.{id * 38 + 14}";
|
||||
this.lblPosUnit2.监控地址 = $"{ParamAddr}.{id * 38 + 14}";
|
||||
this.lblGotoUnit.监控地址 = $"{ParamAddr}.{id * 38 + 14}";
|
||||
this.lblActVelUnit.监控地址 = $"{ParamAddr}.{id * 38 + 14}";
|
||||
this.标签2.监控地址 = $"{ParamAddr}.{id * 38 + 14}";
|
||||
this.txtSetTorque.监控地址 = $"{TorqueAddr}.{id * 26 + 16}";
|
||||
this.txtActTorque.监控地址 = $"{TorqueAddr}.{id * 26 + 20}";
|
||||
this.lblTorqueLight.指示灯地址 = $"{TorqueAddr}.{id * 26 + 24}.0";
|
||||
|
||||
this.lblErrBit1.指示灯地址 = $"{DataAddr}.{id * 60 + 46}.1";
|
||||
this.lblErrBit4.指示灯地址 = $"{DataAddr}.{id * 60 + 46}.4";
|
||||
this.lblErrBit5.指示灯地址 = $"{DataAddr}.{id * 60 + 46}.5";
|
||||
this.lblErrBit7.指示灯地址 = $"{DataAddr}.{id * 60 + 46}.7";
|
||||
}
|
||||
private void OpenFile(string fileName)
|
||||
{
|
||||
string text = Application.StartupPath + $"\\DATA\\{fileName}.csv";
|
||||
if (File.Exists(text))
|
||||
{
|
||||
table = CSV.OpenCSV(text);
|
||||
}
|
||||
}
|
||||
|
||||
private void AxisDebug_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (PCHMI.PClass.SystemRun)
|
||||
{
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
posNames.Add($"位置{i}");
|
||||
}
|
||||
OpenFile(AxisConfig);
|
||||
|
||||
id = PCHMI.VL.GET_UINT16(0, AxisIdAddr) - 1;//读轴编号
|
||||
if (id < 0)
|
||||
{
|
||||
PCHMI.RT.SEND_UINT16(0, AxisIdAddr, 1);
|
||||
id = 0;
|
||||
}
|
||||
if (table != null)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
string name = row["轴名称"].ToString();
|
||||
list.Add(name);
|
||||
}
|
||||
this.cbxAxisSel.DataSource = list;
|
||||
this.cbxAxisSel.SelectedIndex = id;
|
||||
this.cbxAxisSel.SelectedIndexChanged += CbxAxisSel_SelectedIndexChanged;
|
||||
SetAddress();
|
||||
this.cbxPosSelect.SelectedIndex = -1;
|
||||
this.cbxPosSelect.SelectedIndexChanged += CbxPosSelect_SelectedIndexChanged;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void CbxAxisSel_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetAddress();
|
||||
}
|
||||
|
||||
private void CbxPosSelect_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//更改了点位
|
||||
posId = this.cbxPosSelect.SelectedIndex;
|
||||
this.lblInPos.指示灯地址 = $"{DataAddr}.{id * 60 + 56 + posId / 8}.{posId % 8}"; //点位到位指示
|
||||
this.txtTargetPos.监控地址 = $"{PosAddr}.{id * 384 + posId * 12}";
|
||||
this.txtTargetVel.监控地址 = $"{PosAddr}.{id * 384 + posId * 12 + 8}";
|
||||
this.lblGoSafe.指示灯地址 = $"{DataAddr}.{id * 60 + 6 + posId / 8}.{posId % 8}"; //点位安全指示
|
||||
this.btnGoSafe.开关功能.地址[0] = $"{DataAddr}.{id * 60 + 10 + posId / 8}.{posId % 8}"; //安全解锁
|
||||
this.btnGoSafe.监控地址 = $"{DataAddr}.{id * 60 + 10 + posId / 8}.{posId % 8}";
|
||||
this.btnGoto.开关功能.地址[0] = $"{DataAddr}.{id * 60 + 2}"; //手动定位到目标点位
|
||||
this.btnGoto.开关功能.扩展[0] = $"{100 + posId}"; //写入100-131
|
||||
this.btnGoto.监控地址 = $"{DataAddr}.{id * 60 + 4}";
|
||||
}
|
||||
|
||||
private void txtAxisId_数值改变事件(数据显示器 sender)
|
||||
{
|
||||
SetAddress();
|
||||
}
|
||||
|
||||
private void btnEnable_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
PCHMI.OPTLOG.WLOG($"手动按下了轴使能按钮,Axis{id}-{axisName}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnJogSafe_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (this.btnJogSafe.Value == 0)
|
||||
{
|
||||
PCHMI.OPTLOG.WLOG($"手动解除了轴Jog保护,可能发生安全事故,Axis{id}-{axisName}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnUnlock_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (this.btnUnlock.Value == 0)
|
||||
{
|
||||
PCHMI.OPTLOG.WLOG($"手动解除了轴连锁(清除了手动操作记忆),可能发生安全事故,Axis{id}-{axisName}");
|
||||
}
|
||||
|
||||
}
|
||||
private void btnGoSafe_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (this.btnGoSafe.Value == 0)
|
||||
{
|
||||
PCHMI.OPTLOG.WLOG($"手动解除定位安全,Axis{id}-{axisName},点位:{posId}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void txtTargetPos_Enter(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("不可以修改位置,请通过点位选择", "提示");
|
||||
}
|
||||
|
||||
private void btnAxisPoss_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
PCHMI.RT.SEND_UINT16(0, AxisIdAddr, (ushort)(id + 1));
|
||||
DlgAxisPosData dlg = new DlgAxisPosData(posNames, PosAddr, DataAddr, id, (int)this.lblPosUnit1.Value);
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
#region JogAdd
|
||||
private async void btnJogAdd_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
await Task.Delay(100);
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 1);
|
||||
}
|
||||
|
||||
private async void btnJogAdd_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
await Task.Delay(300);
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region JogDec
|
||||
private async void btnJogDec_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
await Task.Delay(100);
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 2);
|
||||
}
|
||||
|
||||
private async void btnJogDec_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
await Task.Delay(300);
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Home
|
||||
private async void btnHome_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
await Task.Delay(200);
|
||||
PCHMI.OPTLOG.WLOG($"手动按下了轴回原点按钮,Axis{id}-{axisName}");
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 3);
|
||||
}
|
||||
|
||||
private async void btnHome_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
await Task.Delay(500);
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
}
|
||||
#endregion
|
||||
#region Goto
|
||||
|
||||
private async void btnGoto_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
await Task.Delay(200);
|
||||
PCHMI.OPTLOG.WLOG($"手动触发了定位,定位目标点={posId + 1},目标位置:{this.txtTargetPos.Value},Axis{id}-{axisName}");
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", (short)(100 + posId));
|
||||
}
|
||||
private void btnGoto_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
//PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
}
|
||||
#endregion
|
||||
#region GotoLock
|
||||
|
||||
private async void btnGoLock_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
await Task.Delay(200);
|
||||
PCHMI.OPTLOG.WLOG($"手动触发了去连锁位置,Axis{id}-{axisName},连锁位置:{this.txtLockPos.Value}");
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 10);
|
||||
}
|
||||
private async void btnGoLock_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
await Task.Delay(500);
|
||||
PCHMI.RT.SET_INT16(0, $"{DataAddr}.{id * 60 + 4}", 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
1266
CowainHmi/Axis/AxisDebug.resx
Normal file
1266
CowainHmi/Axis/AxisDebug.resx
Normal file
File diff suppressed because it is too large
Load Diff
195
CowainHmi/Axis/DlgAxisPosData.Designer.cs
generated
Normal file
195
CowainHmi/Axis/DlgAxisPosData.Designer.cs
generated
Normal file
@@ -0,0 +1,195 @@
|
||||
namespace CowainHmi
|
||||
{
|
||||
partial class DlgAxisPosData
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.dgvAxisPos = new System.Windows.Forms.DataGridView();
|
||||
this.PosName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.SetPos = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.SetVel = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.InPos = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
this.SafeLock = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
this.Teach = new System.Windows.Forms.DataGridViewButtonColumn();
|
||||
this.Goto = new System.Windows.Forms.DataGridViewButtonColumn();
|
||||
this.Edit = new System.Windows.Forms.DataGridViewButtonColumn();
|
||||
this.Safe = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvAxisPos)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dgvAxisPos
|
||||
//
|
||||
this.dgvAxisPos.AllowUserToAddRows = false;
|
||||
this.dgvAxisPos.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dgvAxisPos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvAxisPos.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.PosName,
|
||||
this.SetPos,
|
||||
this.SetVel,
|
||||
this.InPos,
|
||||
this.SafeLock,
|
||||
this.Teach,
|
||||
this.Goto,
|
||||
this.Edit,
|
||||
this.Safe});
|
||||
this.dgvAxisPos.Location = new System.Drawing.Point(0, 0);
|
||||
this.dgvAxisPos.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.dgvAxisPos.Name = "dgvAxisPos";
|
||||
this.dgvAxisPos.RowHeadersWidth = 51;
|
||||
this.dgvAxisPos.RowTemplate.Height = 35;
|
||||
this.dgvAxisPos.Size = new System.Drawing.Size(887, 434);
|
||||
this.dgvAxisPos.TabIndex = 0;
|
||||
this.dgvAxisPos.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvAxisPos_CellClick);
|
||||
this.dgvAxisPos.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.dgvAxisPos_CellFormatting);
|
||||
this.dgvAxisPos.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvAxisPos_RowPostPaint);
|
||||
//
|
||||
// PosName
|
||||
//
|
||||
this.PosName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
this.PosName.DataPropertyName = "PosName";
|
||||
this.PosName.HeaderText = "点位名称";
|
||||
this.PosName.MinimumWidth = 100;
|
||||
this.PosName.Name = "PosName";
|
||||
this.PosName.ReadOnly = true;
|
||||
//
|
||||
// SetPos
|
||||
//
|
||||
this.SetPos.DataPropertyName = "SetPos";
|
||||
dataGridViewCellStyle1.NullValue = null;
|
||||
this.SetPos.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.SetPos.HeaderText = "目标位置";
|
||||
this.SetPos.MinimumWidth = 6;
|
||||
this.SetPos.Name = "SetPos";
|
||||
this.SetPos.ReadOnly = true;
|
||||
this.SetPos.Width = 90;
|
||||
//
|
||||
// SetVel
|
||||
//
|
||||
this.SetVel.DataPropertyName = "SetVel";
|
||||
this.SetVel.HeaderText = "设置速度";
|
||||
this.SetVel.MinimumWidth = 6;
|
||||
this.SetVel.Name = "SetVel";
|
||||
this.SetVel.ReadOnly = true;
|
||||
this.SetVel.Width = 90;
|
||||
//
|
||||
// InPos
|
||||
//
|
||||
this.InPos.DataPropertyName = "InPos";
|
||||
this.InPos.HeaderText = "到位";
|
||||
this.InPos.MinimumWidth = 6;
|
||||
this.InPos.Name = "InPos";
|
||||
this.InPos.ReadOnly = true;
|
||||
this.InPos.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.InPos.Width = 60;
|
||||
//
|
||||
// SafeLock
|
||||
//
|
||||
this.SafeLock.DataPropertyName = "SafeLock";
|
||||
this.SafeLock.HeaderText = "安全信号";
|
||||
this.SafeLock.Name = "SafeLock";
|
||||
this.SafeLock.ReadOnly = true;
|
||||
this.SafeLock.Width = 80;
|
||||
//
|
||||
// Teach
|
||||
//
|
||||
this.Teach.DataPropertyName = "Teach";
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle2.NullValue = "示教";
|
||||
dataGridViewCellStyle2.Padding = new System.Windows.Forms.Padding(4);
|
||||
this.Teach.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.Teach.HeaderText = "示教";
|
||||
this.Teach.MinimumWidth = 6;
|
||||
this.Teach.Name = "Teach";
|
||||
//
|
||||
// Goto
|
||||
//
|
||||
this.Goto.DataPropertyName = "Goto";
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle3.NullValue = "Goto";
|
||||
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(4);
|
||||
this.Goto.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.Goto.HeaderText = "定位";
|
||||
this.Goto.MinimumWidth = 6;
|
||||
this.Goto.Name = "Goto";
|
||||
//
|
||||
// Edit
|
||||
//
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle4.NullValue = "修改";
|
||||
dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(4);
|
||||
this.Edit.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.Edit.HeaderText = "修改";
|
||||
this.Edit.Name = "Edit";
|
||||
//
|
||||
// Safe
|
||||
//
|
||||
this.Safe.DataPropertyName = "Safe";
|
||||
this.Safe.HeaderText = "安全解锁";
|
||||
this.Safe.MinimumWidth = 6;
|
||||
this.Safe.Name = "Safe";
|
||||
this.Safe.Width = 80;
|
||||
//
|
||||
// DlgAxisPosData
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(888, 433);
|
||||
this.Controls.Add(this.dgvAxisPos);
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(754, 408);
|
||||
this.Name = "DlgAxisPosData";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "轴点位设置";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.DlgAxisPosData_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvAxisPos)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dgvAxisPos;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PosName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn SetPos;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn SetVel;
|
||||
private System.Windows.Forms.DataGridViewImageColumn InPos;
|
||||
private System.Windows.Forms.DataGridViewImageColumn SafeLock;
|
||||
private System.Windows.Forms.DataGridViewButtonColumn Teach;
|
||||
private System.Windows.Forms.DataGridViewButtonColumn Goto;
|
||||
private System.Windows.Forms.DataGridViewButtonColumn Edit;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn Safe;
|
||||
}
|
||||
}
|
||||
244
CowainHmi/Axis/DlgAxisPosData.cs
Normal file
244
CowainHmi/Axis/DlgAxisPosData.cs
Normal file
@@ -0,0 +1,244 @@
|
||||
using CowainHmi.Properties;
|
||||
using PCHMI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Resources;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Linq;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace CowainHmi
|
||||
{
|
||||
|
||||
public partial class DlgAxisPosData : Form
|
||||
{
|
||||
private class PosData : INotifyPropertyChanged
|
||||
{
|
||||
private string setPos;
|
||||
private string setVel;
|
||||
private bool inPos;
|
||||
private bool safe;
|
||||
private bool safeLock;
|
||||
|
||||
public string PosName { get; set; }
|
||||
public string SetPos
|
||||
{
|
||||
get => setPos;
|
||||
set
|
||||
{
|
||||
setPos = value;
|
||||
OnPropertyChanged("SetPos");
|
||||
}
|
||||
}
|
||||
public string SetVel
|
||||
{
|
||||
get => setVel;
|
||||
set
|
||||
{
|
||||
setVel = value;
|
||||
OnPropertyChanged("SetVel");
|
||||
}
|
||||
}
|
||||
public bool InPos
|
||||
{
|
||||
get => inPos;
|
||||
set
|
||||
{
|
||||
inPos = value;
|
||||
OnPropertyChanged("InPos");
|
||||
}
|
||||
}
|
||||
|
||||
public bool Safe
|
||||
{
|
||||
get => safe;
|
||||
set
|
||||
{
|
||||
safe = value;
|
||||
OnPropertyChanged("Safe");
|
||||
}
|
||||
}
|
||||
|
||||
public bool SafeLock
|
||||
{
|
||||
get => safeLock;
|
||||
set
|
||||
{
|
||||
safeLock = value;
|
||||
OnPropertyChanged("SafeLock");
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
private enum UnitType
|
||||
{
|
||||
mm,
|
||||
cm,
|
||||
m,
|
||||
deg,
|
||||
rad
|
||||
}
|
||||
private BindingList<PosData> list = new BindingList<PosData>();
|
||||
private int id;
|
||||
private int unit;
|
||||
private string posAddr;
|
||||
private string dataAddr;
|
||||
private List<string> posNames;
|
||||
public DlgAxisPosData(List<string> posNames, string posAddr, string dataAddr, int id, int unit)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.id = id;
|
||||
this.posAddr = posAddr;
|
||||
this.dataAddr = dataAddr;
|
||||
this.posNames = posNames;
|
||||
this.unit = unit;
|
||||
for (int i = 0; i < posNames.Count; i++)
|
||||
{
|
||||
PosData data = new PosData { PosName = posNames[i] };
|
||||
list.Add(data);
|
||||
}
|
||||
this.dgvAxisPos.AutoGenerateColumns = false;
|
||||
this.dgvAxisPos.DataSource = list;
|
||||
|
||||
}
|
||||
|
||||
private async void DlgAxisPosData_Load(object sender, EventArgs e)
|
||||
{
|
||||
await GetPosData();
|
||||
}
|
||||
|
||||
private async Task GetPosData()
|
||||
{
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
var pos = PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + i * 12}");
|
||||
var vel = PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + i * 12 + 8}");
|
||||
var inPos = PCHMI.VL.GET_BIT(0, $"{dataAddr}.{id * 60 + 56 + i / 8}.{i % 8}");
|
||||
var safe = PCHMI.VL.GET_BIT(0, $"{dataAddr}.{id * 60 + 10 + i / 8}.{i % 8}");
|
||||
var safeLock = PCHMI.VL.GET_BIT(0, $"{dataAddr}.{id * 60 + 6 + i / 8}.{i % 8}");
|
||||
}
|
||||
await Task.Delay(300);
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
var pos = PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + i * 12}");
|
||||
var vel = PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + i * 12 + 8}");
|
||||
var inPos = PCHMI.VL.GET_BIT(0, $"{dataAddr}.{id * 60 + 56 + i / 8}.{i % 8}");
|
||||
var safe = PCHMI.VL.GET_BIT(0, $"{dataAddr}.{id * 60 + 10 + i / 8}.{i % 8}");
|
||||
var safeLock = PCHMI.VL.GET_BIT(0, $"{dataAddr}.{id * 60 + 6 + i / 8}.{i % 8}");
|
||||
list[i].SetPos = $"{((double)pos / 100.0).ToString("F2")} {(UnitType)unit}";
|
||||
list[i].SetVel = $"{vel} {(UnitType)unit}/s";
|
||||
list[i].InPos = inPos > 0 ? true : false;
|
||||
list[i].Safe = safe > 0 ? true : false;
|
||||
list[i].SafeLock = safeLock > 0 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async void dgvAxisPos_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if ((e.ColumnIndex == this.dgvAxisPos.Columns["Edit"].Index || e.ColumnIndex == this.dgvAxisPos.Columns["SetPos"].Index || e.ColumnIndex == this.dgvAxisPos.Columns["SetVel"].Index) && e.RowIndex >= 0)
|
||||
{
|
||||
DlgPosEdit dlg = new DlgPosEdit(posNames[e.RowIndex], posAddr, id, e.RowIndex, unit);
|
||||
var result = dlg.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
await GetPosData();
|
||||
}
|
||||
}
|
||||
else if (e.ColumnIndex == this.dgvAxisPos.Columns["Teach"].Index && e.RowIndex >= 0)
|
||||
{
|
||||
//按下示教按钮,将轴当前位置设置为目标位置
|
||||
var actPos = PCHMI.VL.GET_INT32(0, $"{dataAddr}.{id * 60 + 24}");
|
||||
PCHMI.RT.SEND_INT32(0, $"{posAddr}.{id * 384 + e.RowIndex * 12}", actPos);
|
||||
PCHMI.OPTLOG.WLOG($"手动按下了点位示教按钮,Axis{id},点位号:{e.RowIndex},原位置:{list[e.RowIndex].SetPos},新位置:{actPos}");
|
||||
await GetPosData();
|
||||
}
|
||||
else if (e.ColumnIndex == this.dgvAxisPos.Columns["Goto"].Index && e.RowIndex >= 0)
|
||||
{
|
||||
//按下Goto按钮
|
||||
PCHMI.RT.SEND_INT16(0, $"{dataAddr}.{id * 60 + 4}", 0);
|
||||
await Task.Delay(200);
|
||||
var actPos = PCHMI.VL.GET_INT32(0, $"{dataAddr}.{id * 60 + 24}");
|
||||
PCHMI.RT.SEND_INT16(0, $"{dataAddr}.{id * 60 + 4}", (short)(100 + e.RowIndex));
|
||||
PCHMI.OPTLOG.WLOG($"手动触发了定位按钮,Axis{id},点位号:{e.RowIndex},定位前位置:{actPos},目标位置:{list[e.RowIndex].SetPos}");
|
||||
}
|
||||
else if (e.ColumnIndex == this.dgvAxisPos.Columns["Safe"].Index && e.RowIndex >= 0)
|
||||
{
|
||||
//按下解锁按钮
|
||||
bool isChecked = PCHMI.VL.GET_BIT(0, $"{dataAddr}.{id * 60 + 10 + e.RowIndex / 8}.{e.RowIndex % 8}") > 0 ? true : false;
|
||||
//DataGridViewCheckBoxCell chkBoxCell = (DataGridViewCheckBoxCell)dgvAxisPos.Rows[e.RowIndex].Cells[e.ColumnIndex];
|
||||
//bool isChecked = (bool)chkBoxCell.Value;
|
||||
if (isChecked)
|
||||
{
|
||||
PCHMI.RT.SEND_BIT(0, $"{dataAddr}.{id * 60 + 10 + e.RowIndex / 8}.{e.RowIndex % 8}", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
PCHMI.OPTLOG.WLOG($"手动触发解除安全,Axis{id},点位{e.RowIndex}");
|
||||
PCHMI.RT.SEND_BIT(0, $"{dataAddr}.{id * 60 + 10 + e.RowIndex / 8}.{e.RowIndex % 8}", 1);
|
||||
}
|
||||
await GetPosData();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void dgvAxisPos_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
new DataGridViewStyle().DgvRowPostPaint(dgvAxisPos, e);
|
||||
}
|
||||
|
||||
private void dgvAxisPos_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex == this.dgvAxisPos.Columns["InPos"].Index && e.Value != null)
|
||||
{
|
||||
bool inPos = (bool)e.Value;
|
||||
if (inPos) // 根据条件判断
|
||||
{
|
||||
e.CellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
e.Value = global::CowainHmi.Properties.Resources.有效;
|
||||
e.FormattingApplied = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.CellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
e.Value = global::CowainHmi.Properties.Resources.无效;
|
||||
e.FormattingApplied = true;
|
||||
}
|
||||
}
|
||||
else if (e.ColumnIndex == this.dgvAxisPos.Columns["SafeLock"].Index && e.Value != null)
|
||||
{
|
||||
bool safeLock = (bool)e.Value;
|
||||
if (safeLock) // 根据条件判断
|
||||
{
|
||||
e.CellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
e.Value = global::CowainHmi.Properties.Resources.无效;
|
||||
e.FormattingApplied = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.CellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
e.Value = global::CowainHmi.Properties.Resources.有效;
|
||||
e.FormattingApplied = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
147
CowainHmi/Axis/DlgAxisPosData.resx
Normal file
147
CowainHmi/Axis/DlgAxisPosData.resx
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="PosName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="SetPos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="SetVel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="InPos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="SafeLock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Teach.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Goto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Edit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Safe.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
667
CowainHmi/Axis/DlgPosEdit.Designer.cs
generated
Normal file
667
CowainHmi/Axis/DlgPosEdit.Designer.cs
generated
Normal file
@@ -0,0 +1,667 @@
|
||||
namespace CowainHmi
|
||||
{
|
||||
partial class DlgPosEdit
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
PCHMI.InterLock interLock1 = new PCHMI.InterLock();
|
||||
PCHMI.DrawStyle drawStyle1 = new PCHMI.DrawStyle();
|
||||
PCHMI.OPTLOG optlog1 = new PCHMI.OPTLOG();
|
||||
PCHMI.GLINT glint1 = new PCHMI.GLINT();
|
||||
PCHMI.InterLock interLock2 = new PCHMI.InterLock();
|
||||
PCHMI.INFORM inform1 = new PCHMI.INFORM();
|
||||
PCHMI.InterLock interLock3 = new PCHMI.InterLock();
|
||||
PCHMI.DrawStyle drawStyle2 = new PCHMI.DrawStyle();
|
||||
PCHMI.OPTLOG optlog2 = new PCHMI.OPTLOG();
|
||||
PCHMI.GLINT glint2 = new PCHMI.GLINT();
|
||||
PCHMI.InterLock interLock4 = new PCHMI.InterLock();
|
||||
PCHMI.INFORM inform2 = new PCHMI.INFORM();
|
||||
PCHMI.InterLock interLock5 = new PCHMI.InterLock();
|
||||
PCHMI.DrawStyle drawStyle3 = new PCHMI.DrawStyle();
|
||||
PCHMI.OPTLOG optlog3 = new PCHMI.OPTLOG();
|
||||
PCHMI.ST_SW_IF sT_SW_IF1 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF2 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF3 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF4 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF5 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.GLINT glint3 = new PCHMI.GLINT();
|
||||
PCHMI.InterLock interLock6 = new PCHMI.InterLock();
|
||||
PCHMI.DrawStyle drawStyle4 = new PCHMI.DrawStyle();
|
||||
PCHMI.OPTLOG optlog4 = new PCHMI.OPTLOG();
|
||||
PCHMI.ST_SW_IF sT_SW_IF6 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF7 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF8 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF9 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.ST_SW_IF sT_SW_IF10 = new PCHMI.ST_SW_IF();
|
||||
PCHMI.GLINT glint4 = new PCHMI.GLINT();
|
||||
this.标签22 = new PCHMI.标签(this.components);
|
||||
this.txtTargetPos = new PCHMI.数据显示器();
|
||||
this.标签1 = new PCHMI.标签(this.components);
|
||||
this.txtTargetVel = new PCHMI.数据显示器();
|
||||
this.btnOk = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.lblUnit = new PCHMI.标签(this.components);
|
||||
this.lblUnit2 = new PCHMI.标签(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// 标签22
|
||||
//
|
||||
this.标签22.BackColor = System.Drawing.Color.Transparent;
|
||||
this.标签22.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.标签22.HDADDR = "";
|
||||
this.标签22.Image = null;
|
||||
this.标签22.Location = new System.Drawing.Point(10, 28);
|
||||
this.标签22.Name = "标签22";
|
||||
this.标签22.PLC = ((uint)(0u));
|
||||
this.标签22.Size = new System.Drawing.Size(94, 19);
|
||||
this.标签22.TabIndex = 581;
|
||||
this.标签22.Text = "目标位置";
|
||||
this.标签22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.标签22.Value = ((ulong)(0ul));
|
||||
interLock1.HDADDR = "";
|
||||
interLock1.PLC = ((uint)(0u));
|
||||
interLock1.互锁启用值 = ((uint)(1u));
|
||||
interLock1.互锁地址 = "";
|
||||
interLock1.互锁显示图标 = null;
|
||||
interLock1.互锁显示文本 = "LOCK";
|
||||
interLock1.互锁类型 = PCHMI.InterLock.DatType.BIT;
|
||||
this.标签22.互锁 = interLock1;
|
||||
this.标签22.允许输入 = false;
|
||||
this.标签22.前缀 = "";
|
||||
this.标签22.功能 = PCHMI.标签.TypeEnum.标签;
|
||||
this.标签22.后缀 = "";
|
||||
this.标签22.图片显示偏移量 = new System.Drawing.Point(0, 0);
|
||||
drawStyle1.圆角半径 = 15;
|
||||
drawStyle1.填充颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle1.按下颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle1.样式 = PCHMI.DrawStyle.STYPE.常规;
|
||||
drawStyle1.边框颜色 = System.Drawing.Color.LightGray;
|
||||
this.标签22.外观样式 = drawStyle1;
|
||||
this.标签22.字符串长度 = ((uint)(10u));
|
||||
this.标签22.安全级别 = ((uint)(0u));
|
||||
this.标签22.小数位数 = ((uint)(0u));
|
||||
this.标签22.开关功能.PLC = null;
|
||||
this.标签22.开关功能.地址 = null;
|
||||
this.标签22.开关功能.开关 = null;
|
||||
this.标签22.开关功能.扩展 = null;
|
||||
this.标签22.快捷键 = "";
|
||||
this.标签22.总显示位数 = ((uint)(8u));
|
||||
this.标签22.操作确认 = false;
|
||||
this.标签22.操作确认提示 = new string[] {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null};
|
||||
optlog1.按下 = "";
|
||||
optlog1.更改 = "";
|
||||
this.标签22.操作记录 = optlog1;
|
||||
this.标签22.数据类型 = PCHMI.标签.DatType.BIT;
|
||||
this.标签22.日期时间格式化 = "yyyy-MM-dd";
|
||||
this.标签22.显示内容.BkImg = null;
|
||||
this.标签22.显示内容.状态切换条件 = PCHMI.Employee.STSW.按序号值切换状态;
|
||||
this.标签22.显示内容.状态文本 = null;
|
||||
this.标签22.显示内容.默认状态文本ID = ((uint)(0u));
|
||||
this.标签22.最大值 = "100";
|
||||
this.标签22.最小值 = "0";
|
||||
this.标签22.权限提示文本 = "";
|
||||
this.标签22.空字符显示 = "null";
|
||||
this.标签22.语言 = ((uint)(0u));
|
||||
glint1.HDADDR = "";
|
||||
glint1.PLC = ((uint)(0u));
|
||||
glint1.位地址 = "";
|
||||
glint1.字体颜色 = System.Drawing.Color.Red;
|
||||
glint1.间隔时间 = ((ushort)(1000));
|
||||
this.标签22.闪烁 = glint1;
|
||||
this.标签22.默认字体颜色 = System.Drawing.Color.Black;
|
||||
//
|
||||
// txtTargetPos
|
||||
//
|
||||
this.txtTargetPos.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
|
||||
this.txtTargetPos.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.txtTargetPos.HDADDR = "";
|
||||
this.txtTargetPos.Location = new System.Drawing.Point(109, 24);
|
||||
this.txtTargetPos.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
|
||||
this.txtTargetPos.Name = "txtTargetPos";
|
||||
this.txtTargetPos.PLC = ((uint)(0u));
|
||||
this.txtTargetPos.Size = new System.Drawing.Size(91, 26);
|
||||
this.txtTargetPos.TabIndex = 582;
|
||||
this.txtTargetPos.Text = "0.00";
|
||||
this.txtTargetPos.Value = ((ulong)(0ul));
|
||||
interLock2.HDADDR = "";
|
||||
interLock2.PLC = ((uint)(0u));
|
||||
interLock2.互锁启用值 = ((uint)(1u));
|
||||
interLock2.互锁地址 = "";
|
||||
interLock2.互锁显示图标 = null;
|
||||
interLock2.互锁显示文本 = "LOCK";
|
||||
interLock2.互锁类型 = PCHMI.InterLock.DatType.BIT;
|
||||
this.txtTargetPos.互锁 = interLock2;
|
||||
this.txtTargetPos.回车后触发TAB键 = false;
|
||||
this.txtTargetPos.字符串长度 = ((uint)(10u));
|
||||
this.txtTargetPos.安全级别 = ((uint)(0u));
|
||||
this.txtTargetPos.小数位数 = ((uint)(2u));
|
||||
this.txtTargetPos.总显示位数 = ((uint)(8u));
|
||||
this.txtTargetPos.操作记录 = "";
|
||||
inform1.HDADDR = "";
|
||||
inform1.PLC = ((uint)(0u));
|
||||
inform1.Value = ((ulong)(1ul));
|
||||
inform1.类型 = PCHMI.INFORM.DatType.UINT16;
|
||||
this.txtTargetPos.操作通知 = inform1;
|
||||
this.txtTargetPos.数值改变事件参数 = "NULL";
|
||||
this.txtTargetPos.数据类型 = PCHMI.数据显示器.DatType.INT32;
|
||||
this.txtTargetPos.最大值 = "32000000";
|
||||
this.txtTargetPos.最小值 = "-30000000";
|
||||
this.txtTargetPos.权限提示文本 = "";
|
||||
this.txtTargetPos.输入方式 = PCHMI.数据显示器.INTYPE.软键盘;
|
||||
this.txtTargetPos.键盘输入事件参数 = "NULL";
|
||||
this.txtTargetPos.键盘进入方式 = PCHMI.数据显示器.KeyInMode.单击;
|
||||
this.txtTargetPos.零抑制 = false;
|
||||
this.txtTargetPos.零显示 = false;
|
||||
//
|
||||
// 标签1
|
||||
//
|
||||
this.标签1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.标签1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.标签1.HDADDR = "";
|
||||
this.标签1.Image = null;
|
||||
this.标签1.Location = new System.Drawing.Point(10, 70);
|
||||
this.标签1.Name = "标签1";
|
||||
this.标签1.PLC = ((uint)(0u));
|
||||
this.标签1.Size = new System.Drawing.Size(94, 19);
|
||||
this.标签1.TabIndex = 583;
|
||||
this.标签1.Text = "目标速度";
|
||||
this.标签1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.标签1.Value = ((ulong)(0ul));
|
||||
interLock3.HDADDR = "";
|
||||
interLock3.PLC = ((uint)(0u));
|
||||
interLock3.互锁启用值 = ((uint)(1u));
|
||||
interLock3.互锁地址 = "";
|
||||
interLock3.互锁显示图标 = null;
|
||||
interLock3.互锁显示文本 = "LOCK";
|
||||
interLock3.互锁类型 = PCHMI.InterLock.DatType.BIT;
|
||||
this.标签1.互锁 = interLock3;
|
||||
this.标签1.允许输入 = false;
|
||||
this.标签1.前缀 = "";
|
||||
this.标签1.功能 = PCHMI.标签.TypeEnum.标签;
|
||||
this.标签1.后缀 = "";
|
||||
this.标签1.图片显示偏移量 = new System.Drawing.Point(0, 0);
|
||||
drawStyle2.圆角半径 = 15;
|
||||
drawStyle2.填充颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle2.按下颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle2.样式 = PCHMI.DrawStyle.STYPE.常规;
|
||||
drawStyle2.边框颜色 = System.Drawing.Color.LightGray;
|
||||
this.标签1.外观样式 = drawStyle2;
|
||||
this.标签1.字符串长度 = ((uint)(10u));
|
||||
this.标签1.安全级别 = ((uint)(0u));
|
||||
this.标签1.小数位数 = ((uint)(0u));
|
||||
this.标签1.开关功能.PLC = null;
|
||||
this.标签1.开关功能.地址 = null;
|
||||
this.标签1.开关功能.开关 = null;
|
||||
this.标签1.开关功能.扩展 = null;
|
||||
this.标签1.快捷键 = "";
|
||||
this.标签1.总显示位数 = ((uint)(8u));
|
||||
this.标签1.操作确认 = false;
|
||||
this.标签1.操作确认提示 = new string[] {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null};
|
||||
optlog2.按下 = "";
|
||||
optlog2.更改 = "";
|
||||
this.标签1.操作记录 = optlog2;
|
||||
this.标签1.数据类型 = PCHMI.标签.DatType.BIT;
|
||||
this.标签1.日期时间格式化 = "yyyy-MM-dd";
|
||||
this.标签1.显示内容.BkImg = null;
|
||||
this.标签1.显示内容.状态切换条件 = PCHMI.Employee.STSW.按序号值切换状态;
|
||||
this.标签1.显示内容.状态文本 = null;
|
||||
this.标签1.显示内容.默认状态文本ID = ((uint)(0u));
|
||||
this.标签1.最大值 = "100";
|
||||
this.标签1.最小值 = "0";
|
||||
this.标签1.权限提示文本 = "";
|
||||
this.标签1.空字符显示 = "null";
|
||||
this.标签1.语言 = ((uint)(0u));
|
||||
glint2.HDADDR = "";
|
||||
glint2.PLC = ((uint)(0u));
|
||||
glint2.位地址 = "";
|
||||
glint2.字体颜色 = System.Drawing.Color.Red;
|
||||
glint2.间隔时间 = ((ushort)(1000));
|
||||
this.标签1.闪烁 = glint2;
|
||||
this.标签1.默认字体颜色 = System.Drawing.Color.Black;
|
||||
//
|
||||
// txtTargetVel
|
||||
//
|
||||
this.txtTargetVel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
|
||||
this.txtTargetVel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.txtTargetVel.HDADDR = "";
|
||||
this.txtTargetVel.Location = new System.Drawing.Point(109, 66);
|
||||
this.txtTargetVel.Margin = new System.Windows.Forms.Padding(27, 16, 27, 16);
|
||||
this.txtTargetVel.Name = "txtTargetVel";
|
||||
this.txtTargetVel.PLC = ((uint)(0u));
|
||||
this.txtTargetVel.Size = new System.Drawing.Size(91, 26);
|
||||
this.txtTargetVel.TabIndex = 584;
|
||||
this.txtTargetVel.Text = "0";
|
||||
this.txtTargetVel.Value = ((ulong)(0ul));
|
||||
interLock4.HDADDR = "";
|
||||
interLock4.PLC = ((uint)(0u));
|
||||
interLock4.互锁启用值 = ((uint)(1u));
|
||||
interLock4.互锁地址 = "";
|
||||
interLock4.互锁显示图标 = null;
|
||||
interLock4.互锁显示文本 = "LOCK";
|
||||
interLock4.互锁类型 = PCHMI.InterLock.DatType.BIT;
|
||||
this.txtTargetVel.互锁 = interLock4;
|
||||
this.txtTargetVel.回车后触发TAB键 = false;
|
||||
this.txtTargetVel.字符串长度 = ((uint)(10u));
|
||||
this.txtTargetVel.安全级别 = ((uint)(0u));
|
||||
this.txtTargetVel.小数位数 = ((uint)(0u));
|
||||
this.txtTargetVel.总显示位数 = ((uint)(8u));
|
||||
this.txtTargetVel.操作记录 = "";
|
||||
inform2.HDADDR = "";
|
||||
inform2.PLC = ((uint)(0u));
|
||||
inform2.Value = ((ulong)(1ul));
|
||||
inform2.类型 = PCHMI.INFORM.DatType.UINT16;
|
||||
this.txtTargetVel.操作通知 = inform2;
|
||||
this.txtTargetVel.数值改变事件参数 = "NULL";
|
||||
this.txtTargetVel.数据类型 = PCHMI.数据显示器.DatType.INT32;
|
||||
this.txtTargetVel.最大值 = "32000000";
|
||||
this.txtTargetVel.最小值 = "-30000000";
|
||||
this.txtTargetVel.权限提示文本 = "";
|
||||
this.txtTargetVel.输入方式 = PCHMI.数据显示器.INTYPE.软键盘;
|
||||
this.txtTargetVel.键盘输入事件参数 = "NULL";
|
||||
this.txtTargetVel.键盘进入方式 = PCHMI.数据显示器.KeyInMode.单击;
|
||||
this.txtTargetVel.零抑制 = false;
|
||||
this.txtTargetVel.零显示 = false;
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
this.btnOk.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnOk.Location = new System.Drawing.Point(28, 118);
|
||||
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(76, 44);
|
||||
this.btnOk.TabIndex = 586;
|
||||
this.btnOk.Text = "确定";
|
||||
this.btnOk.UseVisualStyleBackColor = true;
|
||||
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCancel.Location = new System.Drawing.Point(151, 118);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(76, 44);
|
||||
this.btnCancel.TabIndex = 588;
|
||||
this.btnCancel.Text = "取消";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// lblUnit
|
||||
//
|
||||
this.lblUnit.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblUnit.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lblUnit.ForeColor = System.Drawing.Color.Black;
|
||||
this.lblUnit.HDADDR = "";
|
||||
this.lblUnit.Image = null;
|
||||
this.lblUnit.Location = new System.Drawing.Point(205, 27);
|
||||
this.lblUnit.Name = "lblUnit";
|
||||
this.lblUnit.PLC = ((uint)(0u));
|
||||
this.lblUnit.Size = new System.Drawing.Size(72, 19);
|
||||
this.lblUnit.TabIndex = 590;
|
||||
this.lblUnit.Text = "mm";
|
||||
this.lblUnit.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblUnit.Value = ((ulong)(0ul));
|
||||
interLock5.HDADDR = "";
|
||||
interLock5.PLC = ((uint)(0u));
|
||||
interLock5.互锁启用值 = ((uint)(1u));
|
||||
interLock5.互锁地址 = "";
|
||||
interLock5.互锁显示图标 = null;
|
||||
interLock5.互锁显示文本 = "LOCK";
|
||||
interLock5.互锁类型 = PCHMI.InterLock.DatType.BIT;
|
||||
this.lblUnit.互锁 = interLock5;
|
||||
this.lblUnit.允许输入 = false;
|
||||
this.lblUnit.前缀 = "";
|
||||
this.lblUnit.功能 = PCHMI.标签.TypeEnum.指示;
|
||||
this.lblUnit.后缀 = "";
|
||||
this.lblUnit.图片显示偏移量 = new System.Drawing.Point(0, 0);
|
||||
drawStyle3.圆角半径 = 15;
|
||||
drawStyle3.填充颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle3.按下颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle3.样式 = PCHMI.DrawStyle.STYPE.常规;
|
||||
drawStyle3.边框颜色 = System.Drawing.Color.LightGray;
|
||||
this.lblUnit.外观样式 = drawStyle3;
|
||||
this.lblUnit.字符串长度 = ((uint)(10u));
|
||||
this.lblUnit.安全级别 = ((uint)(0u));
|
||||
this.lblUnit.小数位数 = ((uint)(0u));
|
||||
this.lblUnit.开关功能.PLC = null;
|
||||
this.lblUnit.开关功能.地址 = null;
|
||||
this.lblUnit.开关功能.开关 = null;
|
||||
this.lblUnit.开关功能.扩展 = null;
|
||||
this.lblUnit.快捷键 = "";
|
||||
this.lblUnit.总显示位数 = ((uint)(8u));
|
||||
this.lblUnit.操作确认 = false;
|
||||
this.lblUnit.操作确认提示 = new string[] {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null};
|
||||
optlog3.按下 = "";
|
||||
optlog3.更改 = "";
|
||||
this.lblUnit.操作记录 = optlog3;
|
||||
this.lblUnit.数据类型 = PCHMI.标签.DatType.INT16;
|
||||
this.lblUnit.日期时间格式化 = "yyyy-MM-dd";
|
||||
this.lblUnit.显示内容.BkImg = null;
|
||||
this.lblUnit.显示内容.状态切换条件 = PCHMI.Employee.STSW.按序号值切换状态;
|
||||
sT_SW_IF1.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF1.Img = null;
|
||||
sT_SW_IF1.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF1.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF1.Txt0 = "mm";
|
||||
sT_SW_IF1.Txt1 = "";
|
||||
sT_SW_IF1.Txt2 = "";
|
||||
sT_SW_IF1.Txt3 = "";
|
||||
sT_SW_IF1.Txt4 = "";
|
||||
sT_SW_IF1.Txt5 = "";
|
||||
sT_SW_IF1.Txt6 = "";
|
||||
sT_SW_IF1.Txt7 = "";
|
||||
sT_SW_IF1.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF1.TxtNumber = "";
|
||||
sT_SW_IF2.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF2.Img = null;
|
||||
sT_SW_IF2.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF2.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF2.Txt0 = "cm";
|
||||
sT_SW_IF2.Txt1 = "";
|
||||
sT_SW_IF2.Txt2 = "";
|
||||
sT_SW_IF2.Txt3 = "";
|
||||
sT_SW_IF2.Txt4 = "";
|
||||
sT_SW_IF2.Txt5 = "";
|
||||
sT_SW_IF2.Txt6 = "";
|
||||
sT_SW_IF2.Txt7 = "";
|
||||
sT_SW_IF2.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF2.TxtNumber = "";
|
||||
sT_SW_IF3.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF3.Img = null;
|
||||
sT_SW_IF3.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF3.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF3.Txt0 = "m";
|
||||
sT_SW_IF3.Txt1 = "";
|
||||
sT_SW_IF3.Txt2 = "";
|
||||
sT_SW_IF3.Txt3 = "";
|
||||
sT_SW_IF3.Txt4 = "";
|
||||
sT_SW_IF3.Txt5 = "";
|
||||
sT_SW_IF3.Txt6 = "";
|
||||
sT_SW_IF3.Txt7 = "";
|
||||
sT_SW_IF3.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF3.TxtNumber = "";
|
||||
sT_SW_IF4.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF4.Img = null;
|
||||
sT_SW_IF4.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF4.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF4.Txt0 = "deg";
|
||||
sT_SW_IF4.Txt1 = "";
|
||||
sT_SW_IF4.Txt2 = "";
|
||||
sT_SW_IF4.Txt3 = "";
|
||||
sT_SW_IF4.Txt4 = "";
|
||||
sT_SW_IF4.Txt5 = "";
|
||||
sT_SW_IF4.Txt6 = "";
|
||||
sT_SW_IF4.Txt7 = "";
|
||||
sT_SW_IF4.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF4.TxtNumber = "";
|
||||
sT_SW_IF5.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF5.Img = null;
|
||||
sT_SW_IF5.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF5.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF5.Txt0 = "rad";
|
||||
sT_SW_IF5.Txt1 = "";
|
||||
sT_SW_IF5.Txt2 = "";
|
||||
sT_SW_IF5.Txt3 = "";
|
||||
sT_SW_IF5.Txt4 = "";
|
||||
sT_SW_IF5.Txt5 = "";
|
||||
sT_SW_IF5.Txt6 = "";
|
||||
sT_SW_IF5.Txt7 = "";
|
||||
sT_SW_IF5.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF5.TxtNumber = "";
|
||||
this.lblUnit.显示内容.状态文本 = new PCHMI.ST_SW_IF[] {
|
||||
sT_SW_IF1,
|
||||
sT_SW_IF2,
|
||||
sT_SW_IF3,
|
||||
sT_SW_IF4,
|
||||
sT_SW_IF5};
|
||||
this.lblUnit.显示内容.默认状态文本ID = ((uint)(0u));
|
||||
this.lblUnit.最大值 = "100";
|
||||
this.lblUnit.最小值 = "0";
|
||||
this.lblUnit.权限提示文本 = "";
|
||||
this.lblUnit.空字符显示 = "null";
|
||||
this.lblUnit.语言 = ((uint)(0u));
|
||||
glint3.HDADDR = "";
|
||||
glint3.PLC = ((uint)(0u));
|
||||
glint3.位地址 = "";
|
||||
glint3.字体颜色 = System.Drawing.Color.Red;
|
||||
glint3.间隔时间 = ((ushort)(1000));
|
||||
this.lblUnit.闪烁 = glint3;
|
||||
this.lblUnit.默认字体颜色 = System.Drawing.Color.Black;
|
||||
//
|
||||
// lblUnit2
|
||||
//
|
||||
this.lblUnit2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblUnit2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.lblUnit2.ForeColor = System.Drawing.Color.Black;
|
||||
this.lblUnit2.HDADDR = "";
|
||||
this.lblUnit2.Image = null;
|
||||
this.lblUnit2.Location = new System.Drawing.Point(205, 70);
|
||||
this.lblUnit2.Name = "lblUnit2";
|
||||
this.lblUnit2.PLC = ((uint)(0u));
|
||||
this.lblUnit2.Size = new System.Drawing.Size(72, 19);
|
||||
this.lblUnit2.TabIndex = 591;
|
||||
this.lblUnit2.Text = "mm/s";
|
||||
this.lblUnit2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblUnit2.Value = ((ulong)(0ul));
|
||||
interLock6.HDADDR = "";
|
||||
interLock6.PLC = ((uint)(0u));
|
||||
interLock6.互锁启用值 = ((uint)(1u));
|
||||
interLock6.互锁地址 = "";
|
||||
interLock6.互锁显示图标 = null;
|
||||
interLock6.互锁显示文本 = "LOCK";
|
||||
interLock6.互锁类型 = PCHMI.InterLock.DatType.BIT;
|
||||
this.lblUnit2.互锁 = interLock6;
|
||||
this.lblUnit2.允许输入 = false;
|
||||
this.lblUnit2.前缀 = "";
|
||||
this.lblUnit2.功能 = PCHMI.标签.TypeEnum.指示;
|
||||
this.lblUnit2.后缀 = "";
|
||||
this.lblUnit2.图片显示偏移量 = new System.Drawing.Point(0, 0);
|
||||
drawStyle4.圆角半径 = 15;
|
||||
drawStyle4.填充颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle4.按下颜色 = System.Drawing.Color.Empty;
|
||||
drawStyle4.样式 = PCHMI.DrawStyle.STYPE.常规;
|
||||
drawStyle4.边框颜色 = System.Drawing.Color.LightGray;
|
||||
this.lblUnit2.外观样式 = drawStyle4;
|
||||
this.lblUnit2.字符串长度 = ((uint)(10u));
|
||||
this.lblUnit2.安全级别 = ((uint)(0u));
|
||||
this.lblUnit2.小数位数 = ((uint)(0u));
|
||||
this.lblUnit2.开关功能.PLC = null;
|
||||
this.lblUnit2.开关功能.地址 = null;
|
||||
this.lblUnit2.开关功能.开关 = null;
|
||||
this.lblUnit2.开关功能.扩展 = null;
|
||||
this.lblUnit2.快捷键 = "";
|
||||
this.lblUnit2.总显示位数 = ((uint)(8u));
|
||||
this.lblUnit2.操作确认 = false;
|
||||
this.lblUnit2.操作确认提示 = new string[] {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null};
|
||||
optlog4.按下 = "";
|
||||
optlog4.更改 = "";
|
||||
this.lblUnit2.操作记录 = optlog4;
|
||||
this.lblUnit2.数据类型 = PCHMI.标签.DatType.INT16;
|
||||
this.lblUnit2.日期时间格式化 = "yyyy-MM-dd";
|
||||
this.lblUnit2.显示内容.BkImg = null;
|
||||
this.lblUnit2.显示内容.状态切换条件 = PCHMI.Employee.STSW.按序号值切换状态;
|
||||
sT_SW_IF6.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF6.Img = null;
|
||||
sT_SW_IF6.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF6.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF6.Txt0 = "mm/s";
|
||||
sT_SW_IF6.Txt1 = "";
|
||||
sT_SW_IF6.Txt2 = "";
|
||||
sT_SW_IF6.Txt3 = "";
|
||||
sT_SW_IF6.Txt4 = "";
|
||||
sT_SW_IF6.Txt5 = "";
|
||||
sT_SW_IF6.Txt6 = "";
|
||||
sT_SW_IF6.Txt7 = "";
|
||||
sT_SW_IF6.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF6.TxtNumber = "";
|
||||
sT_SW_IF7.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF7.Img = null;
|
||||
sT_SW_IF7.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF7.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF7.Txt0 = "cm/s";
|
||||
sT_SW_IF7.Txt1 = "";
|
||||
sT_SW_IF7.Txt2 = "";
|
||||
sT_SW_IF7.Txt3 = "";
|
||||
sT_SW_IF7.Txt4 = "";
|
||||
sT_SW_IF7.Txt5 = "";
|
||||
sT_SW_IF7.Txt6 = "";
|
||||
sT_SW_IF7.Txt7 = "";
|
||||
sT_SW_IF7.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF7.TxtNumber = "";
|
||||
sT_SW_IF8.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF8.Img = null;
|
||||
sT_SW_IF8.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF8.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF8.Txt0 = "m/s";
|
||||
sT_SW_IF8.Txt1 = "";
|
||||
sT_SW_IF8.Txt2 = "";
|
||||
sT_SW_IF8.Txt3 = "";
|
||||
sT_SW_IF8.Txt4 = "";
|
||||
sT_SW_IF8.Txt5 = "";
|
||||
sT_SW_IF8.Txt6 = "";
|
||||
sT_SW_IF8.Txt7 = "";
|
||||
sT_SW_IF8.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF8.TxtNumber = "";
|
||||
sT_SW_IF9.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF9.Img = null;
|
||||
sT_SW_IF9.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF9.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF9.Txt0 = "deg/s";
|
||||
sT_SW_IF9.Txt1 = "";
|
||||
sT_SW_IF9.Txt2 = "";
|
||||
sT_SW_IF9.Txt3 = "";
|
||||
sT_SW_IF9.Txt4 = "";
|
||||
sT_SW_IF9.Txt5 = "";
|
||||
sT_SW_IF9.Txt6 = "";
|
||||
sT_SW_IF9.Txt7 = "";
|
||||
sT_SW_IF9.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF9.TxtNumber = "";
|
||||
sT_SW_IF10.BkColor = System.Drawing.Color.Transparent;
|
||||
sT_SW_IF10.Img = null;
|
||||
sT_SW_IF10.MaxVal = ((ulong)(0ul));
|
||||
sT_SW_IF10.MinVal = ((ulong)(0ul));
|
||||
sT_SW_IF10.Txt0 = "rad/s";
|
||||
sT_SW_IF10.Txt1 = "";
|
||||
sT_SW_IF10.Txt2 = "";
|
||||
sT_SW_IF10.Txt3 = "";
|
||||
sT_SW_IF10.Txt4 = "";
|
||||
sT_SW_IF10.Txt5 = "";
|
||||
sT_SW_IF10.Txt6 = "";
|
||||
sT_SW_IF10.Txt7 = "";
|
||||
sT_SW_IF10.TxtColor = System.Drawing.Color.Black;
|
||||
sT_SW_IF10.TxtNumber = "";
|
||||
this.lblUnit2.显示内容.状态文本 = new PCHMI.ST_SW_IF[] {
|
||||
sT_SW_IF6,
|
||||
sT_SW_IF7,
|
||||
sT_SW_IF8,
|
||||
sT_SW_IF9,
|
||||
sT_SW_IF10};
|
||||
this.lblUnit2.显示内容.默认状态文本ID = ((uint)(0u));
|
||||
this.lblUnit2.最大值 = "100";
|
||||
this.lblUnit2.最小值 = "0";
|
||||
this.lblUnit2.权限提示文本 = "";
|
||||
this.lblUnit2.空字符显示 = "null";
|
||||
this.lblUnit2.语言 = ((uint)(0u));
|
||||
glint4.HDADDR = "";
|
||||
glint4.PLC = ((uint)(0u));
|
||||
glint4.位地址 = "";
|
||||
glint4.字体颜色 = System.Drawing.Color.Red;
|
||||
glint4.间隔时间 = ((ushort)(1000));
|
||||
this.lblUnit2.闪烁 = glint4;
|
||||
this.lblUnit2.默认字体颜色 = System.Drawing.Color.Black;
|
||||
//
|
||||
// DlgPosEdit
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(287, 184);
|
||||
this.Controls.Add(this.lblUnit2);
|
||||
this.Controls.Add(this.lblUnit);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOk);
|
||||
this.Controls.Add(this.标签1);
|
||||
this.Controls.Add(this.txtTargetVel);
|
||||
this.Controls.Add(this.标签22);
|
||||
this.Controls.Add(this.txtTargetPos);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "DlgPosEdit";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "点位修改";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.DlgPosEdit_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private PCHMI.标签 标签22;
|
||||
private PCHMI.数据显示器 txtTargetPos;
|
||||
private PCHMI.标签 标签1;
|
||||
private PCHMI.数据显示器 txtTargetVel;
|
||||
private System.Windows.Forms.Button btnOk;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private PCHMI.标签 lblUnit;
|
||||
private PCHMI.标签 lblUnit2;
|
||||
}
|
||||
}
|
||||
59
CowainHmi/Axis/DlgPosEdit.cs
Normal file
59
CowainHmi/Axis/DlgPosEdit.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CowainHmi
|
||||
{
|
||||
public partial class DlgPosEdit : Form
|
||||
{
|
||||
private string posAddr;
|
||||
private string posName;
|
||||
private int id;
|
||||
private int posId;
|
||||
private int unit;
|
||||
public DlgPosEdit(string posName, string posAddr, int id, int posId, int unit)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Text = posName;
|
||||
this.posAddr = posAddr;
|
||||
this.posName = posName;
|
||||
this.id = id;
|
||||
this.posId = posId;
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
private async void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
PCHMI.RT.SEND_INT32(0, $"{posAddr}.{id * 384 + posId * 12}", (int)this.txtTargetPos.Value);
|
||||
PCHMI.RT.SEND_INT32(0, $"{posAddr}.{id * 384 + posId * 12 + 8}", (int)this.txtTargetVel.Value);
|
||||
await Task.Delay(300);
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private async void DlgPosEdit_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.lblUnit.Value = (ulong)unit;
|
||||
this.lblUnit2.Value = (ulong)unit;
|
||||
PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + posId * 12}");
|
||||
PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + posId * 12 + 8}");
|
||||
await Task.Delay(300);
|
||||
var pos = PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + posId * 12}");
|
||||
var vel = PCHMI.VL.GET_INT32(0, $"{posAddr}.{id * 384 + posId * 12 + 8}");
|
||||
this.txtTargetPos.Value = (ulong)pos;
|
||||
this.txtTargetVel.Value = (ulong)vel;
|
||||
}
|
||||
}
|
||||
}
|
||||
120
CowainHmi/Axis/DlgPosEdit.resx
Normal file
120
CowainHmi/Axis/DlgPosEdit.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user