| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraLayout; |
| | | using Yw; |
| | | using Yw.WinFrmUI; |
| | | |
| | |
| | | |
| | | public void HideButton() |
| | | { |
| | | simpleButton1.Visible = simpleButton2.Visible = false; |
| | | //simpleButton1.Visible = simpleButton2.Visible = false; |
| | | layoutControlItem2.Visibility = layoutControlItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; |
| | | } |
| | | |
| | | private void EboxFormLog_Load(object sender, EventArgs e) |
| | |
| | | public event EventHandler<string> SendData; |
| | | private void SendText(string content) |
| | | { |
| | | //BluetoothHelper.GetInstance().SendData(content); |
| | | SendData?.Invoke(null, content); |
| | | if (SendData != null) |
| | | { |
| | | SendData?.Invoke(null, content); |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (IBoxHelper.Ping()) |
| | | { |
| | | var smsg = content.Split(new string[] { IBoxHelper.paramCode, IBoxHelper.startCode }, StringSplitOptions.RemoveEmptyEntries); |
| | | if (smsg.Length < 2) |
| | | { |
| | | return; |
| | | } |
| | | switch (smsg[0].Trim()) |
| | | { |
| | | case IBoxHelper.getlogCode: |
| | | { |
| | | var order = IBoxHelper.HttpGet(content); |
| | | var result = IBoxHelper.GetContent(order); |
| | | if (!string.IsNullOrEmpty(result)) |
| | | { |
| | | var model = JsonHelper.Json2Object<List<IBoxLogViewModel>>(result); |
| | | BindData(model,false); |
| | | } |
| | | break; |
| | | } |
| | | default: |
| | | IBoxHelper.HttpGet(content); |
| | | break; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | MessageBoxHelper.ShowWarning("网络连接失败,请检查网络"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void simpleButton1_Click(object sender, EventArgs e) |
| | | { |
| | | Search(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询 |
| | | /// </summary> |
| | | public void Search() |
| | | { |
| | | //查询 |
| | | var m = new GetCalcValueModel() |
| | |
| | | |
| | | private void simpleButton2_Click(object sender, EventArgs e) |
| | | { |
| | | Clear(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空 |
| | | /// </summary> |
| | | public void Clear() |
| | | { |
| | | //清空 |
| | | this.Invoke(new Action(() => |
| | | { |