Compare commits
	
		
			5 Commits
		
	
	
		
			4b73deabf3
			...
			master
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | f0114e7b3f | ||
|   | 395102ffea | ||
|   | de709d7030 | ||
|   | 53e734f5e2 | ||
|   | 06499030a6 | 
| @@ -35,7 +35,7 @@ | |||||||
|     <WebPage>index.htm</WebPage> |     <WebPage>index.htm</WebPage> | ||||||
|     <TrustUrlParameters>true</TrustUrlParameters> |     <TrustUrlParameters>true</TrustUrlParameters> | ||||||
|     <ApplicationRevision>0</ApplicationRevision> |     <ApplicationRevision>0</ApplicationRevision> | ||||||
|     <ApplicationVersion>2025.03.25.0</ApplicationVersion> |     <ApplicationVersion>2025.05.01.0</ApplicationVersion> | ||||||
|     <UseApplicationTrust>false</UseApplicationTrust> |     <UseApplicationTrust>false</UseApplicationTrust> | ||||||
|     <CreateDesktopShortcut>true</CreateDesktopShortcut> |     <CreateDesktopShortcut>true</CreateDesktopShortcut> | ||||||
|     <PublishWizardCompleted>true</PublishWizardCompleted> |     <PublishWizardCompleted>true</PublishWizardCompleted> | ||||||
|   | |||||||
| @@ -58,13 +58,13 @@ namespace DDUtilityApp.LOGPARSER.DATA | |||||||
|         { |         { | ||||||
|             get |             get | ||||||
|             { |             { | ||||||
|                 string value = string.Empty; |                 //string value = string.Empty; | ||||||
|                 foreach(string name in  this.DisplayNameOrder.Split(';')) |                 //foreach(string name in  this.DisplayNameOrder.Split(';')) | ||||||
|                 { |                 //{ | ||||||
|                     value = this.PropertyGet(name); |                 //    value = this.PropertyGet(name).ToString(); | ||||||
|                     if (!string.IsNullOrEmpty(value)) break; |                 //    if (!string.IsNullOrEmpty(value)) break; | ||||||
|                 } |                 //} | ||||||
|                 return value; |                 return this.MesName; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -959,7 +959,6 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|                     logServer.NetworkAccount.Add("192.168.7.219", new Account("192.168.7.219", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.7.219", new Account("192.168.7.219", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     //logServer.NetworkAccount.Add("192.168.7.150", new Account("192.168.7.150", "T001084@DAEDUCK.COM", "daeduck!1", @"Vol2\EIS서버\")); |                     //logServer.NetworkAccount.Add("192.168.7.150", new Account("192.168.7.150", "T001084@DAEDUCK.COM", "daeduck!1", @"Vol2\EIS서버\")); | ||||||
|  |  | ||||||
|                     // B1 (Multi-NIC) |  | ||||||
|                     logServer.NetworkAccount.Add("192.168.115.214", new Account("192.168.7.214", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.115.214", new Account("192.168.7.214", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.115.215", new Account("192.168.7.215", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.115.215", new Account("192.168.7.215", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.115.216", new Account("192.168.7.216", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.115.216", new Account("192.168.7.216", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
| @@ -973,7 +972,6 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|                     logServer.NetworkAccount.Add("192.168.235.218", new Account("192.168.7.218", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.235.218", new Account("192.168.7.218", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.235.219", new Account("192.168.7.219", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.235.219", new Account("192.168.7.219", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|  |  | ||||||
|                     // B1.PLC |  | ||||||
|                     logServer.NetworkAccount.Add("192.168.113.231", new Account("192.168.113.231", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.113.231", new Account("192.168.113.231", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.113.232", new Account("192.168.113.232", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.113.232", new Account("192.168.113.232", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.113.233", new Account("192.168.113.233", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.113.233", new Account("192.168.113.233", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
| @@ -988,6 +986,10 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|                     logServer.NetworkAccount.Add("192.168.143.233", new Account("192.168.143.233", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.143.233", new Account("192.168.143.233", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.143.235", new Account("192.168.143.235", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.143.235", new Account("192.168.143.235", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|  |  | ||||||
|  |                     // B4, MTV | ||||||
|  |                     logServer.NetworkAccount.Add("192.168.163.232", new Account("192.168.163.232", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|  |                     logServer.NetworkAccount.Add("192.168.173.232", new Account("192.168.173.232", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|  |  | ||||||
|                     logServer.FTPAddress = "192.168.7.208"; |                     logServer.FTPAddress = "192.168.7.208"; | ||||||
|                     logServer.FTPPort = 7000; |                     logServer.FTPPort = 7000; | ||||||
|                     logServer.FTPUserID = "anonymous"; |                     logServer.FTPUserID = "anonymous"; | ||||||
| @@ -999,10 +1001,11 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|  |  | ||||||
|                     #region [ EIS.B2 ] |                     #region [ EIS.B2 ] | ||||||
|                     logServer = new LogServer("EIS.B2"); |                     logServer = new LogServer("EIS.B2"); | ||||||
|                     logServer.DBConnectionString = $@"server=192.168.8.217;database=EIS;uid=EIS_Service;pwd=Yi^d!3dqpc%m;"; |                     logServer.DBConnectionString = $@"server=192.168.8.214;database=EIS;uid=EIS_Service;pwd=Yi^d!3dqpc%m;"; | ||||||
|                     logServer.DBGetEquipments = sbEquipments.ToString(); |                     logServer.DBGetEquipments = sbEquipments.ToString(); | ||||||
|                     logServer.DBGetModelDetails = sbModelDetails.ToString(); |                     logServer.DBGetModelDetails = sbModelDetails.ToString(); | ||||||
|                     logServer.DBGetModelInfo = sbModelInfo.ToString(); |                     logServer.DBGetModelInfo = sbModelInfo.ToString(); | ||||||
|  |  | ||||||
|                     logServer.NetworkAccount.Add("192.168.8.215", new Account("192.168.8.215", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.8.215", new Account("192.168.8.215", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.8.216", new Account("192.168.8.216", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.8.216", new Account("192.168.8.216", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|                     logServer.NetworkAccount.Add("192.168.8.217", new Account("192.168.8.217", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); |                     logServer.NetworkAccount.Add("192.168.8.217", new Account("192.168.8.217", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS)); | ||||||
|   | |||||||
| @@ -34,6 +34,8 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|  |  | ||||||
|         private bool IsLogFolderOpen { get; set; } = false; |         private bool IsLogFolderOpen { get; set; } = false; | ||||||
|  |  | ||||||
|  |         private XLogger Logger { get; set; } = null; | ||||||
|  |  | ||||||
|         #endregion |         #endregion | ||||||
|  |  | ||||||
|         #region [ Properties ] ------------------------------------------------ |         #region [ Properties ] ------------------------------------------------ | ||||||
| @@ -75,6 +77,8 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|         public FrmLogParser() |         public FrmLogParser() | ||||||
|         { |         { | ||||||
|             InitializeComponent(); |             InitializeComponent(); | ||||||
|  |  | ||||||
|  |             XLogger.Instance = new XLogger("LogViewer"); | ||||||
|             this.SetLayout(); |             this.SetLayout(); | ||||||
|             this.SetEventHandler(); |             this.SetEventHandler(); | ||||||
|  |  | ||||||
| @@ -794,7 +798,7 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|  |  | ||||||
|                     string propertyName = values[0].Trim(); |                     string propertyName = values[0].Trim(); | ||||||
|                     string valueB = values[1].Trim().Replace("'", ""); |                     string valueB = values[1].Trim().Replace("'", ""); | ||||||
|                     string valueA = data.PropertyGet(propertyName); |                     string valueA = data.PropertyGet(propertyName).ToString(); | ||||||
|                     if (valueA != valueB) flag = false; |                     if (valueA != valueB) flag = false; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -566,7 +566,7 @@ namespace DDUtilityApp.LOGPARSER | |||||||
|  |  | ||||||
|                     string propertyName = values[0].Trim(); |                     string propertyName = values[0].Trim(); | ||||||
|                     string valueB = values[1].Trim().Replace("'", ""); |                     string valueB = values[1].Trim().Replace("'", ""); | ||||||
|                     string valueA = data.PropertyGet(propertyName); |                     string valueA = data.PropertyGet(propertyName).ToString(); | ||||||
|                     if (valueA != valueB) flag = false; |                     if (valueA != valueB) flag = false; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -609,11 +609,13 @@ namespace DDUtilityApp.LOGPARSER.PARSER | |||||||
|                     { |                     { | ||||||
|                         if (this.SECSDefine != null) this.SECSDefine.SetInformation(rootSECS); |                         if (this.SECSDefine != null) this.SECSDefine.SetInformation(rootSECS); | ||||||
|                         this.LogString_Append(rootSECS.ToFullString()); |                         this.LogString_Append(rootSECS.ToFullString()); | ||||||
|  |                         string ceid = string.Empty; | ||||||
|  |  | ||||||
|                         // CEID |                         // CEID | ||||||
|                         secsItem = rootSECS.GetItemByName("CEID").FirstOrDefault(); |                         secsItem = rootSECS.GetItemByName("CEID").FirstOrDefault(); | ||||||
|                         if (secsItem == null && rootSECS.ChildItems.Count == 3) secsItem = rootSECS[1]; |                         if (secsItem == null && rootSECS.ChildItems.Count == 3) secsItem = rootSECS[1]; | ||||||
|                         standardData.Value = $"CEID: {secsItem.Value}" + (string.IsNullOrEmpty(secsItem.Description) ? "" : $" {secsItem.Description}"); |                         standardData.Value = $"CEID: {secsItem.Value}" + (string.IsNullOrEmpty(secsItem.Description) ? "" : $" {secsItem.Description}"); | ||||||
|  |                         ceid = secsItem.Value; | ||||||
|  |  | ||||||
|                         // LOTID |                         // LOTID | ||||||
|                         secsItems = rootSECS.GetItemByName("LOT_ID", "LOTID", "LotID", "LEFT_LOTID", "RIGHT_LOTID"); |                         secsItems = rootSECS.GetItemByName("LOT_ID", "LOTID", "LotID", "LEFT_LOTID", "RIGHT_LOTID"); | ||||||
| @@ -675,6 +677,15 @@ namespace DDUtilityApp.LOGPARSER.PARSER | |||||||
|                             standardData.ModuleID += item.Value; |                             standardData.ModuleID += item.Value; | ||||||
|                         } |                         } | ||||||
|  |  | ||||||
|  |                         // 308:ModuleIn, 309:ModuleOut 'Name' 항목을 추가한다. | ||||||
|  |                         if (new string[] { "308", "309" }.Contains(ceid)) | ||||||
|  |                         secsItems = rootSECS.GetItemByName("NAME"); | ||||||
|  |                         foreach (SECSItem item in secsItems) | ||||||
|  |                         { | ||||||
|  |                             if (!string.IsNullOrEmpty(standardData.ModuleID)) standardData.HostPanelID += " "; | ||||||
|  |                             standardData.ModuleID += item.Value; | ||||||
|  |                         } | ||||||
|  |  | ||||||
|                         this.SendStandardData.Add(standardData.SystemByte, standardData); |                         this.SendStandardData.Add(standardData.SystemByte, standardData); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										49
									
								
								DDUtilityApp/MESDOWNLOADER/FrmServerLog.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										49
									
								
								DDUtilityApp/MESDOWNLOADER/FrmServerLog.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -28,7 +28,7 @@ | |||||||
|         /// </summary> |         /// </summary> | ||||||
|         private void InitializeComponent() |         private void InitializeComponent() | ||||||
|         { |         { | ||||||
|             Telerik.WinControls.UI.TableViewDefinition tableViewDefinition4 = new Telerik.WinControls.UI.TableViewDefinition(); |             Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition(); | ||||||
|             this.splitContainer1 = new System.Windows.Forms.SplitContainer(); |             this.splitContainer1 = new System.Windows.Forms.SplitContainer(); | ||||||
|             this.panel1 = new System.Windows.Forms.Panel(); |             this.panel1 = new System.Windows.Forms.Panel(); | ||||||
|             this.pnlAPList = new System.Windows.Forms.FlowLayoutPanel(); |             this.pnlAPList = new System.Windows.Forms.FlowLayoutPanel(); | ||||||
| @@ -43,6 +43,7 @@ | |||||||
|             this.splitContainer2 = new System.Windows.Forms.SplitContainer(); |             this.splitContainer2 = new System.Windows.Forms.SplitContainer(); | ||||||
|             this.treeFolder = new System.Windows.Forms.TreeView(); |             this.treeFolder = new System.Windows.Forms.TreeView(); | ||||||
|             this.gridFiles = new JWH.CONTROL.GridViewEx(); |             this.gridFiles = new JWH.CONTROL.GridViewEx(); | ||||||
|  |             this.chkMerge = new System.Windows.Forms.CheckBox(); | ||||||
|             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); |             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); | ||||||
|             this.splitContainer1.Panel1.SuspendLayout(); |             this.splitContainer1.Panel1.SuspendLayout(); | ||||||
|             this.splitContainer1.Panel2.SuspendLayout(); |             this.splitContainer1.Panel2.SuspendLayout(); | ||||||
| @@ -73,7 +74,7 @@ | |||||||
|             // splitContainer1.Panel2 |             // splitContainer1.Panel2 | ||||||
|             //  |             //  | ||||||
|             this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); |             this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); | ||||||
|             this.splitContainer1.Size = new System.Drawing.Size(794, 569); |             this.splitContainer1.Size = new System.Drawing.Size(987, 569); | ||||||
|             this.splitContainer1.SplitterDistance = 94; |             this.splitContainer1.SplitterDistance = 94; | ||||||
|             this.splitContainer1.TabIndex = 0; |             this.splitContainer1.TabIndex = 0; | ||||||
|             //  |             //  | ||||||
| @@ -84,21 +85,22 @@ | |||||||
|             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; |             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||||
|             this.panel1.Location = new System.Drawing.Point(0, 0); |             this.panel1.Location = new System.Drawing.Point(0, 0); | ||||||
|             this.panel1.Name = "panel1"; |             this.panel1.Name = "panel1"; | ||||||
|             this.panel1.Size = new System.Drawing.Size(794, 94); |             this.panel1.Size = new System.Drawing.Size(987, 94); | ||||||
|             this.panel1.TabIndex = 0; |             this.panel1.TabIndex = 0; | ||||||
|             //  |             //  | ||||||
|             // pnlAPList |             // pnlAPList | ||||||
|             //  |             //  | ||||||
|             this.pnlAPList.Dock = System.Windows.Forms.DockStyle.Fill; |             this.pnlAPList.Dock = System.Windows.Forms.DockStyle.Fill; | ||||||
|             this.pnlAPList.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; |             this.pnlAPList.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; | ||||||
|             this.pnlAPList.Location = new System.Drawing.Point(722, 0); |             this.pnlAPList.Location = new System.Drawing.Point(825, 0); | ||||||
|             this.pnlAPList.Name = "pnlAPList"; |             this.pnlAPList.Name = "pnlAPList"; | ||||||
|             this.pnlAPList.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0); |             this.pnlAPList.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0); | ||||||
|             this.pnlAPList.Size = new System.Drawing.Size(72, 94); |             this.pnlAPList.Size = new System.Drawing.Size(162, 94); | ||||||
|             this.pnlAPList.TabIndex = 1; |             this.pnlAPList.TabIndex = 1; | ||||||
|             //  |             //  | ||||||
|             // pnlCommand |             // pnlCommand | ||||||
|             //  |             //  | ||||||
|  |             this.pnlCommand.Controls.Add(this.chkMerge); | ||||||
|             this.pnlCommand.Controls.Add(this.btnDownPathOpen); |             this.pnlCommand.Controls.Add(this.btnDownPathOpen); | ||||||
|             this.pnlCommand.Controls.Add(this.btnDownPathChange); |             this.pnlCommand.Controls.Add(this.btnDownPathChange); | ||||||
|             this.pnlCommand.Controls.Add(this.btnRefresh); |             this.pnlCommand.Controls.Add(this.btnRefresh); | ||||||
| @@ -109,13 +111,13 @@ | |||||||
|             this.pnlCommand.Dock = System.Windows.Forms.DockStyle.Left; |             this.pnlCommand.Dock = System.Windows.Forms.DockStyle.Left; | ||||||
|             this.pnlCommand.Location = new System.Drawing.Point(0, 0); |             this.pnlCommand.Location = new System.Drawing.Point(0, 0); | ||||||
|             this.pnlCommand.Name = "pnlCommand"; |             this.pnlCommand.Name = "pnlCommand"; | ||||||
|             this.pnlCommand.Size = new System.Drawing.Size(722, 94); |             this.pnlCommand.Size = new System.Drawing.Size(825, 94); | ||||||
|             this.pnlCommand.TabIndex = 0; |             this.pnlCommand.TabIndex = 0; | ||||||
|             //  |             //  | ||||||
|             // btnDownPathOpen |             // btnDownPathOpen | ||||||
|             //  |             //  | ||||||
|             this.btnDownPathOpen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); |             this.btnDownPathOpen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); | ||||||
|             this.btnDownPathOpen.Location = new System.Drawing.Point(622, 62); |             this.btnDownPathOpen.Location = new System.Drawing.Point(637, 63); | ||||||
|             this.btnDownPathOpen.Name = "btnDownPathOpen"; |             this.btnDownPathOpen.Name = "btnDownPathOpen"; | ||||||
|             this.btnDownPathOpen.Size = new System.Drawing.Size(90, 23); |             this.btnDownPathOpen.Size = new System.Drawing.Size(90, 23); | ||||||
|             this.btnDownPathOpen.TabIndex = 6; |             this.btnDownPathOpen.TabIndex = 6; | ||||||
| @@ -125,7 +127,7 @@ | |||||||
|             // btnDownPathChange |             // btnDownPathChange | ||||||
|             //  |             //  | ||||||
|             this.btnDownPathChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); |             this.btnDownPathChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); | ||||||
|             this.btnDownPathChange.Location = new System.Drawing.Point(622, 37); |             this.btnDownPathChange.Location = new System.Drawing.Point(637, 38); | ||||||
|             this.btnDownPathChange.Name = "btnDownPathChange"; |             this.btnDownPathChange.Name = "btnDownPathChange"; | ||||||
|             this.btnDownPathChange.Size = new System.Drawing.Size(90, 23); |             this.btnDownPathChange.Size = new System.Drawing.Size(90, 23); | ||||||
|             this.btnDownPathChange.TabIndex = 5; |             this.btnDownPathChange.TabIndex = 5; | ||||||
| @@ -135,7 +137,7 @@ | |||||||
|             // btnRefresh |             // btnRefresh | ||||||
|             //  |             //  | ||||||
|             this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); |             this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); | ||||||
|             this.btnRefresh.Location = new System.Drawing.Point(622, 10); |             this.btnRefresh.Location = new System.Drawing.Point(637, 11); | ||||||
|             this.btnRefresh.Name = "btnRefresh"; |             this.btnRefresh.Name = "btnRefresh"; | ||||||
|             this.btnRefresh.Size = new System.Drawing.Size(90, 23); |             this.btnRefresh.Size = new System.Drawing.Size(90, 23); | ||||||
|             this.btnRefresh.TabIndex = 4; |             this.btnRefresh.TabIndex = 4; | ||||||
| @@ -152,7 +154,7 @@ | |||||||
|             this.tboxDownPath.Multiline = true; |             this.tboxDownPath.Multiline = true; | ||||||
|             this.tboxDownPath.Name = "tboxDownPath"; |             this.tboxDownPath.Name = "tboxDownPath"; | ||||||
|             this.tboxDownPath.ScrollBars = System.Windows.Forms.ScrollBars.Both; |             this.tboxDownPath.ScrollBars = System.Windows.Forms.ScrollBars.Both; | ||||||
|             this.tboxDownPath.Size = new System.Drawing.Size(480, 47); |             this.tboxDownPath.Size = new System.Drawing.Size(495, 47); | ||||||
|             this.tboxDownPath.TabIndex = 3; |             this.tboxDownPath.TabIndex = 3; | ||||||
|             //  |             //  | ||||||
|             // label2 |             // label2 | ||||||
| @@ -171,7 +173,7 @@ | |||||||
|             this.cboxServer.FormattingEnabled = true; |             this.cboxServer.FormattingEnabled = true; | ||||||
|             this.cboxServer.Location = new System.Drawing.Point(136, 12); |             this.cboxServer.Location = new System.Drawing.Point(136, 12); | ||||||
|             this.cboxServer.Name = "cboxServer"; |             this.cboxServer.Name = "cboxServer"; | ||||||
|             this.cboxServer.Size = new System.Drawing.Size(480, 20); |             this.cboxServer.Size = new System.Drawing.Size(495, 20); | ||||||
|             this.cboxServer.TabIndex = 1; |             this.cboxServer.TabIndex = 1; | ||||||
|             //  |             //  | ||||||
|             // label1 |             // label1 | ||||||
| @@ -196,8 +198,8 @@ | |||||||
|             // splitContainer2.Panel2 |             // splitContainer2.Panel2 | ||||||
|             //  |             //  | ||||||
|             this.splitContainer2.Panel2.Controls.Add(this.gridFiles); |             this.splitContainer2.Panel2.Controls.Add(this.gridFiles); | ||||||
|             this.splitContainer2.Size = new System.Drawing.Size(794, 471); |             this.splitContainer2.Size = new System.Drawing.Size(987, 471); | ||||||
|             this.splitContainer2.SplitterDistance = 264; |             this.splitContainer2.SplitterDistance = 328; | ||||||
|             this.splitContainer2.TabIndex = 0; |             this.splitContainer2.TabIndex = 0; | ||||||
|             //  |             //  | ||||||
|             // treeFolder |             // treeFolder | ||||||
| @@ -205,7 +207,7 @@ | |||||||
|             this.treeFolder.Dock = System.Windows.Forms.DockStyle.Fill; |             this.treeFolder.Dock = System.Windows.Forms.DockStyle.Fill; | ||||||
|             this.treeFolder.Location = new System.Drawing.Point(0, 0); |             this.treeFolder.Location = new System.Drawing.Point(0, 0); | ||||||
|             this.treeFolder.Name = "treeFolder"; |             this.treeFolder.Name = "treeFolder"; | ||||||
|             this.treeFolder.Size = new System.Drawing.Size(264, 471); |             this.treeFolder.Size = new System.Drawing.Size(328, 471); | ||||||
|             this.treeFolder.TabIndex = 0; |             this.treeFolder.TabIndex = 0; | ||||||
|             //  |             //  | ||||||
|             // gridFiles |             // gridFiles | ||||||
| @@ -217,20 +219,30 @@ | |||||||
|             //  |             //  | ||||||
|             //  |             //  | ||||||
|             //  |             //  | ||||||
|             this.gridFiles.MasterTemplate.ViewDefinition = tableViewDefinition4; |             this.gridFiles.MasterTemplate.ViewDefinition = tableViewDefinition1; | ||||||
|             this.gridFiles.Name = "gridViewEx1"; |             this.gridFiles.Name = "gridFiles"; | ||||||
|             //  |             //  | ||||||
|             //  |             //  | ||||||
|             //  |             //  | ||||||
|             this.gridFiles.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 240, 150); |             this.gridFiles.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 240, 150); | ||||||
|             this.gridFiles.Size = new System.Drawing.Size(526, 471); |             this.gridFiles.Size = new System.Drawing.Size(655, 471); | ||||||
|             this.gridFiles.TabIndex = 0; |             this.gridFiles.TabIndex = 0; | ||||||
|             //  |             //  | ||||||
|  |             // chkMerge | ||||||
|  |             //  | ||||||
|  |             this.chkMerge.AutoSize = true; | ||||||
|  |             this.chkMerge.Location = new System.Drawing.Point(734, 15); | ||||||
|  |             this.chkMerge.Name = "chkMerge"; | ||||||
|  |             this.chkMerge.Size = new System.Drawing.Size(60, 16); | ||||||
|  |             this.chkMerge.TabIndex = 7; | ||||||
|  |             this.chkMerge.Text = "Merge"; | ||||||
|  |             this.chkMerge.UseVisualStyleBackColor = true; | ||||||
|  |             //  | ||||||
|             // FrmServerLog |             // FrmServerLog | ||||||
|             //  |             //  | ||||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); |             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||||
|             this.ClientSize = new System.Drawing.Size(800, 575); |             this.ClientSize = new System.Drawing.Size(993, 575); | ||||||
|             this.Controls.Add(this.splitContainer1); |             this.Controls.Add(this.splitContainer1); | ||||||
|             this.Name = "FrmServerLog"; |             this.Name = "FrmServerLog"; | ||||||
|             this.Padding = new System.Windows.Forms.Padding(3); |             this.Padding = new System.Windows.Forms.Padding(3); | ||||||
| @@ -268,5 +280,6 @@ | |||||||
|         private System.Windows.Forms.Button btnRefresh; |         private System.Windows.Forms.Button btnRefresh; | ||||||
|         private System.Windows.Forms.TreeView treeFolder; |         private System.Windows.Forms.TreeView treeFolder; | ||||||
|         private JWH.CONTROL.GridViewEx gridFiles; |         private JWH.CONTROL.GridViewEx gridFiles; | ||||||
|  |         private System.Windows.Forms.CheckBox chkMerge; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -7,6 +7,7 @@ using System.Configuration; | |||||||
| using System.Data; | using System.Data; | ||||||
| using System.Diagnostics; | using System.Diagnostics; | ||||||
| using System.Drawing; | using System.Drawing; | ||||||
|  | using System.IO; | ||||||
| using System.Linq; | using System.Linq; | ||||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||||
| using System.Windows.Forms; | using System.Windows.Forms; | ||||||
| @@ -162,6 +163,8 @@ namespace DDUtilityApp.MESDOWNLOADER | |||||||
|  |  | ||||||
|                     DataRow[] rows = this.DSSetting.Tables["Item"].Select($"Server_Id='{server_Id}' AND name='{nameap}'"); |                     DataRow[] rows = this.DSSetting.Tables["Item"].Select($"Server_Id='{server_Id}' AND name='{nameap}'"); | ||||||
|                     foreach (DataRow row in rows) |                     foreach (DataRow row in rows) | ||||||
|  |                     { | ||||||
|  |                         try | ||||||
|                         { |                         { | ||||||
|                             string url = row["url"] as string; |                             string url = row["url"] as string; | ||||||
|                             string dir = row["dir"] as string; |                             string dir = row["dir"] as string; | ||||||
| @@ -191,6 +194,12 @@ namespace DDUtilityApp.MESDOWNLOADER | |||||||
|                                 this.DTFileInfo.Rows.Add(rowFile); |                                 this.DTFileInfo.Rows.Add(rowFile); | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|  |                         catch | ||||||
|  |                         { | ||||||
|  |                             chk.Checked = false; | ||||||
|  |                             chk.Enabled = false; | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 this.DTFileInfo.DefaultView.RowFilter = $"Type='Directory'"; |                 this.DTFileInfo.DefaultView.RowFilter = $"Type='Directory'"; | ||||||
| @@ -397,6 +406,8 @@ namespace DDUtilityApp.MESDOWNLOADER | |||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 // FileMerge |                 // FileMerge | ||||||
|  |                 if (this.chkMerge.Checked) | ||||||
|  |                 { | ||||||
|                     if (downloads.Count == 1) |                     if (downloads.Count == 1) | ||||||
|                     { |                     { | ||||||
|                         string fileName = downloads[0]; |                         string fileName = downloads[0]; | ||||||
| @@ -432,6 +443,21 @@ namespace DDUtilityApp.MESDOWNLOADER | |||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  |                 else | ||||||
|  |                 { | ||||||
|  |                     if (hasZip) | ||||||
|  |                     { | ||||||
|  |                         string path = System.IO.Path.Combine(this.tboxDownPath.Text, this.cboxServer.Text); | ||||||
|  |                         string command = $"/select,{path}"; | ||||||
|  |                         Process.Start($"explorer.exe", path); | ||||||
|  |                     } | ||||||
|  |                     else | ||||||
|  |                     { | ||||||
|  |                         foreach (string download in downloads) | ||||||
|  |                             System.Diagnostics.Process.Start(download); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|             catch (Exception ex) |             catch (Exception ex) | ||||||
|             { |             { | ||||||
|                 XLogger.Instance.Fatal(ex, true); |                 XLogger.Instance.Fatal(ex, true); | ||||||
| @@ -474,8 +500,15 @@ namespace DDUtilityApp.MESDOWNLOADER | |||||||
|         { |         { | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 string path = ConfigurationManager.AppSettings["BULK_VIEWER"]; |                 string srcFileName = ConfigurationManager.AppSettings["BULK_VIEWER"]; | ||||||
|                 this.DSSetting = XmlToDsConverter.ConvertXmlToDataSet(path); |                 string myFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "DDUtility", "ViewList.xml"); | ||||||
|  |                 if (!File.Exists(myFileName)) | ||||||
|  |                 { | ||||||
|  |                     if (!File.Exists(srcFileName)) throw new FileNotFoundException($"Source file not found: {srcFileName}"); | ||||||
|  |                     File.Copy(srcFileName, myFileName); | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 this.DSSetting = XmlToDsConverter.ConvertXmlToDataSet(myFileName); | ||||||
|                 if (this.DSSetting == null || this.DSSetting.Tables.Count < 1 || this.DSSetting.Tables.Contains("Server") == false) |                 if (this.DSSetting == null || this.DSSetting.Tables.Count < 1 || this.DSSetting.Tables.Contains("Server") == false) | ||||||
|                 { |                 { | ||||||
|                     MessageBox.Show("XML 데이터를 불러올 수 없습니다.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); |                     MessageBox.Show("XML 데이터를 불러올 수 없습니다.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||||||
|   | |||||||
| @@ -117,7 +117,4 @@ | |||||||
|   <resheader name="writer"> |   <resheader name="writer"> | ||||||
|     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||||||
|   </resheader> |   </resheader> | ||||||
|   <metadata name="gridFiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |  | ||||||
|     <value>17, 17</value> |  | ||||||
|   </metadata> |  | ||||||
| </root> | </root> | ||||||
| @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; | |||||||
| // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 | // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 | ||||||
| // 지정되도록 할 수 있습니다. | // 지정되도록 할 수 있습니다. | ||||||
| // [assembly: AssemblyVersion("1.0.*")] | // [assembly: AssemblyVersion("1.0.*")] | ||||||
| [assembly: AssemblyVersion("2025.03.27.0")] | [assembly: AssemblyVersion("2025.05.01.0")] | ||||||
| [assembly: AssemblyFileVersion("2025.03.27.0")] | [assembly: AssemblyFileVersion("2025.05.01.0")] | ||||||
|   | |||||||
| @@ -6,9 +6,9 @@ | |||||||
|     <!--<appender-ref ref="database" />--> |     <!--<appender-ref ref="database" />--> | ||||||
|   </root> |   </root> | ||||||
|  |  | ||||||
|   <logger name="DEFAULT"> |   <logger name="LogViewer"> | ||||||
|     <level value="INFO"/> |     <level value="INFO"/> | ||||||
|     <appender-ref ref="DefaultRolling"/> |     <appender-ref ref="LogViewerRolling"/> | ||||||
|   </logger> |   </logger> | ||||||
|  |  | ||||||
|   <logger name="TibSimulator"> |   <logger name="TibSimulator"> | ||||||
| @@ -46,6 +46,23 @@ | |||||||
|     </layout> |     </layout> | ||||||
|   </appender> |   </appender> | ||||||
|  |  | ||||||
|  |   <appender name="LogViewerRolling" type="log4net.Appender.RollingFileAppender"> | ||||||
|  |     <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> | ||||||
|  |     <file type="log4net.Util.PatternString" value="%envFolderPath{MyDocuments}\DDUtility\Logs\LogViewer_" /> | ||||||
|  |     <!--<file type="log4net.Util.PatternString" value="X:\EIS서버\DDUtility\Logs\" />--> | ||||||
|  |     <datePattern value="yyyyMMdd'.log'" /> | ||||||
|  |     <maxSizeRollBackups value="50" /> | ||||||
|  |     <maximumFileSize value="10MB" /> | ||||||
|  |     <staticLogFileName value="false" /> | ||||||
|  |     <appendToFile value="true" /> | ||||||
|  |     <preserveLogFileNameExtension value="true"/> | ||||||
|  |     <rollingStyle value="Composite" /> | ||||||
|  |     <countDirection value="0" /> | ||||||
|  |     <layout type="log4net.Layout.PatternLayout"> | ||||||
|  |       <conversionPattern value="[%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff}] %level %logger %X{id} : %X{class}.%X{method}() %message%newline" /> | ||||||
|  |     </layout> | ||||||
|  |   </appender> | ||||||
|  |  | ||||||
|   <appender name="TibSimulator" type="log4net.Appender.RollingFileAppender"> |   <appender name="TibSimulator" type="log4net.Appender.RollingFileAppender"> | ||||||
|     <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> |     <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> | ||||||
|     <file type="log4net.Util.PatternString" value="%envFolderPath{MyDocuments}\DDUtility\Logs\TibSimulator_" /> |     <file type="log4net.Util.PatternString" value="%envFolderPath{MyDocuments}\DDUtility\Logs\TibSimulator_" /> | ||||||
|   | |||||||
| @@ -1,4 +1,6 @@ | |||||||
| using System; | using System; | ||||||
|  | using System.Collections; | ||||||
|  | using System.Collections.Concurrent; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
| using System.ComponentModel; | using System.ComponentModel; | ||||||
| using System.Data; | using System.Data; | ||||||
| @@ -17,49 +19,73 @@ namespace JWH | |||||||
|  |  | ||||||
|         public static bool IsDesignMode = LicenseManager.UsageMode == LicenseUsageMode.Designtime; |         public static bool IsDesignMode = LicenseManager.UsageMode == LicenseUsageMode.Designtime; | ||||||
|  |  | ||||||
|  |         /// <summary> | ||||||
|  |         /// 속성 정보를 캐싱하기 위한 사전입니다. | ||||||
|  |         /// </summary> | ||||||
|  |         private static readonly ConcurrentDictionary<Type, Dictionary<string, PropertyInfo>> PropertyCache = | ||||||
|  |             new ConcurrentDictionary<Type, Dictionary<string, PropertyInfo>>(); | ||||||
|  |  | ||||||
|  |         /// <summary> | ||||||
|  |         /// 주어진 타입의 속성 정보를 캐싱하여 반환합니다. | ||||||
|  |         /// </summary> | ||||||
|  |         /// <param name="type">대상 타입</param> | ||||||
|  |         /// <returns>속성 정보 사전</returns> | ||||||
|  |         private static Dictionary<string, PropertyInfo> GetCachedProperties(Type type) | ||||||
|  |         { | ||||||
|  |             return PropertyCache.GetOrAdd(type, t => | ||||||
|  |                 t.GetProperties().ToDictionary(p => p.Name, StringComparer.OrdinalIgnoreCase)); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         #region [ PropertiesCopy ] -------------------------------------------- |         #region [ PropertiesCopy ] -------------------------------------------- | ||||||
|  |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// 현재객체의 속성값을 대상객체의 속성에 복사합니다 |         /// 현재 객체의 속성 값을 대상 객체의 속성에 복사합니다. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         /// <param name="sender"></param> |         /// <param name="sender">원본 객체</param> | ||||||
|         /// <param name="dest">대상 객체</param> |         /// <param name="dest">대상 객체</param> | ||||||
|  |         /// <param name="overwrite">기존 값을 덮어쓸지 여부</param> | ||||||
|         public static void PropertiesCopy(this object sender, object dest, bool overwrite = true) |         public static void PropertiesCopy(this object sender, object dest, bool overwrite = true) | ||||||
|         { |         { | ||||||
|             try |             if (sender == null) throw new ArgumentNullException(nameof(sender)); | ||||||
|  |             if (dest == null) throw new ArgumentNullException(nameof(dest)); | ||||||
|  |  | ||||||
|  |             var sourceProperties = GetCachedProperties(sender.GetType()); | ||||||
|  |             var destProperties = GetCachedProperties(dest.GetType()); | ||||||
|  |  | ||||||
|  |             foreach (var sourceProp in sourceProperties) | ||||||
|             { |             { | ||||||
|                 foreach (PropertyInfo property in sender.GetType().GetProperties()) |                 if (!destProperties.TryGetValue(sourceProp.Key, out var destProp)) continue; | ||||||
|                 { |  | ||||||
|                     try |  | ||||||
|                     { |  | ||||||
|                         PropertyInfo destProp = dest.GetType().GetProperty(property.Name, property.PropertyType); |  | ||||||
|                         if (destProp == null || property.GetType() != destProp.GetType()) continue; |  | ||||||
|                         //if (!property.CanWrite) continue; |  | ||||||
|                 if (!destProp.CanWrite) continue; |                 if (!destProp.CanWrite) continue; | ||||||
|  |  | ||||||
|                         var destValue = destProp.GetValue(dest); |                 if (typeof(IList).IsAssignableFrom(sourceProp.Value.PropertyType)) | ||||||
|                         if (overwrite == false && destValue != null) continue; |                 { | ||||||
|  |                     var sourceList = sourceProp.Value.GetValue(sender) as IList; | ||||||
|  |                     if (sourceList == null) continue; | ||||||
|  |  | ||||||
|                         destProp.SetValue(dest, property.GetValue(sender)); |                     var destList = destProp.GetValue(dest) as IList ?? (IList)Activator.CreateInstance(sourceProp.Value.PropertyType); | ||||||
|                     } |                     if (overwrite) destList.Clear(); | ||||||
|                     catch (Exception ex) |  | ||||||
|  |                     foreach (var item in sourceList) | ||||||
|                     { |                     { | ||||||
|                         XLogger.Instance.Fatal(ex); |                         destList.Add(item); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|  |                     destProp.SetValue(dest, destList); | ||||||
|                 } |                 } | ||||||
|             } |                 else | ||||||
|             catch (Exception ex) |  | ||||||
|                 { |                 { | ||||||
|                 XLogger.Instance.Fatal(ex); |                     var sourceValue = sourceProp.Value.GetValue(sender); | ||||||
|                 throw ex; |                     if (!overwrite && destProp.GetValue(dest) != null) continue; | ||||||
|  |  | ||||||
|  |                     destProp.SetValue(dest, sourceValue); | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// 현재객체의 속성값을 대상객체의 속성에 복사합니다 |         /// DataTable의 데이터를 대상 객체의 속성에 복사합니다. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         /// <param name="sender"></param> |         /// <param name="sender">원본 DataTable</param> | ||||||
|         /// <param name="dest">대상 객체</param> |         /// <param name="dest">대상 객체</param> | ||||||
|         public static void PropertiesCopy(this DataTable sender, object dest) |         public static void PropertiesCopy(this DataTable sender, object dest) | ||||||
|         { |         { | ||||||
| @@ -83,7 +109,6 @@ namespace JWH | |||||||
|                         catch |                         catch | ||||||
|                         { |                         { | ||||||
|                             // Object of type 'System.DBNull' cannot be converted to type 'System.String'. |                             // Object of type 'System.DBNull' cannot be converted to type 'System.String'. | ||||||
|                             // XLogger.Instance.Warn(ex); |  | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     catch (Exception ex) |                     catch (Exception ex) | ||||||
| @@ -100,10 +125,10 @@ namespace JWH | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// Dictionary<string, object>의 값을 대상객체의 속성에 복사합니다. |         /// Dictionary의 데이터를 대상 객체의 속성에 복사합니다. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         /// <param name="sender"></param> |         /// <param name="sender">원본 Dictionary</param> | ||||||
|         /// <param name="dest"></param> |         /// <param name="dest">대상 객체</param> | ||||||
|         public static void PropertiesCopy(this Dictionary<string, object> sender, object dest) |         public static void PropertiesCopy(this Dictionary<string, object> sender, object dest) | ||||||
|         { |         { | ||||||
|             try |             try | ||||||
| @@ -134,73 +159,149 @@ namespace JWH | |||||||
|  |  | ||||||
|         #endregion |         #endregion | ||||||
|  |  | ||||||
|  |         #region [ Property Set/Get ] ------------------------------------------ | ||||||
|  |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// value 값을 현재객체의 속성에 복사합니다. |         /// 주어진 값을 현재 객체의 속성에 설정합니다. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         /// <param name="sender"></param> |         /// <param name="sender">대상 객체</param> | ||||||
|         /// <param name="name"></param> |         /// <param name="name">속성 이름</param> | ||||||
|         /// <param name="value"></param> |         /// <param name="value">설정할 값</param> | ||||||
|         public static void PropertySet(this object sender, string name, object value) |         public static void PropertySet(this object sender, string name, object value) | ||||||
|         { |         { | ||||||
|             try |             PropertyInfo property; | ||||||
|  |             GetCachedProperties(sender.GetType()).TryGetValue(name, out property); | ||||||
|  |             if (property == null || !property.CanWrite) return; | ||||||
|  |  | ||||||
|  |             if (value != null && property.PropertyType != value.GetType()) | ||||||
|             { |             { | ||||||
|                 PropertyInfo property = sender.GetType().GetProperty(name); |                 value = Convert.ChangeType(value, property.PropertyType); | ||||||
|                 if (property == null) |  | ||||||
|                     foreach (PropertyInfo item in sender.GetType().GetProperties()) |  | ||||||
|                         if (string.Compare(item.Name, name, true) == 0) |  | ||||||
|                         { |  | ||||||
|                             property = item; |  | ||||||
|                             break; |  | ||||||
|                         } |  | ||||||
|                 if (property == null) return; |  | ||||||
|                 if (property.PropertyType != value.GetType()) |  | ||||||
|                 { |  | ||||||
|                     try |  | ||||||
|                     { value = Convert.ChangeType(value, property.PropertyType); } |  | ||||||
|                     catch |  | ||||||
|                     { return; } |  | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             property.SetValue(sender, value); |             property.SetValue(sender, value); | ||||||
|         } |         } | ||||||
|             catch (Exception ex) |  | ||||||
|             { |  | ||||||
|                 XLogger.Instance.Fatal(ex); |  | ||||||
|                 throw ex; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// 객체의 속성값을 반환합니다. |         /// 객체의 특정 속성 값을 반환합니다. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         /// <param name="sender"></param> |         /// <param name="sender">대상 객체</param> | ||||||
|         /// <param name="name"></param> |         /// <param name="name">속성 이름</param> | ||||||
|         /// <returns></returns> |         /// <returns>속성 값</returns> | ||||||
|         public static string PropertyGet(this object sender, string name) |         public static object PropertyGet(this object sender, string name) | ||||||
|  |         { | ||||||
|  |             PropertyInfo property; | ||||||
|  |             GetCachedProperties(sender.GetType()).TryGetValue(name, out property); | ||||||
|  |             return property?.GetValue(sender); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         #endregion | ||||||
|  |  | ||||||
|  |         #region [ ToClass() ] ------------------------------------------------- | ||||||
|  |  | ||||||
|  |         /// <summary> | ||||||
|  |         /// DataTable을 제네릭 객체 리스트로 변환합니다. | ||||||
|  |         /// </summary> | ||||||
|  |         /// <typeparam name="T">제네릭 객체 타입</typeparam> | ||||||
|  |         /// <param name="dataTable">원본 DataTable</param> | ||||||
|  |         /// <returns>제네릭 객체 배열</returns> | ||||||
|  |         public static T[] ToClass<T>(this DataTable dataTable) where T : class, new() | ||||||
|  |         { | ||||||
|  |             var properties = GetCachedProperties(typeof(T)); | ||||||
|  |             var list = new List<T>(); | ||||||
|  |  | ||||||
|  |             foreach (DataRow row in dataTable.Rows) | ||||||
|  |             { | ||||||
|  |                 var obj = new T(); | ||||||
|  |                 foreach (var prop in properties) | ||||||
|  |                 { | ||||||
|  |                     if (!dataTable.Columns.Contains(prop.Key) || row[prop.Key] is DBNull) continue; | ||||||
|  |  | ||||||
|  |                     var value = Convert.ChangeType(row[prop.Key], prop.Value.PropertyType); | ||||||
|  |                     prop.Value.SetValue(obj, value); | ||||||
|  |                 } | ||||||
|  |                 list.Add(obj); | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |             return list.ToArray(); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         /// <param name="srcArray">원본 객체 배열</param> | ||||||
|  |         /// <returns>제네릭 객체 배열</returns> | ||||||
|  |         public static T[] ToClass<T>(this object[] srcArray) where T : class, new() | ||||||
|         { |         { | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 PropertyInfo property = sender.GetType().GetProperty(name); |                 List<T> list = new List<T>(); | ||||||
|                 if (property == null) |                 var desProperties = GetCachedProperties(typeof(T)); | ||||||
|  |  | ||||||
|  |                 foreach (object src in srcArray) | ||||||
|                 { |                 { | ||||||
|                     foreach (PropertyInfo item in sender.GetType().GetProperties()) |                     T des = new T(); | ||||||
|  |                     list.Add(des); | ||||||
|  |                     var srcProperties = GetCachedProperties(src.GetType()); | ||||||
|  |  | ||||||
|  |                     foreach (var srcProperty in srcProperties) | ||||||
|                     { |                     { | ||||||
|                         if (string.Compare(item.Name, name, true) == 0) |                         try | ||||||
|                         { |                         { | ||||||
|                             property = item; |                             if (!desProperties.TryGetValue(srcProperty.Key, out var desProperty)) continue; | ||||||
|                             break; |  | ||||||
|  |                             var srcValue = srcProperty.Value.GetValue(src); | ||||||
|  |                             if (srcProperty.Value.PropertyType != desProperty.PropertyType) | ||||||
|  |                             { | ||||||
|  |                                 srcValue = Convert.ChangeType(srcValue, desProperty.PropertyType); | ||||||
|                             } |                             } | ||||||
|                     } |  | ||||||
|                 } |                             desProperty.SetValue(des, srcValue); | ||||||
|                 if (property == null) return string.Empty; |  | ||||||
|                 return property.GetValue(sender)?.ToString(); |  | ||||||
|                         } |                         } | ||||||
|                         catch (Exception ex) |                         catch (Exception ex) | ||||||
|                         { |                         { | ||||||
|                 XLogger.Instance.Fatal(ex); |                             XLogger.Instance.Warn(ex); | ||||||
|                 return string.Empty; |  | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 return list.ToArray(); | ||||||
|  |             } | ||||||
|  |             catch { throw; } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         /// <param name="src">DataTable</param>   | ||||||
|  |         /// <returns>List with generic objects</returns>   | ||||||
|  |         public static T ToClass<T>(this object src) where T : class, new() | ||||||
|  |         { | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 T des = new T(); | ||||||
|  |                 var desProperties = GetCachedProperties(typeof(T)); | ||||||
|  |                 var srcProperties = GetCachedProperties(src.GetType()); | ||||||
|  |  | ||||||
|  |                 foreach (var srcProperty in srcProperties) | ||||||
|  |                 { | ||||||
|  |                     try | ||||||
|  |                     { | ||||||
|  |                         if (!desProperties.TryGetValue(srcProperty.Key, out var desProperty)) continue; | ||||||
|  |  | ||||||
|  |                         var srcValue = srcProperty.Value.GetValue(src); | ||||||
|  |                         if (srcProperty.Value.PropertyType != desProperty.PropertyType) | ||||||
|  |                         { | ||||||
|  |                             srcValue = Convert.ChangeType(srcValue, desProperty.PropertyType); | ||||||
|  |                         } | ||||||
|  |  | ||||||
|  |                         desProperty.SetValue(des, srcValue); | ||||||
|  |                     } | ||||||
|  |                     catch (Exception ex) | ||||||
|  |                     { | ||||||
|  |                         XLogger.Instance.Warn(ex); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 return des; | ||||||
|  |             } | ||||||
|  |             catch { throw; } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         #endregion | ||||||
|  |  | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// 객체의 메소드를 호출합니다. |         /// 객체의 메소드를 호출합니다. | ||||||
| @@ -352,141 +453,6 @@ namespace JWH | |||||||
|             return null; |             return null; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         #region [ ToClass() ] ------------------------------------------------- |  | ||||||
|  |  | ||||||
|         /// <summary> |  | ||||||
|         /// Converts a DataTable to a list with generic objects |  | ||||||
|         /// dataTable.ToClass<Employee>(); |  | ||||||
|         /// </summary> |  | ||||||
|         /// <typeparam name="T">Generic object</typeparam> |  | ||||||
|         /// <param name="dataTable">DataTable</param> |  | ||||||
|         /// <returns>List with generic objects</returns> |  | ||||||
|         public static T[] ToClass<T>(this DataTable dataTable) where T : class, new() |  | ||||||
|         { |  | ||||||
|             try |  | ||||||
|             { |  | ||||||
|                 List<T> list = new List<T>(); |  | ||||||
|                 foreach (var row in dataTable.AsEnumerable()) |  | ||||||
|                 { |  | ||||||
|                     T obj = new T(); |  | ||||||
|  |  | ||||||
|                     foreach (PropertyInfo property in obj.GetType().GetProperties()) |  | ||||||
|                     { |  | ||||||
|                         try |  | ||||||
|                         { |  | ||||||
|                             if (dataTable.Columns.Contains(property.Name) == false) continue; |  | ||||||
|                             if (row[property.Name] is System.DBNull) continue; |  | ||||||
|  |  | ||||||
|                             var val = row[property.Name]; |  | ||||||
|                             //if (property.PropertyType == typeof(DateTime) && val.GetType() == typeof(string)) |  | ||||||
|                             //    DateTime.TryParse(val.ToString(), out val); |  | ||||||
|  |  | ||||||
|                             property.SetValue(obj, Convert.ChangeType(val, property.PropertyType, CultureInfo.CurrentCulture), null); |  | ||||||
|                         } |  | ||||||
|                         catch |  | ||||||
|                         { |  | ||||||
|                             continue; |  | ||||||
|                         } |  | ||||||
|                     } |  | ||||||
|  |  | ||||||
|                     list.Add(obj); |  | ||||||
|                 } |  | ||||||
|  |  | ||||||
|                 return list.ToArray(); |  | ||||||
|             } |  | ||||||
|             catch { throw; } |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         /// <summary> |  | ||||||
|         /// Converts a object to a list with generic objects |  | ||||||
|         /// dataTable.ToClass<Employee>(); |  | ||||||
|         /// </summary> |  | ||||||
|         /// <typeparam name="T">Generic object</typeparam> |  | ||||||
|         /// <param name="src">DataTable</param> |  | ||||||
|         /// <returns>List with generic objects</returns> |  | ||||||
|         public static T ToClass<T>(this object src) where T : class, new() |  | ||||||
|         { |  | ||||||
|             try |  | ||||||
|             { |  | ||||||
|                 T des = new T(); |  | ||||||
|                 Type desType = des.GetType(); |  | ||||||
|                 Type srcType = src.GetType(); |  | ||||||
|                 foreach (PropertyInfo srcProperty in srcType.GetProperties()) |  | ||||||
|                 { |  | ||||||
|                     try |  | ||||||
|                     { |  | ||||||
|                         PropertyInfo desProperty = desType.GetProperty(srcProperty.Name); |  | ||||||
|                         if (desProperty == null) continue; |  | ||||||
|  |  | ||||||
|                         var srcValue = srcProperty.GetValue(src); |  | ||||||
|                         if (srcProperty.PropertyType != desProperty.PropertyType) |  | ||||||
|                         { |  | ||||||
|                             srcValue = Convert.ChangeType(srcValue, desProperty.PropertyType); |  | ||||||
|                         } |  | ||||||
|  |  | ||||||
|                         desProperty.SetValue(des, srcValue); |  | ||||||
|                     } |  | ||||||
|                     catch (Exception ex) |  | ||||||
|                     { |  | ||||||
|                         XLogger.Instance.Warn(ex); |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|  |  | ||||||
|                 return des; |  | ||||||
|             } |  | ||||||
|             catch { throw; } |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         /// <summary> |  | ||||||
|         /// Converts a object to a list with generic objects |  | ||||||
|         /// dataTable.ToClass<Employee>(); |  | ||||||
|         /// </summary> |  | ||||||
|         /// <typeparam name="T">Generic object</typeparam> |  | ||||||
|         /// <param name="srcArray">DataTable</param> |  | ||||||
|         /// <returns>List with generic objects</returns> |  | ||||||
|         public static T[] ToClass<T>(this object[] srcArray) where T : class, new() |  | ||||||
|         { |  | ||||||
|             try |  | ||||||
|             { |  | ||||||
|                 List<T> list = new List<T>(); |  | ||||||
|  |  | ||||||
|                 foreach (object src in srcArray) |  | ||||||
|                 { |  | ||||||
|                     T des = new T(); |  | ||||||
|                     list.Add(des); |  | ||||||
|                     Type desType = des.GetType(); |  | ||||||
|  |  | ||||||
|                     Type srcType = src.GetType(); |  | ||||||
|                     foreach (PropertyInfo srcProperty in srcType.GetProperties()) |  | ||||||
|                     { |  | ||||||
|                         try |  | ||||||
|                         { |  | ||||||
|                             PropertyInfo desProperty = desType.GetProperty(srcProperty.Name); |  | ||||||
|                             if (desProperty == null) continue; |  | ||||||
|  |  | ||||||
|                             var srcValue = srcProperty.GetValue(src); |  | ||||||
|                             if (srcProperty.PropertyType != desProperty.PropertyType) |  | ||||||
|                             { |  | ||||||
|                                 srcValue = Convert.ChangeType(srcValue, desProperty.PropertyType); |  | ||||||
|                             } |  | ||||||
|  |  | ||||||
|                             desProperty.SetValue(des, srcValue); |  | ||||||
|                         } |  | ||||||
|                         catch (Exception ex) |  | ||||||
|                         { |  | ||||||
|                             XLogger.Instance.Warn(ex); |  | ||||||
|                         } |  | ||||||
|                     } |  | ||||||
|  |  | ||||||
|                 } |  | ||||||
|  |  | ||||||
|                 return list.ToArray(); |  | ||||||
|             } |  | ||||||
|             catch { throw; } |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         #endregion |  | ||||||
|  |  | ||||||
|         public static CultureInfo CultureInfo { get; set; } |         public static CultureInfo CultureInfo { get; set; } | ||||||
|  |  | ||||||
|         public static string ToTitleCase(this string sender) |         public static string ToTitleCase(this string sender) | ||||||
|   | |||||||
| @@ -1,29 +1,28 @@ | |||||||
| <log4net> | <log4net> | ||||||
|   <root> |   <root> | ||||||
|     <level value="DEBUG" /> |     <level value="DEBUG" /> | ||||||
|     <appender-ref ref="file" /> |     <appender-ref ref="Console" /> | ||||||
|     <!--<appender-ref ref="console" />--> |     <appender-ref ref="RollingFile" /> | ||||||
|     <!--<appender-ref ref="database" />--> |     <!--<appender-ref ref="database" />--> | ||||||
|   </root> |   </root> | ||||||
|  |  | ||||||
|   <appender name="console" type="log4net.Appender.ConsoleAppender"> |   <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||||||
|     <layout type="log4net.Layout.PatternLayout"> |     <layout type="log4net.Layout.PatternLayout"> | ||||||
|       <conversionPattern value="[%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff} %level] %logger %X{id} : %X{class}.%X{method}() %message%newline" /> |       <conversionPattern value="[%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff} %level] %logger %X{id} : %X{class}.%X{method}() %message%newline" /> | ||||||
|     </layout> |     </layout> | ||||||
|   </appender> |   </appender> | ||||||
|  |  | ||||||
|   <appender name="file" type="log4net.Appender.RollingFileAppender"> |   <appender name="LogViewerRolling" type="log4net.Appender.RollingFileAppender"> | ||||||
|     <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> |     <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> | ||||||
|  |     <file type="log4net.Util.PatternString" value="%envFolderPath{MyDocuments}\DDUtility\Logs\" /> | ||||||
|  |      | ||||||
|     <appendToFile value="true" /> |     <appendToFile value="true" /> | ||||||
|     <preserveLogFileNameExtension value="true"/> |     <preserveLogFileNameExtension value="true"/> | ||||||
|  |  | ||||||
|     <rollingStyle value="Composite" /> |     <rollingStyle value="Composite" /> | ||||||
|     <file type="log4net.Util.PatternString" value="Logs/" /> |  | ||||||
|     <datePattern value="yyyyMMdd'.log'" /> |     <datePattern value="yyyyMMdd'.log'" /> | ||||||
|     <maxSizeRollBackups value="100" /> |     <maxSizeRollBackups value="50" /> | ||||||
|     <maximumFileSize value="30MB" /> |     <maximumFileSize value="10MB" /> | ||||||
|     <staticLogFileName value="false" /> |     <staticLogFileName value="false" /> | ||||||
|  |  | ||||||
|     <layout type="log4net.Layout.PatternLayout"> |     <layout type="log4net.Layout.PatternLayout"> | ||||||
|       <conversionPattern value="[%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff} %level] %logger %X{id} : %X{class}.%X{method}() %message%newline" /> |       <conversionPattern value="[%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff} %level] %logger %X{id} : %X{class}.%X{method}() %message%newline" /> | ||||||
|     </layout> |     </layout> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user