1 Star 0 Fork 28

yaongt/SerialPortForward

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
HexAutoAnswer.cs 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
老大哥 提交于 2023-09-04 17:35 . feat: 增加自动回复的编辑
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 SerialPortForward
{
public partial class HexAutoAnswer : UserControl
{
public delegate void RemoveSelf(HexAutoAnswer hexAutoAnswer);
/// <summary>
/// 移除数据
/// </summary>
public event RemoveSelf RemoveSelfEvent;
/// <summary>
/// 是否全部是HEX数据
/// </summary>
public bool IsHex { get { return txtReceiv.IsHex() && txtReply.IsHex(); } }
/// <summary>
/// 收到HEX数据
/// </summary>
public string Receiv
{
get
{
return txtReceiv.Text;
}
set
{
txtReceiv.Text = value;
}
}
/// <summary>
/// 回复HEX数据
/// </summary>
public string Reply
{
get
{
return txtReply.Text;
}
set
{
txtReply.Text = value;
}
}
/// <summary>
/// 收到HEX数据
/// </summary>
public string ReceivHex
{
get
{
return txtReceiv.HexText;
}
}
/// <summary>
/// 回复HEX数据
/// </summary>
public string ReplyHex
{
get
{
return txtReply.HexText;
}
}
public HexAutoAnswer()
{
InitializeComponent();
}
public HexAutoAnswer(string Receiv, string Reply)
{
InitializeComponent();
txtReceiv.Text = Receiv;
txtReply.Text = Reply;
}
private void btnRemove_Click(object sender, EventArgs e)
{
RemoveSelfEvent?.Invoke(this);
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/yaongt/serial-port-forward.git
git@gitee.com:yaongt/serial-port-forward.git
yaongt
serial-port-forward
SerialPortForward
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385