From 68d51f64d0f207b53b092aad1081f20ca3f061e1 Mon Sep 17 00:00:00 2001 From: T001084 Date: Thu, 27 Mar 2025 13:33:21 +0900 Subject: [PATCH] =?UTF-8?q?Ver=202025.03.25.0=20TibSimulator=20Patch::=20A?= =?UTF-8?q?utoReply=20Enable=EC=9D=98=20=EA=B2=BD=EC=9A=B0,=20=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EB=B0=95=EC=8A=A4=EC=97=90=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=ED=95=98=EC=A7=80=20=EC=95=8A=EA=B3=A0=20=EB=A9=94?= =?UTF-8?q?=EC=8B=9C=EC=A7=80=20=EC=A6=89=EC=8B=9C=EC=A0=84=EC=86=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DDUtilityApp/LOGPARSER/PARSER/EisParser0.cs | 5 +++ DDUtilityApp/Properties/AssemblyInfo.cs | 4 +- DDUtilityApp/TIBRENDEZVOUS/FrmSimulator01.cs | 40 +++++++++++--------- JWH/TIB/MessageParser.cs | 21 ++++++---- JWH/TIB/XmlData.cs | 2 +- JWH/TIB/XmlMessage.cs | 6 ++- 6 files changed, 48 insertions(+), 30 deletions(-) diff --git a/DDUtilityApp/LOGPARSER/PARSER/EisParser0.cs b/DDUtilityApp/LOGPARSER/PARSER/EisParser0.cs index 78caad8..f9cfe68 100644 --- a/DDUtilityApp/LOGPARSER/PARSER/EisParser0.cs +++ b/DDUtilityApp/LOGPARSER/PARSER/EisParser0.cs @@ -99,6 +99,7 @@ namespace DDUtilityApp.LOGPARSER.PARSER Parser parser = null; try { + // 0.LogLevel 1.DateTime 2.Server if (string.IsNullOrWhiteSpace(strLine)) return parser; if (strLine.Length < this.LogDTime.Length) return parser; string[] strValues = this.GetHeaderValues(strLine); @@ -132,6 +133,10 @@ namespace DDUtilityApp.LOGPARSER.PARSER { parser = this.MES_Parser; } + else if (strValues[2].Trim() == "TRACE") + { + return null; + } else if (strValues[2].Trim() == "ADD" || strValues[1].Trim() == "DISPOSE") { parser = this.TID_Parser; diff --git a/DDUtilityApp/Properties/AssemblyInfo.cs b/DDUtilityApp/Properties/AssemblyInfo.cs index 4f4be8f..18149b3 100644 --- a/DDUtilityApp/Properties/AssemblyInfo.cs +++ b/DDUtilityApp/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 // 지정되도록 할 수 있습니다. // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2025.03.25.0")] -[assembly: AssemblyFileVersion("2025.03.25.0")] +[assembly: AssemblyVersion("2025.03.27.0")] +[assembly: AssemblyFileVersion("2025.03.27.0")] diff --git a/DDUtilityApp/TIBRENDEZVOUS/FrmSimulator01.cs b/DDUtilityApp/TIBRENDEZVOUS/FrmSimulator01.cs index 38b33b5..69a949c 100644 --- a/DDUtilityApp/TIBRENDEZVOUS/FrmSimulator01.cs +++ b/DDUtilityApp/TIBRENDEZVOUS/FrmSimulator01.cs @@ -997,7 +997,6 @@ namespace DDUtilityApp.TIBRENDEZVOUS this.Logger.Info($"Started"); this.tboxSettingInfo.Text = sb.ToString(); - this.Text = $"TibSimulator - {this.cboxServer.Text} :: {this.cboxTarget.Text}"; List lstControls = new List(); lstControls.Add(this.gboxTransport.Controls); @@ -1113,26 +1112,23 @@ namespace DDUtilityApp.TIBRENDEZVOUS foreach (XmlMessage xmlReply in xmlReplys) { - this.cboxSendSubject.Text = xmlReply.XmlData.SendSubjectName; - this.tboxSendMessage.Text = xmlReply.XmlData.GetText(); - this.tboxSendMessage.Tag = xmlReply; - - xmlReply.SendSubject = this.cboxSendSubject.Text; - - if (xmlReply.IsReply && xmlReply.RequestMessage != null) - if (!string.IsNullOrEmpty(xmlReply.RequestMessage.ReplySubject)) this.SendButtons_Focus(this.btnSendReply); - else this.SendButtons_Focus(this.btnSend); - //else if (xmlReply.SendRequestFlag) this.SendButtons_Focus(this.btnSendRequest); - else this.SendButtons_Focus(this.btnSend); if (xmlReceived.XmlData.MessageName.ToLower().StartsWith("AreYouThereRequest".ToLower())) { if (this.chkSendAreYouThereReply.Checked) { this.TibRendezvous.SendMessage(xmlReply); - this.tboxSendMessage.Clear(); - this.tboxSendMessage.Tag = null; - return; + } + else + { + this.cboxSendSubject.Text = xmlReply.SendSubject; + this.tboxSendMessage.Text = xmlReply.XmlData.GetText(); + this.tboxSendMessage.Tag = xmlReply; + + if (xmlReply.IsReply && xmlReply.RequestMessage != null) + if (!string.IsNullOrEmpty(xmlReply.RequestMessage.ReplySubject)) this.SendButtons_Focus(this.btnSendReply); + else this.SendButtons_Focus(this.btnSend); + else this.SendButtons_Focus(this.btnSend); } } else @@ -1140,9 +1136,17 @@ namespace DDUtilityApp.TIBRENDEZVOUS if (this.chkSendReply.Checked) { this.TibRendezvous.SendMessage(xmlReply); - this.tboxSendMessage.Clear(); - this.tboxSendMessage.Tag = null; - return; + } + else + { + this.cboxSendSubject.Text = xmlReply.SendSubject; + this.tboxSendMessage.Text = xmlReply.XmlData.GetText(); + this.tboxSendMessage.Tag = xmlReply; + + if (xmlReply.IsReply && xmlReply.RequestMessage != null) + if (!string.IsNullOrEmpty(xmlReply.RequestMessage.ReplySubject)) this.SendButtons_Focus(this.btnSendReply); + else this.SendButtons_Focus(this.btnSend); + else this.SendButtons_Focus(this.btnSend); } } } diff --git a/JWH/TIB/MessageParser.cs b/JWH/TIB/MessageParser.cs index 1af6728..58dbcf7 100644 --- a/JWH/TIB/MessageParser.cs +++ b/JWH/TIB/MessageParser.cs @@ -60,8 +60,8 @@ namespace JWH.TIB XmlMessage xmlMessage = new XmlMessage(xmlData); if (isValueSetting) { - this.SetMessageValue(xmlMessage.XmlData.Header); - this.SetMessageValue(xmlMessage.XmlData.Body); + this.SetMessageBodyValue(xmlMessage.XmlData.Header); + this.SetMessageBodyValue(xmlMessage.XmlData.Body); } return xmlMessage; @@ -90,11 +90,11 @@ namespace JWH.TIB DirectoryInfo directoryInfo = new DirectoryInfo(this.PathMessageReply); foreach (FileInfo fileInfo in directoryInfo.GetFiles($"{xmlRequest.XmlData.MessageName}_*.xml")) { - StreamReader reader = new StreamReader(fileInfo.FullName, Encoding.UTF8, true); + StreamReader reader = new StreamReader(fileInfo.FullName, Encoding.Default, true); strReply = reader.ReadToEnd(); xmlReply = new XmlMessage(strReply); - xmlReply.SetRequstMessage(xmlRequest); - this.SetMessageValue(xmlReply.XmlData.Body, xmlRequest); + xmlReply.SetSubjectName(xmlRequest); + this.SetMessageBodyValue(xmlReply.XmlData.Body, xmlRequest); lstReply.Add(xmlReply); } @@ -131,8 +131,11 @@ namespace JWH.TIB XmlMessage xmlReply = new XmlMessage(xmlRequest.XmlData.GetText()); xmlReply.XmlData.MessageName += "Reply"; + xmlReply.XmlData.SendRequestFlag = false; xmlReply.XmlData.ReplySubjectName = xmlRequest.XmlData.SendSubjectName; xmlReply.XmlData.SendSubjectName = xmlRequest.XmlData.ReplySubjectName; + xmlReply.SendSubject = xmlReply.XmlData.SendSubjectName; + xmlReply.SendRequestFlag = xmlReply.XmlData.SendRequestFlag; xmlReply.RequestMessage = xmlRequest; if (xmlRequest.SendRequestFlag) xmlReply.IsReply = true; @@ -150,10 +153,12 @@ namespace JWH.TIB if (xmlRequest == null) return null; XmlMessage xmlReply = new XmlMessage(xmlRequest.XmlData.GetText()); - xmlReply.XmlData.SendRequestFlag = false; xmlReply.XmlData.MessageName += "Reply"; + xmlReply.XmlData.SendRequestFlag = false; xmlReply.XmlData.ReplySubjectName = xmlRequest.XmlData.SendSubjectName; xmlReply.XmlData.SendSubjectName = xmlRequest.XmlData.ReplySubjectName; + xmlReply.SendSubject = xmlReply.XmlData.SendSubjectName; + xmlReply.SendRequestFlag = xmlReply.XmlData.SendRequestFlag; XmlNode nodeReturn = xmlReply.XmlData.Message.CreateChildNode("return"); nodeReturn.CreateChildNode("returncode", "0"); @@ -176,7 +181,7 @@ namespace JWH.TIB /// /// /// RequestMessage - private void SetMessageValue(XmlNode node, XmlMessage srcMessage = null) + private void SetMessageBodyValue(XmlNode node, XmlMessage srcMessage = null) { // MessageValue(UI) if (node.GetText() == string.Empty) @@ -220,7 +225,7 @@ namespace JWH.TIB foreach (XmlNode child in node.ChildNodes) { if (child.GetType() == typeof(XmlText)) continue; - this.SetMessageValue(child, srcMessage); + this.SetMessageBodyValue(child, srcMessage); } } diff --git a/JWH/TIB/XmlData.cs b/JWH/TIB/XmlData.cs index 74d321d..af6befc 100644 --- a/JWH/TIB/XmlData.cs +++ b/JWH/TIB/XmlData.cs @@ -175,7 +175,7 @@ namespace JWH.TIB #region [ Method ] ==================================================== /// - /// FromString + /// 전달된 메시지(문자열)로 속성을 셋팅한다. /// /// public void FromString(string xmlData) diff --git a/JWH/TIB/XmlMessage.cs b/JWH/TIB/XmlMessage.cs index d32ba2a..e04de56 100644 --- a/JWH/TIB/XmlMessage.cs +++ b/JWH/TIB/XmlMessage.cs @@ -174,7 +174,11 @@ namespace JWH.TIB #region [ Public Method ] ============================================= - public void SetRequstMessage(XmlMessage xmlRequest) + /// + /// Set Value of SendSubject, ReplySubject + /// + /// + public void SetSubjectName(XmlMessage xmlRequest) { this.RequestMessage = xmlRequest; this.IsReply = true;