From c071df44dce77350e4bb273a9a3a7bf6388115e5 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 03 七月 2025 14:16:30 +0800 Subject: [PATCH] 验退 --- DevApp/Gs.DevApp/XtraForm1.cs | 76 ++----------------------------------- 1 files changed, 5 insertions(+), 71 deletions(-) diff --git a/DevApp/Gs.DevApp/XtraForm1.cs b/DevApp/Gs.DevApp/XtraForm1.cs index 49e5a3e..c2a041c 100644 --- a/DevApp/Gs.DevApp/XtraForm1.cs +++ b/DevApp/Gs.DevApp/XtraForm1.cs @@ -1,17 +1,10 @@ -锘縰sing DevExpress.XtraEditors; -using DevExpress.XtraTreeList; -using Gs.DevApp.Entity; -using Gs.DevApp.ToolBox; -using Newtonsoft.Json; +锘縰sing Newtonsoft.Json.Linq; +using NModbus; using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; -using System.Linq; +using System.IO; +using System.Net.Sockets; using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; namespace Gs.DevApp { @@ -20,67 +13,8 @@ public XtraForm1() { InitializeComponent(); - tlMenu.ContextMenuStrip = contextMenuStrip1; - getTree(); - } - /// <summary> - /// 璇诲彇鍒楄〃 - /// </summary> - private void getTree() - { - var pgq = new PageQueryModel(1, 999999, "a.type_memo"); - var json = JsonConvert.SerializeObject(pgq); - try - { - var strReturn = - UtilityHelper.HttpPost("", "MesDefectTypeManager/GetListPage", json); - var dd = UtilityHelper.ReturnToTablePage(strReturn); - var dt = dd.rtnData.list; - tlMenu.DataSource = dt; - tlMenu.KeyFieldName = "guid"; - tlMenu.ParentFieldName = "upGuid"; - tlMenu.Tag = "typeMemo"; - tlMenu.EndUpdate(); - this.tlMenu.CollapseAll(); - tlMenu.OptionsBehavior.Editable = true; - tlMenu.OptionsBehavior.AllowRecursiveNodeChecking = false; - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } } - - private void tlMenu_MouseDown(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Right) - { - var hitInfo = tlMenu.CalcHitInfo(new Point(e.X, e.Y)); - if (hitInfo.HitInfoType == HitInfoType.Cell) - { - tlMenu.FocusedNode = hitInfo.Node; - contextMenuStrip1.Show(tlMenu, e.Location); - } - } - } - - private void toolStripMenuItem1_Click(object sender, EventArgs e) - { - if (tlMenu.FocusedNode != null) - { - // 鍒犻櫎鑺傜偣鐨勯�昏緫 - tlMenu.DeleteNode(tlMenu.FocusedNode); - } - } - - private void toolStripMenuItem2_Click(object sender, EventArgs e) - { - if (tlMenu.FocusedNode != null) - { - // 淇敼鑺傜偣鐨勯�昏緫锛屼緥濡傛洿鏀硅妭鐐瑰�� - tlMenu.FocusedNode.SetValue("鍒楀悕", "鏂板��"); // 鏇挎崲"鍒楀悕"鍜�"鏂板��"涓哄疄闄呭垪鍚嶅拰鍊� - } - } + } } \ No newline at end of file -- Gitblit v1.9.3