From aa64d5ff0554624339d504f926e955c0ce339b0b Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期一, 14 七月 2025 17:38:29 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/XtraForm1.cs |   86 +++---------------------------------------
 1 files changed, 7 insertions(+), 79 deletions(-)

diff --git a/DevApp/Gs.DevApp/XtraForm1.cs b/DevApp/Gs.DevApp/XtraForm1.cs
index ed2e775..b78e750 100644
--- a/DevApp/Gs.DevApp/XtraForm1.cs
+++ b/DevApp/Gs.DevApp/XtraForm1.cs
@@ -15,85 +15,13 @@
             InitializeComponent();
 
         }
+
+       
         /// <summary>
-        /// 鏄惁绗竴娆℃姇鍏�,0涓虹涓�娆℃姇鍏ワ紝1涓虹淮淇繃鏉ヨ鎶ュ簾鐨�2涓哄凡缁忔姤搴熻繃浜嗙殑锛�3杩斿伐杩囨潵閲嶆姇鐨�4娓呭熬宸ュ崟鐨勬姤搴�
+        /// 姘存
         /// </summary>
-        private string flagFirst = "0";  //鏄惁绗竴娆℃姇鍏�
-
-
-        private void simpleButton1_Click_1(object sender, EventArgs e)
-        {
-            AddDianJian();
-        }
-
-        //娣诲姞鐢垫鏁版嵁
-        private string AddDianJian()
-        {
-            string TM = "";
-            string JD = "";
-            string JY = "";
-            string JN = "";
-            string XL = "";
-            string GV = "";
-            string JDV = "";
-            string JYV = "";
-            string JNV = "";
-            string XLV = "";
-            string GVV = "";
-            //if (imaQAB009.EditValue.ToString() != VSLoginInfo.SystemParam["DianJianNo"].ToString())
-            //{
-            //    return "";
-            //}
-            //string sql = string.Format(@" select MIG006 from BASMIG(nolock) where MIG001='DianJianQuShu' and MIG003='{0}' and MIG005='Y'", txtDAA042.EditValue.ToString());
-            //DataTable dt = manager.GetDataTable(sql, "tmpBASMIG");
-            //if (dt == null || dt.Rows.Count <= 0)
-            //{
-            //    return "";
-            //}
-            try
-            {
-                //FileStream fs = new FileStream(dt.Rows[0][0].ToString(), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
-                //int fsLen = (int)fs.Length;
-                //byte[] heByte = new byte[fsLen];
-                //fs.Read(heByte, 0, heByte.Length);
-                //string myStr = System.Text.Encoding.Default.GetString(heByte);
-                //fs.Close();
-                string strPath = @"D:\uploadData.txt";
-                string myStr = File.ReadAllText(strPath, Encoding.Default);
-                if (myStr == "")
-                {
-                    return "NULL";
-                }
-                File.WriteAllText(strPath, "");
-                JArray dsTemp = JArray.Parse(myStr);
-
-                foreach (var ss in dsTemp)  //鏌ユ壘鏌愪釜瀛楁涓庡��
-                {
-                    TM = (((JObject)ss)["TiaoMa"] == null) ? "" : ((JObject)ss)["TiaoMa"].ToString();
-                    JD = (((JObject)ss)["JieDi"] == null) ? "" : ((JObject)ss)["JieDi"]["state"].ToString();
-                    JY = (((JObject)ss)["JueYuan"] == null) ? "" : ((JObject)ss)["JueYuan"]["state"].ToString();
-                    JN = (((JObject)ss)["JiaoNai"] == null) ? "" : ((JObject)ss)["JiaoNai"]["state"].ToString();
-                    XL = (((JObject)ss)["XieLou"] == null) ? "" : ((JObject)ss)["XieLou"]["state"].ToString();
-                    GV = (((JObject)ss)["GongLv"] == null) ? "" : ((JObject)ss)["GongLv"]["state"].ToString();
-                    JDV = (((JObject)ss)["JieDi"] == null) ? "" : ((JObject)ss)["JieDi"]["value"].ToString().Replace(" ", ", ");
-                    JYV = (((JObject)ss)["JueYuan"] == null) ? "" : ((JObject)ss)["JueYuan"]["value"].ToString().Replace(" ", ", ");
-                    JNV = (((JObject)ss)["JiaoNai"] == null) ? "" : ((JObject)ss)["JiaoNai"]["value"].ToString().Replace(" ", ", ");
-                    XLV = (((JObject)ss)["XieLou"] == null) ? "" : ((JObject)ss)["XieLou"]["value"].ToString().Replace(" ", ", ");
-                    GVV = (((JObject)ss)["GongLv"] == null) ? "" : ((JObject)ss)["GongLv"]["value"].ToString().Replace(" ", ", ");
-                    Gs.DevApp.ToolBox.LogHelper.Debug("TM", TM);
-                    Gs.DevApp.ToolBox.LogHelper.Debug("JD", JD);
-                    Gs.DevApp.ToolBox.LogHelper.Debug("JY", JY);
-                    Gs.DevApp.ToolBox.LogHelper.Debug("XL", XL);
-                    Gs.DevApp.ToolBox.LogHelper.Debug("XLV", XLV);
-                    Gs.DevApp.ToolBox.LogHelper.Debug("GVV", GVV);
-                }
-                return "宸查噰闆�";
-            }
-            catch (Exception e)
-            {
-                return "鏂囦欢鎵撳紑澶辫触," + e.Message;
-            }
-        }
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
 
         private void simpleButton2_Click(object sender, EventArgs e)
         {
@@ -159,7 +87,7 @@
 
                 // 3. 璇诲彇浠庣珯璁惧鐨勫瘎瀛樺櫒
                 ushort startAddress = 0;   // 瀵勫瓨鍣ㄨ捣濮嬪湴鍧�
-                ushort numRegisters = 100;  // 璇诲彇 10 涓瘎瀛樺櫒
+                ushort numRegisters = 125;  // 璇诲彇 10 涓瘎瀛樺櫒
                 try
                 {
                     // 璇诲彇淇濇寔瀵勫瓨鍣紙浠庣珯鍦板潃涓� 1锛�
@@ -169,7 +97,7 @@
                     foreach (var register in registers)
                     {
                         Console.WriteLine(register);
-                        stringBuilder.Append(register);
+                        stringBuilder.Append(register.ToString());
                     }
                     richTextBox1.Text = stringBuilder.ToString();
                 }

--
Gitblit v1.9.3