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.

76 lines
2.1 KiB
C#

using HalconDotNet;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json;
using Rs.Controls;
using Rs.Framework;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Flow;
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 Rs.MotionPlat.Commom.SchedulingMessageBox;
namespace Rs.MotionPlat.SysConfig
{
public partial class StartPosConfig : BaseForm
{
public StartPosConfig()
{
InitializeComponent();
}
private void StartPosConfig_Load(object sender, EventArgs e)
{
PositionHelper.BindPosition(groupBox1);
PositionHelper.BindPosition(groupBox2);
PositionHelper.BindPosition(groupBox3);
}
private void Teach_Click(object sender, EventArgs e)
{
PositionHelper.Teach(this, sender);
}
private void Move_Click(object sender, EventArgs e)
{
PositionHelper.Move2This(this, sender);
}
private void Stop_Click(object sender, MouseEventArgs e)
{
PositionHelper.Stop(sender);
}
string nozz = "NozzleR3";
private void button9_Click(object sender, EventArgs e)
{
bool b = Ops.IsHomedAndNearStartPos(nozz);
Msg.ShowInfo(b.ToString());
}
public void txtSysParam_KeyUp(object sender, KeyEventArgs e)
{
UpdateSysParam((TextBox)sender);
}
private void button10_Click(object sender, EventArgs e)
{
SchedulingMessageBox s = new SchedulingMessageBox();
s.ID = 111;
s.ButtonContexts = new Dictionary<ETipButton, string>() { { ETipButton.Retry, "abc"} };
s.Instruction = EInstruction.ShowMessage;
s.Message = "hello";
s.Button = SchedulingMessageBox.ETipButton.RetrySkip;
string content = JsonConvert.SerializeObject(s, new StringEnumConverter());
TestCenter.Instance.Send(content, Encoding.ASCII);
}
}
}