97 lines
2.7 KiB
C#
97 lines
2.7 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;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
|
|||
|
|
|||
|
namespace ProductionControl
|
|||
|
{
|
|||
|
public partial class FrmDebug3 : Form
|
|||
|
{
|
|||
|
SynchronizationContext SyncContext = null;
|
|||
|
public FrmDebug3( )
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
//获取UI线程同步上下文
|
|||
|
SyncContext = SynchronizationContext.Current;
|
|||
|
//init();
|
|||
|
|
|||
|
}
|
|||
|
private void FrmDebug3_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
//init();
|
|||
|
this.uiIOCard1.IOOutEvent = () =>
|
|||
|
{
|
|||
|
if (Config.HeightDevIOState)
|
|||
|
this.uiAxis1.stopNow();
|
|||
|
};
|
|||
|
}
|
|||
|
private void init()
|
|||
|
{
|
|||
|
this.uiAxis1.init();
|
|||
|
this.uiSmallAxisDev1.init();
|
|||
|
|
|||
|
this.uiIOCard1.init();
|
|||
|
this.uiIOCard1.IOOutEvent = () =>
|
|||
|
{
|
|||
|
if (Config.HeightDevIOState)
|
|||
|
this.uiAxis1.stopNow();
|
|||
|
};
|
|||
|
|
|||
|
//this.uiCodeScanner1.init();
|
|||
|
|
|||
|
this.uiLight1.init();
|
|||
|
|
|||
|
this.uiScanner1.init(Device.ScannerDev.ScannerType.GENTL);
|
|||
|
this.uiScanner2.init(Device.ScannerDev.ScannerType.CC);
|
|||
|
|
|||
|
this.uiTension1.init();
|
|||
|
this.uiHeightDev1.init();
|
|||
|
this.uiDefectLib1.init();
|
|||
|
this.uiSizeLib1.init();
|
|||
|
}
|
|||
|
|
|||
|
private void propertyGrid2_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
|
|||
|
{
|
|||
|
//其中包含了两个重要的属性:OldValue和ChangeItem。而ChangeItem则是“PropertyDescriptorGridEntry”类型。
|
|||
|
//一般可以通过ChangeItem的PropertyDescriptor的ComponentType查找到属性的实际类型。
|
|||
|
//而通过ChangeItem的Label,则可以查看到当前在属性编辑输入框中显示的值。
|
|||
|
//通过ChangeItem,基本可以处理所有的属性变化的处理
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
switch (tabControl1.SelectedTab.Text)
|
|||
|
{
|
|||
|
case "":
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
private void tsbtnOpenDev_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void tsbtnClose_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|