Compare commits
11 Commits
54fe8b0156
...
20250203_S
| Author | SHA1 | Date | |
|---|---|---|---|
| 00b3a5e643 | |||
| f43ffb1e30 | |||
| 9be4b773a5 | |||
| 0790ae42f9 | |||
| 0b7f4ba366 | |||
| 933519164e | |||
| f92e560e87 | |||
| fb46e2b17a | |||
| 8b39c28efb | |||
| f6d430550f | |||
| 3e9339195e |
@@ -6,8 +6,6 @@
|
||||
<appSettings>
|
||||
<add key="ClientSettingsProvider.ServiceUri" value=""/>
|
||||
<add key="BULK_VIEWER" value="ViewList.xml" />
|
||||
<!--jhlim 20250202 -->
|
||||
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
|
||||
@@ -313,6 +313,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DEFINE.cs" />
|
||||
<Compile Include="ETC\FrmTIbcoConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -479,6 +480,9 @@
|
||||
<Content Include="tibrvcm.dll" />
|
||||
<Content Include="tibrvcmq.dll" />
|
||||
<Content Include="tibrvft.dll" />
|
||||
<Content Include="ViewList.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="ETC\FrmTIbcoConfig.resx">
|
||||
<DependentUpon>FrmTIbcoConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
12
DDUtilityApp/DEFINE.cs
Normal file
12
DDUtilityApp/DEFINE.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DDUtilityApp
|
||||
{
|
||||
|
||||
public enum AccessType { SMB, FTP, FTPS, SFTP };
|
||||
|
||||
}
|
||||
@@ -19,6 +19,9 @@ namespace DDUtilityApp.LOGPARSER.DATA
|
||||
/// <summary>MES.FacilityName</summary>
|
||||
public string Facility { get; set; }
|
||||
|
||||
/// <summary>MES.FacilityName</summary>
|
||||
public string OrderByKey { get { return string.IsNullOrEmpty(this.Facility) ? "" : this.Facility.Substring(0, 2); } }
|
||||
|
||||
/// <summary>EIS.Line</summary>
|
||||
public string Line { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using DDUtilityApp.DATA;
|
||||
using JWH.DATA;
|
||||
|
||||
namespace DDUtilityApp.LOGPARSER.DATA
|
||||
@@ -10,31 +13,74 @@ namespace DDUtilityApp.LOGPARSER.DATA
|
||||
public class LogFile : DataTableBase
|
||||
{
|
||||
|
||||
public string Name { get; set; }
|
||||
private string m_FullName = string.Empty;
|
||||
|
||||
public Account Account { get; set; } = null;
|
||||
|
||||
public string FullName
|
||||
{
|
||||
get { return this.m_FullName; }
|
||||
set
|
||||
{
|
||||
this.m_FullName = value;
|
||||
this.DirectoryName = Path.GetDirectoryName(value);
|
||||
this.FileName = Path.GetFileName(value);
|
||||
this.Name = Path.GetFileNameWithoutExtension(value);
|
||||
this.Extension = Path.GetExtension(value);
|
||||
}
|
||||
}
|
||||
|
||||
public string DirectoryName { get; private set; }
|
||||
|
||||
public string FileName { get; private set; }
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
public string Extension { get; private set; }
|
||||
|
||||
public long Length { get; set; }
|
||||
|
||||
public string Extension { get; set; }
|
||||
|
||||
public string FullName { get; set; }
|
||||
|
||||
public DateTime CreationTime { get; set; }
|
||||
|
||||
public DateTime LastAccessTime { get; set; }
|
||||
|
||||
public DateTime LastWriteTime { get; set; }
|
||||
|
||||
public string DestFullName { get; set; }
|
||||
|
||||
public LogFile()
|
||||
{
|
||||
}
|
||||
|
||||
public LogFile(string fullName)
|
||||
{
|
||||
this.Name = System.IO.Path.GetFileNameWithoutExtension(fullName);
|
||||
this.FullName = fullName;
|
||||
this.Extension = System.IO.Path.GetExtension(fullName);
|
||||
}
|
||||
|
||||
public string GetFileSize(FileSizeType format = FileSizeType.Auto)
|
||||
{
|
||||
int index = 0;
|
||||
int nFormat = (int)format;
|
||||
double value = this.Length;
|
||||
for (index = 0; index < nFormat; index++)
|
||||
{
|
||||
if (format == FileSizeType.Auto && value < 1024) break;
|
||||
value /= 1024;
|
||||
}
|
||||
|
||||
return $"{value.ToString("N2")} {(FileSizeType)index}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum FileSizeType
|
||||
{
|
||||
Bt = 0,
|
||||
KB = 1,
|
||||
MB = 2,
|
||||
GB = 3,
|
||||
TB = 4,
|
||||
Auto = 9,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
120
DDUtilityApp/LOGPARSER/FrmEqSelector.Designer.cs
generated
120
DDUtilityApp/LOGPARSER/FrmEqSelector.Designer.cs
generated
@@ -58,15 +58,15 @@
|
||||
this.panel5 = new System.Windows.Forms.Panel();
|
||||
this.panel7 = new System.Windows.Forms.Panel();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tabLogFiles = new System.Windows.Forms.TabPage();
|
||||
this.gridLogFiles = new JWH.CONTROL.GridViewEx();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.tabModelHistory = new System.Windows.Forms.TabPage();
|
||||
this.gridModelDetail = new JWH.CONTROL.GridViewEx();
|
||||
this.panel10 = new System.Windows.Forms.Panel();
|
||||
this.tboxModelDescription = new System.Windows.Forms.TextBox();
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.tabWorkflow = new System.Windows.Forms.TabPage();
|
||||
this.gridWorkflow = new JWH.CONTROL.GridViewEx();
|
||||
this.tabPage4 = new System.Windows.Forms.TabPage();
|
||||
this.tabHSMS = new System.Windows.Forms.TabPage();
|
||||
this.gridHsms = new JWH.CONTROL.GridViewEx();
|
||||
this.radStatusStrip1 = new Telerik.WinControls.UI.RadStatusStrip();
|
||||
this.rstatus1 = new Telerik.WinControls.UI.RadLabelElement();
|
||||
@@ -92,17 +92,17 @@
|
||||
this.panel5.SuspendLayout();
|
||||
this.panel7.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabLogFiles.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridLogFiles)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridLogFiles.MasterTemplate)).BeginInit();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.tabModelHistory.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridModelDetail)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridModelDetail.MasterTemplate)).BeginInit();
|
||||
this.panel10.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
this.tabWorkflow.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridWorkflow)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridWorkflow.MasterTemplate)).BeginInit();
|
||||
this.tabPage4.SuspendLayout();
|
||||
this.tabHSMS.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridHsms)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridHsms.MasterTemplate)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).BeginInit();
|
||||
@@ -240,9 +240,9 @@
|
||||
this.chkUseSMB.AutoSize = true;
|
||||
this.chkUseSMB.Location = new System.Drawing.Point(802, 6);
|
||||
this.chkUseSMB.Name = "chkUseSMB";
|
||||
this.chkUseSMB.Size = new System.Drawing.Size(148, 16);
|
||||
this.chkUseSMB.Size = new System.Drawing.Size(118, 16);
|
||||
this.chkUseSMB.TabIndex = 5;
|
||||
this.chkUseSMB.Text = "Use SMB(Only Local)";
|
||||
this.chkUseSMB.Text = "Use SMB(Local)";
|
||||
this.chkUseSMB.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
@@ -384,10 +384,10 @@
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage3);
|
||||
this.tabControl1.Controls.Add(this.tabPage4);
|
||||
this.tabControl1.Controls.Add(this.tabLogFiles);
|
||||
this.tabControl1.Controls.Add(this.tabModelHistory);
|
||||
this.tabControl1.Controls.Add(this.tabWorkflow);
|
||||
this.tabControl1.Controls.Add(this.tabHSMS);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
@@ -397,16 +397,16 @@
|
||||
this.tabControl1.TabIndex = 6;
|
||||
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
|
||||
//
|
||||
// tabPage1
|
||||
// tabLogFiles
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.gridLogFiles);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Log Files";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
this.tabLogFiles.Controls.Add(this.gridLogFiles);
|
||||
this.tabLogFiles.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabLogFiles.Name = "tabLogFiles";
|
||||
this.tabLogFiles.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabLogFiles.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabLogFiles.TabIndex = 0;
|
||||
this.tabLogFiles.Text = "Log Files";
|
||||
this.tabLogFiles.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// gridLogFiles
|
||||
//
|
||||
@@ -427,17 +427,17 @@
|
||||
this.gridLogFiles.Size = new System.Drawing.Size(533, 457);
|
||||
this.gridLogFiles.TabIndex = 3;
|
||||
//
|
||||
// tabPage2
|
||||
// tabModelHistory
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.gridModelDetail);
|
||||
this.tabPage2.Controls.Add(this.panel10);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Model History";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
this.tabModelHistory.Controls.Add(this.gridModelDetail);
|
||||
this.tabModelHistory.Controls.Add(this.panel10);
|
||||
this.tabModelHistory.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabModelHistory.Name = "tabModelHistory";
|
||||
this.tabModelHistory.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabModelHistory.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabModelHistory.TabIndex = 1;
|
||||
this.tabModelHistory.Text = "Model History";
|
||||
this.tabModelHistory.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// gridModelDetail
|
||||
//
|
||||
@@ -478,16 +478,16 @@
|
||||
this.tboxModelDescription.Size = new System.Drawing.Size(533, 96);
|
||||
this.tboxModelDescription.TabIndex = 0;
|
||||
//
|
||||
// tabPage3
|
||||
// tabWorkflow
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.gridWorkflow);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage3.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabPage3.TabIndex = 3;
|
||||
this.tabPage3.Text = "Workflow";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
this.tabWorkflow.Controls.Add(this.gridWorkflow);
|
||||
this.tabWorkflow.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabWorkflow.Name = "tabWorkflow";
|
||||
this.tabWorkflow.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabWorkflow.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabWorkflow.TabIndex = 3;
|
||||
this.tabWorkflow.Text = "Workflow";
|
||||
this.tabWorkflow.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// gridWorkflow
|
||||
//
|
||||
@@ -508,16 +508,16 @@
|
||||
this.gridWorkflow.Size = new System.Drawing.Size(533, 457);
|
||||
this.gridWorkflow.TabIndex = 4;
|
||||
//
|
||||
// tabPage4
|
||||
// tabHSMS
|
||||
//
|
||||
this.tabPage4.Controls.Add(this.gridHsms);
|
||||
this.tabPage4.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage4.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabPage4.TabIndex = 2;
|
||||
this.tabPage4.Text = "HSMS";
|
||||
this.tabPage4.UseVisualStyleBackColor = true;
|
||||
this.tabHSMS.Controls.Add(this.gridHsms);
|
||||
this.tabHSMS.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabHSMS.Name = "tabHSMS";
|
||||
this.tabHSMS.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabHSMS.Size = new System.Drawing.Size(539, 463);
|
||||
this.tabHSMS.TabIndex = 2;
|
||||
this.tabHSMS.Text = "HSMS";
|
||||
this.tabHSMS.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// gridHsms
|
||||
//
|
||||
@@ -548,7 +548,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
this.radStatusStrip1.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 300, 24);
|
||||
this.radStatusStrip1.RootElement.ControlBounds = new System.Drawing.Rectangle(3, 574, 300, 24);
|
||||
this.radStatusStrip1.RootElement.StretchVertically = true;
|
||||
this.radStatusStrip1.Size = new System.Drawing.Size(1014, 26);
|
||||
this.radStatusStrip1.TabIndex = 1;
|
||||
@@ -598,18 +598,18 @@
|
||||
this.panel5.ResumeLayout(false);
|
||||
this.panel7.ResumeLayout(false);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabLogFiles.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridLogFiles.MasterTemplate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridLogFiles)).EndInit();
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabModelHistory.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridModelDetail.MasterTemplate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridModelDetail)).EndInit();
|
||||
this.panel10.ResumeLayout(false);
|
||||
this.panel10.PerformLayout();
|
||||
this.tabPage3.ResumeLayout(false);
|
||||
this.tabWorkflow.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridWorkflow.MasterTemplate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridWorkflow)).EndInit();
|
||||
this.tabPage4.ResumeLayout(false);
|
||||
this.tabHSMS.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridHsms.MasterTemplate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridHsms)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radStatusStrip1)).EndInit();
|
||||
@@ -643,17 +643,17 @@
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.CheckBox chkAllEquipment;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tabLogFiles;
|
||||
private JWH.CONTROL.GridViewEx gridLogFiles;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.TabPage tabModelHistory;
|
||||
private JWH.CONTROL.GridViewEx gridModelDetail;
|
||||
private System.Windows.Forms.Panel panel10;
|
||||
private System.Windows.Forms.TextBox tboxModelDescription;
|
||||
private Telerik.WinControls.UI.RadStatusStrip radStatusStrip1;
|
||||
private Telerik.WinControls.UI.RadLabelElement rstatus1;
|
||||
private System.Windows.Forms.CheckBox chkUseSMB;
|
||||
private System.Windows.Forms.TabPage tabPage4;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.TabPage tabHSMS;
|
||||
private System.Windows.Forms.TabPage tabWorkflow;
|
||||
private JWH.CONTROL.GridViewEx gridHsms;
|
||||
private JWH.CONTROL.GridViewEx gridWorkflow;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
using DDUtilityApp.LOGPARSER.DATA;
|
||||
using DDUtilityApp.SECS;
|
||||
using FluentFTP;
|
||||
using FluentFTP.Helpers;
|
||||
using JWH;
|
||||
using JWH.CONTROL;
|
||||
using JWH.DATA;
|
||||
using JWH.NETWORK;
|
||||
using Org.BouncyCastle.Tls.Crypto;
|
||||
using Renci.SshNet;
|
||||
using Renci.SshNet.Sftp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -18,7 +21,9 @@ using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using Telerik.WinControls.UI;
|
||||
using static Telerik.WinControls.UI.ValueMapper;
|
||||
|
||||
namespace DDUtilityApp.LOGPARSER
|
||||
{
|
||||
@@ -32,16 +37,22 @@ namespace DDUtilityApp.LOGPARSER
|
||||
|
||||
public eServerType ServerType { get; set; } = eServerType.EIS;
|
||||
|
||||
/// <summary>
|
||||
/// 로그서버 접속정보
|
||||
/// </summary>
|
||||
public Account Account { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// 선택된 로그파일
|
||||
/// </summary>
|
||||
public LogFile[] SelectedLogFiles { get; set; } = null;
|
||||
|
||||
public LogServer LogServer { get; set; } = null;
|
||||
private LogServer LogServer { get; set; } = null;
|
||||
|
||||
public EisEquipment Equipment { get; set; } = null;
|
||||
|
||||
public string ServerName { get; set; } = string.Empty;
|
||||
|
||||
public string EquipmentID { get; set; } = string.Empty;
|
||||
|
||||
public SECSDefine SECSDefine { get; set; } = null;
|
||||
|
||||
#endregion
|
||||
@@ -67,7 +78,8 @@ namespace DDUtilityApp.LOGPARSER
|
||||
this.tboxName.ImeMode = ImeMode.Hangul;
|
||||
this.tboxEquipmentID.ImeMode = ImeMode.Alpha;
|
||||
this.chkAllEquipment.Checked = GlobalVariable.Instance.FrmEqSelector_AllEquipment;
|
||||
this.chkUseSMB.Checked = GlobalVariable.Instance.FrmEqSelector_UseSMB;
|
||||
this.chkUseSMB.Checked = true; // = GlobalVariable.Instance.FrmEqSelector_UseSMB
|
||||
this.chkUseSMB.Visible = false;
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tboxModelDescription.Font = font;
|
||||
|
||||
@@ -128,7 +140,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
switch (keyData)
|
||||
{
|
||||
case Keys.F1:
|
||||
Process.Start($"http://jungwoois.dothome.co.kr");
|
||||
Process.Start("IEXPLORE.EXE", "http://pms.e1soft.co.kr:8090/Deploy/eqview/");
|
||||
break;
|
||||
case Keys.F6:
|
||||
this.gridEquipments.BestFitColumns(BestFitColumnMode.DisplayedCells);
|
||||
@@ -149,7 +161,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
{
|
||||
this.SetLogServer();
|
||||
if (this.Equipment != null) this.SetEquipment(this.Equipment);
|
||||
else this.SetEquipment(this.ServerName, this.EquipmentID);
|
||||
else this.SetEquipment(this.ServerName, this.Equipment?.EquipmentID);
|
||||
this.SetSelectedLogFiles(this.SelectedLogFiles);
|
||||
}
|
||||
|
||||
@@ -202,27 +214,71 @@ namespace DDUtilityApp.LOGPARSER
|
||||
/// <param name="e"></param>
|
||||
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (tabControl1.SelectedIndex >= 2)
|
||||
try
|
||||
{
|
||||
int selectIdx = tabControl1.SelectedIndex;
|
||||
string subPath = tabControl1.SelectedTab.Text.Contains("Workflow") ? "Workflow" : "THiRA_SECSGEM/HSMS";
|
||||
|
||||
var equipment = this.Equipment;
|
||||
|
||||
//StpClientWrap.Connect();
|
||||
FtpsClient.Connect();
|
||||
|
||||
// SFTP 파일 목록 가져오기
|
||||
// var rtnObj = StpClientWrap.GetSftpList($"/{equipment.EquipmentID}/{subPath}");
|
||||
var rtnObj = FtpsClient.GetFtpsList($"/EISLog/{equipment.EquipmentID}/{subPath}");
|
||||
if (rtnObj == null) return;
|
||||
|
||||
GridViewEx grid = tabControl1.SelectedTab.Controls.OfType<GridViewEx>().FirstOrDefault();
|
||||
if (grid != null)
|
||||
if (this.tabControl1.SelectedTab == this.tabHSMS)
|
||||
{
|
||||
//grid.AutoBinding(GetSftplogFiles(rtnObj));
|
||||
grid.AutoBinding(GetFtpslogFiles(rtnObj));
|
||||
if (this.gridHsms.DataSource == null) return;
|
||||
|
||||
string remotePath = $"/{this.Account.DefaultPath}/{this.Equipment.EquipmentID}/THiRA_SECSGEM/HSMS";
|
||||
switch (this.Account.Access)
|
||||
{
|
||||
case AccessType.SMB:
|
||||
break;
|
||||
case AccessType.FTPS:
|
||||
{
|
||||
FtpsClient.Connect();
|
||||
FtpListItem[] items = FtpsClient.GetFtpsList(remotePath);
|
||||
this.gridHsms.AutoBinding(this.GetLogFiles(items));
|
||||
FtpsClient.Disconnect();
|
||||
}
|
||||
break;
|
||||
case AccessType.SFTP:
|
||||
{
|
||||
StpClientWrap.Connect();
|
||||
ISftpFile[] items = (ISftpFile[])StpClientWrap.GetSftpList(remotePath);
|
||||
this.gridHsms.AutoBinding(this.GetLogFiles(items));
|
||||
StpClientWrap.Disconnect();
|
||||
}
|
||||
break;
|
||||
case AccessType.FTP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (this.tabControl1.SelectedTab == this.tabWorkflow)
|
||||
{
|
||||
if (this.gridWorkflow.DataSource != null) return;
|
||||
|
||||
string remotePath = $"/{this.Account.DefaultPath}/{this.Equipment.EquipmentID}/Workflow";
|
||||
switch (this.Account.Access)
|
||||
{
|
||||
case AccessType.SMB:
|
||||
break;
|
||||
case AccessType.FTPS:
|
||||
{
|
||||
FtpsClient.Connect();
|
||||
FtpListItem[] items = FtpsClient.GetFtpsList(remotePath);
|
||||
LogFile[] logFiles = this.GetLogFiles(items);
|
||||
this.gridWorkflow.AutoBinding(logFiles);
|
||||
FtpsClient.Disconnect();
|
||||
}
|
||||
break;
|
||||
case AccessType.SFTP:
|
||||
{
|
||||
StpClientWrap.Connect();
|
||||
ISftpFile[] items = (ISftpFile[])StpClientWrap.GetSftpList(remotePath);
|
||||
this.gridWorkflow.AutoBinding(this.GetLogFiles(items));
|
||||
StpClientWrap.Disconnect();
|
||||
}
|
||||
break;
|
||||
case AccessType.FTP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XLogger.Instance.Fatal(ex, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,6 +385,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
dicColumnText.Add("PMDate", "PM Date");
|
||||
dicColumnText.Add("PlcType", "PLC Type");
|
||||
|
||||
#region [저장된 컬럼순서 적용]
|
||||
string columnNames = GlobalVariable.Instance.FrmEqSelector_GridEquipmentHeader;
|
||||
string columnText = string.Empty;
|
||||
if (string.IsNullOrEmpty(columnNames) == false)
|
||||
@@ -352,9 +409,10 @@ namespace DDUtilityApp.LOGPARSER
|
||||
if (string.IsNullOrEmpty(dicColumnText[columnName]) == false) columnText = dicColumnText[columnName];
|
||||
grid.AddColumn(columnName, columnText).IsVisible = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
grid.AddContextMenu("");
|
||||
grid.AddContextMenu("Open Windows", GridEquipments_OpenWindows);
|
||||
grid.AddContextMenu("Open Windows", this.GridEquipments_OpenWindows);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -363,6 +421,161 @@ namespace DDUtilityApp.LOGPARSER
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void GridEquipments_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
||||
this.gridLogFiles.DataSource = null;
|
||||
this.gridModelDetail.DataSource = null;
|
||||
this.gridWorkflow.DataSource = null;
|
||||
this.gridHsms.DataSource = null;
|
||||
//if (this.tabControl1.TabPages.Contains(this.tabHSMS)) this.tabControl1.TabPages.Remove(this.tabHSMS);
|
||||
|
||||
EisEquipment equipment = this.gridEquipments.SelectedRows[0].DataBoundItem as EisEquipment;
|
||||
if (equipment == null) return;
|
||||
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
this.Equipment = equipment;
|
||||
LogServer logServer = this.cboxServer.SelectedItem as LogServer;
|
||||
string path = string.Empty;
|
||||
|
||||
#region [ Model Details ]
|
||||
|
||||
// 모델 버전 정보
|
||||
EisModelDetails[] modelDetails = this.GetModelDetails(equipment);
|
||||
this.gridModelDetail.AutoBinding(modelDetails);
|
||||
this.gridModelDetail.SetRowForeColor("LockState", $"LockState = 'BLOCKED'", Color.LightGray);
|
||||
foreach (GridViewRowInfo row in this.gridModelDetail.Rows)
|
||||
{
|
||||
EisModelDetails item = row.DataBoundItem as EisModelDetails;
|
||||
if (item == null) continue;
|
||||
if (item.Version == equipment.Version)
|
||||
{
|
||||
row.IsSelected = true;
|
||||
row.IsCurrent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 모델 정보
|
||||
EisModelInfo[] modelInfo = this.GetModelInfo(equipment);
|
||||
if (modelInfo?.Length > 0)
|
||||
{
|
||||
this.tboxModelDescription.Text = modelInfo[0].Description;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [ LogFiles ]
|
||||
|
||||
if (logServer.NetworkAccount.ContainsKey(equipment.LogServerIP) == false) return;
|
||||
{
|
||||
this.Account = logServer.NetworkAccount[equipment.LogServerIP];
|
||||
switch (this.Account.Access)
|
||||
{
|
||||
case AccessType.SMB:
|
||||
{
|
||||
// Checking Local IP-Address
|
||||
bool isLocal = false;
|
||||
foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
|
||||
foreach (UnicastIPAddressInformation ip in nic.GetIPProperties().UnicastAddresses)
|
||||
if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
if (ip.Address.ToString() == this.Account.IPAddress) { isLocal = true; break; }
|
||||
|
||||
if (this.chkUseSMB.Checked)
|
||||
{
|
||||
if (isLocal) path = $@"{equipment.LogPath}\{equipment.EquipmentID}";
|
||||
else return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isLocal) path = $@"{equipment.LogPath}\{equipment.EquipmentID}";
|
||||
else path = $@"\\{this.Account.IPAddress}\{this.Account.DefaultPath}{equipment.EquipmentID}\";
|
||||
}
|
||||
|
||||
int result = ExtensionAPI.ConnectRemoteServer(this.Account.IPAddress, this.Account.UserID, this.Account.Password);
|
||||
if (result != 0 && result != 1219) { MessageBox.Show($@"네트워크 접근에 실패하였습니다. (Code:{result})"); return; }
|
||||
|
||||
DirectoryInfo directory = new DirectoryInfo(path);
|
||||
if (directory.Exists == false) { MessageBox.Show($@"폴더가 존재하지 않습니다" + Environment.NewLine + Environment.NewLine + $@"Path: {path}"); return; }
|
||||
|
||||
this.gridLogFiles.AutoBinding(this.GetLogFiles(directory.GetFiles()));
|
||||
this.rstatus1.Text = $"Path={path}";
|
||||
}
|
||||
break;
|
||||
case AccessType.FTPS:
|
||||
{
|
||||
FtpsClient.Initialize(this.Account.IPAddress, this.Account.UserID, this.Account.Password);
|
||||
FtpsClient.Connect();
|
||||
|
||||
path = $"/{this.Account.DefaultPath}/{equipment.EquipmentID}";
|
||||
FtpListItem[] ftpFiles = FtpsClient.GetFtpsList(path);
|
||||
if (ftpFiles != null) this.gridLogFiles.AutoBinding(this.GetLogFiles(ftpFiles));
|
||||
this.rstatus1.Text = $"Path={this.Account.IPAddress}{path}";
|
||||
|
||||
//if (FtpsClient.IsDirExists($"{path}/THiRA_SECSGEM/HSMS") && !this.tabControl1.TabPages.Contains(tabHSMS))
|
||||
// this.tabControl1.TabPages.Add(this.tabHSMS);
|
||||
|
||||
FtpsClient.Disconnect();
|
||||
}
|
||||
break;
|
||||
case AccessType.SFTP:
|
||||
{
|
||||
StpClientWrap.Initialize(this.Account.IPAddress, this.Account.UserID, this.Account.Password);
|
||||
StpClientWrap.Connect();
|
||||
|
||||
path = $"/{this.Account.DefaultPath}/{equipment.EquipmentID}";
|
||||
ISftpFile[] ftpFiles = (ISftpFile[])StpClientWrap.GetSftpList(path);
|
||||
if (ftpFiles != null) this.gridLogFiles.AutoBinding(this.GetLogFiles(ftpFiles));
|
||||
this.rstatus1.Text = $"Path={this.Account.IPAddress}{path}";
|
||||
|
||||
//if (StpClientWrap.IsDirExists($"{path}/THiRA_SECSGEM/HSMS") && !this.tabControl1.TabPages.Contains(tabHSMS))
|
||||
// this.tabControl1.TabPages.Add(this.tabHSMS);
|
||||
|
||||
StpClientWrap.Disconnect();
|
||||
}
|
||||
break;
|
||||
case AccessType.FTP:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [ Workflow & HSMS ]
|
||||
|
||||
this.tabControl1_SelectedIndexChanged(this.tabControl1, new EventArgs());
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (this.LogServer.NetworkAccount.ContainsKey(this.Equipment.LogServerIP))
|
||||
{
|
||||
// 해당 접속정보를 삭제한다
|
||||
this.LogServer.NetworkAccount.Remove(this.Equipment.LogServerIP);
|
||||
ExpressionFormattingObject formatting = new ExpressionFormattingObject($"Marking", $"ServerIP = '{this.Equipment.LogServerIP}'", true);
|
||||
formatting.RowBackColor = Color.FromArgb(88, 255, 0, 0);
|
||||
this.gridEquipments.Columns["ServerIP"].ConditionalFormattingObjectList.Add(formatting);
|
||||
}
|
||||
XLogger.Instance.Fatal(ex, true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [CheckPoint] 선택된 설비의 로그파일 목록을 표시한다.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void xGridEquipments_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -456,16 +669,16 @@ namespace DDUtilityApp.LOGPARSER
|
||||
|
||||
if (hsmsEnabled == false)
|
||||
{
|
||||
if (tabControl1.TabPages.Contains(tabPage4))
|
||||
if (tabControl1.TabPages.Contains(tabHSMS))
|
||||
{
|
||||
tabControl1.TabPages.Remove(tabPage4);
|
||||
tabControl1.TabPages.Remove(tabHSMS);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!tabControl1.TabPages.Contains(tabPage4))
|
||||
if (!tabControl1.TabPages.Contains(tabHSMS))
|
||||
{
|
||||
tabControl1.TabPages.Add(tabPage4);
|
||||
tabControl1.TabPages.Add(tabHSMS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,13 +781,14 @@ namespace DDUtilityApp.LOGPARSER
|
||||
if (e.KeyCode == Keys.Enter) this.BtnOK_Click(this.btnOK, null);
|
||||
}
|
||||
|
||||
private void GridLogFiles_OpenWindows(object sender, params object[] args)
|
||||
private void GridEquipments_OpenWindows(object sender, params object[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
||||
string serverID = this.cboxServer.Text;
|
||||
string equipmentID = this.gridEquipments.SelectedRows[0].Cells["EquipmentID"].Value.ToString();
|
||||
//this.gridLogFiles.SelectedRows;
|
||||
|
||||
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
||||
processStartInfo.FileName = Application.ExecutablePath;
|
||||
@@ -605,7 +819,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
grid.AddColumn("Length");
|
||||
grid.AddColumn("LastWriteTime");
|
||||
|
||||
grid.AddContextMenu("");
|
||||
//grid.AddContextMenu("");
|
||||
//grid.AddContextMenu("Open Log", GridEquipments_OpenWindows);
|
||||
}
|
||||
|
||||
@@ -613,19 +827,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
{
|
||||
try
|
||||
{
|
||||
LogFile logFile = null;
|
||||
List<LogFile> list = new List<LogFile>();
|
||||
foreach (GridViewRowInfo row in this.gridLogFiles.SelectedRows)
|
||||
{
|
||||
logFile = row.DataBoundItem as LogFile;
|
||||
if (logFile == null) continue;
|
||||
list.Add(logFile);
|
||||
}
|
||||
if (logFile == null) return;
|
||||
|
||||
this.SelectedLogFiles = list.ToArray();
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
this.BtnOK_Click(this.btnOK, null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -638,14 +840,94 @@ namespace DDUtilityApp.LOGPARSER
|
||||
if (e.KeyCode == Keys.Enter) this.BtnOK_Click(this.btnOK, null);
|
||||
}
|
||||
|
||||
private void GridEquipments_OpenWindows(object sender, params object[] args)
|
||||
#endregion
|
||||
|
||||
#region [ Grid Worflow & HSMS ] ----------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Workflow, HSMS 파일목록 Grid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Grid_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
Grid_CellDoubleClick((GridViewEx)sender, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Workflow, HSMS 파일 Download
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Grid_CellDoubleClick(object sender, GridViewCellEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string destPath = Path.Combine(GlobalVariable.Instance.DownloadPath, this.Equipment.EquipmentID);
|
||||
|
||||
RadGridView grid = sender as RadGridView;
|
||||
if (grid == null && sender.GetType() == typeof(GridDataCellElement))
|
||||
{
|
||||
GridDataCellElement element = sender as GridDataCellElement;
|
||||
grid = element.RowElement.GridControl;
|
||||
}
|
||||
if (grid == null) return;
|
||||
|
||||
if (grid == this.gridHsms) destPath = Path.Combine(destPath, "HSMS");
|
||||
else if (grid == this.gridWorkflow) destPath = Path.Combine(destPath, "Workflow");
|
||||
if (System.IO.Directory.Exists(destPath) == false) System.IO.Directory.CreateDirectory(destPath);
|
||||
|
||||
List<string> downfiles = new List<string>();
|
||||
foreach (GridViewRowInfo row in grid.SelectedRows)
|
||||
{
|
||||
LogFile logFile = row.DataBoundItem as LogFile;
|
||||
string destFileName = Path.Combine(destPath, logFile.FileName);
|
||||
|
||||
switch (this.Account.Access)
|
||||
{
|
||||
case AccessType.SMB:
|
||||
{ }
|
||||
break;
|
||||
case AccessType.FTPS:
|
||||
{
|
||||
FtpsClient.DownloadFtpsFile(logFile.FullName, destFileName);
|
||||
downfiles.Add(destFileName);
|
||||
logFile.DestFullName = destFileName;
|
||||
}
|
||||
break;
|
||||
case AccessType.SFTP:
|
||||
{
|
||||
StpClientWrap.DownloadSftpFile(logFile.FullName, destFileName);
|
||||
downfiles.Add(destFileName);
|
||||
logFile.DestFullName = destFileName;
|
||||
}
|
||||
break;
|
||||
case AccessType.FTP:
|
||||
{ }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox.Show($"{grid.SelectedRows.Count}개의 파일을 저장하였습니다.");
|
||||
foreach (string file in downfiles)
|
||||
System.Diagnostics.Process.Start(file);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XLogger.Instance.Fatal(ex, true);
|
||||
}
|
||||
}
|
||||
|
||||
private void GridLogFiles_OpenWindows(object sender, params object[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.gridEquipments.SelectedRows.Count < 1) return;
|
||||
string serverID = this.cboxServer.Text;
|
||||
string equipmentID = this.gridEquipments.SelectedRows[0].Cells["EquipmentID"].Value.ToString();
|
||||
//this.gridLogFiles.SelectedRows;
|
||||
|
||||
ProcessStartInfo processStartInfo = new ProcessStartInfo();
|
||||
processStartInfo.FileName = Application.ExecutablePath;
|
||||
@@ -662,49 +944,6 @@ namespace DDUtilityApp.LOGPARSER
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Workflow, HSMS 파일목록 Grid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Grid_KeyDown(object sender, KeyEventArgs e) //jhlim 20250202
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
Grid_CellDoubleClick((GridViewEx)sender, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Workflow, HSMS 파일 Download
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Grid_CellDoubleClick(object sender, GridViewCellEventArgs e) //jhlim 20250202
|
||||
{
|
||||
RadGridView gd = sender.GetType().Name.Contains("GridDataCellElement") ?
|
||||
((GridDataCellElement)sender)?.RowElement?.GridControl : (GridViewEx)sender;
|
||||
try
|
||||
{
|
||||
foreach (GridViewRowInfo row in gd.SelectedRows)
|
||||
{
|
||||
LogFile item = row.DataBoundItem as LogFile;
|
||||
var fullPath = item.FullName;
|
||||
string destPath = GlobalVariable.Instance.DownloadPath;
|
||||
|
||||
if (System.IO.Directory.Exists(destPath) == false) System.IO.Directory.CreateDirectory(destPath);
|
||||
string destFileName = $@"{destPath}{System.IO.Path.GetFileName(fullPath)}";
|
||||
FtpsClient.DownloadFtpsFile(fullPath, destFileName);
|
||||
}
|
||||
|
||||
MessageBox.Show($"{gd.SelectedRows.Count}개의 파일을 저장하였습니다.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XLogger.Instance.Fatal(ex, true);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [ GridModelDetail ] -------------------------------------------
|
||||
@@ -775,53 +1014,6 @@ namespace DDUtilityApp.LOGPARSER
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sftp Log Files jhlim 20250202
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
private LogFile[] GetlogFiles(object obj)
|
||||
{
|
||||
LogFile[] logFiles = ((List<ISftpFile>)obj).Where(item => !item.IsDirectory && item.Name != "." && item.Name != "..") //
|
||||
.Select(item => new LogFile
|
||||
{
|
||||
Name = Path.GetFileNameWithoutExtension(item.Name),
|
||||
FullName = item.FullName,
|
||||
Extension = Path.GetExtension(item.Name),
|
||||
Length = item.Length,
|
||||
CreationTime = item.LastAccessTime,
|
||||
LastAccessTime = item.LastAccessTime,
|
||||
LastWriteTime = item.LastWriteTime
|
||||
})
|
||||
.OrderByDescending(x => x.Name)
|
||||
.ToArray();
|
||||
|
||||
return logFiles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ftps Log Files jhlim 20250202
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
private LogFile[] GetFtpslogFiles(object obj)
|
||||
{
|
||||
LogFile[] logFiles = ((FtpListItem[])obj).Where(item => item.Type == FtpFileSystemObjectType.File)
|
||||
.Select(item => new LogFile
|
||||
{
|
||||
Name = Path.GetFileNameWithoutExtension(item.Name),
|
||||
FullName = item.FullName,
|
||||
Extension = Path.GetExtension(item.Name),
|
||||
Length = item.Size,
|
||||
CreationTime = item.Modified,
|
||||
LastAccessTime = item.Modified,
|
||||
LastWriteTime = item.Modified
|
||||
})
|
||||
.OrderByDescending(x => x.Name)
|
||||
.ToArray();
|
||||
|
||||
return logFiles;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [ Method ] ----------------------------------------------------
|
||||
@@ -895,38 +1087,43 @@ namespace DDUtilityApp.LOGPARSER
|
||||
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
||||
logServer.DBGetModelInfo = sbModelInfo.ToString();
|
||||
|
||||
logServer.NetworkAccount.Add("192.168.7.214", new Account("192.168.7.214", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.7.215", new Account("192.168.7.215", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.7.216", new Account("192.168.7.216", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.7.217", new Account("192.168.7.217", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.7.218", new Account("192.168.7.218", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.7.219", new Account("192.168.7.219", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.235.214", new Account("192.168.7.214", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.235.215", new Account("192.168.7.215", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.235.216", new Account("192.168.7.216", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.235.217", new Account("192.168.7.217", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.235.218", new Account("192.168.7.218", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.235.219", new Account("192.168.7.219", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.115.214", new Account("192.168.7.214", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.115.215", new Account("192.168.7.215", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.115.216", new Account("192.168.7.216", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.115.217", new Account("192.168.7.217", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.115.218", new Account("192.168.7.218", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.115.219", new Account("192.168.7.219", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.7.150", new Account("192.168.7.150", "test", "daeduck!1", @"EIS서버"));
|
||||
// B1
|
||||
logServer.NetworkAccount.Add("192.168.7.214", new Account("192.168.7.214", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.7.215", new Account("192.168.7.215", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.7.216", new Account("192.168.7.216", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.7.217", new Account("192.168.7.217", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.7.218", new Account("192.168.7.218", "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서버\"));
|
||||
|
||||
// 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.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.217", new Account("192.168.7.217", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.115.218", new Account("192.168.7.218", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.115.219", new Account("192.168.7.219", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.235.214", new Account("192.168.7.214", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.235.215", new Account("192.168.7.215", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.235.216", new Account("192.168.7.216", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.235.217", new Account("192.168.7.217", "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.113.231", new Account("192.168.113.231", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.113.232", new Account("192.168.113.232", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.113.233", new Account("192.168.113.233", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.113.236", new Account("192.168.113.236", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.143.231", new Account("192.168.143.231", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.143.232", new Account("192.168.143.232", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.143.233", new Account("192.168.143.233", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.143.235", new Account("192.168.143.235", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.233.231", new Account("192.168.233.231", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.233.232", new Account("192.168.233.232", "test", "daeduck!1", @"EISLog"));
|
||||
logServer.NetworkAccount.Add("192.168.233.233", new Account("192.168.233.233", "test", "daeduck!1", @"EISLog"));
|
||||
// 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.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.236", new Account("192.168.113.236", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.233.231", new Account("192.168.233.231", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.233.232", new Account("192.168.233.232", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.233.233", new Account("192.168.233.233", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
|
||||
// M1
|
||||
logServer.NetworkAccount.Add("192.168.143.231", new Account("192.168.143.231", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.NetworkAccount.Add("192.168.143.232", new Account("192.168.143.232", "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.FTPAddress = "192.168.7.208";
|
||||
logServer.FTPPort = 7000;
|
||||
@@ -943,9 +1140,9 @@ namespace DDUtilityApp.LOGPARSER
|
||||
logServer.DBGetEquipments = sbEquipments.ToString();
|
||||
logServer.DBGetModelDetails = sbModelDetails.ToString();
|
||||
logServer.DBGetModelInfo = sbModelInfo.ToString();
|
||||
logServer.NetworkAccount.Add("192.168.8.215", new Account("192.168.8.215", "test", "daeduck!1", @"eisap01_eislog\log"));
|
||||
logServer.NetworkAccount.Add("192.168.8.216", new Account("192.168.8.216", "test", "daeduck!1", "eisap02_eislog"));
|
||||
logServer.NetworkAccount.Add("192.168.8.217", new Account("192.168.8.217", "test", "daeduck!1", "eisap03_eislog"));
|
||||
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.217", new Account("192.168.8.217", "loguser", "Daeduck!1", @"EISLog", AccessType.FTPS));
|
||||
logServer.FTPAddress = "192.168.8.217";
|
||||
logServer.FTPPort = 21;
|
||||
logServer.FTPUserID = "anonymous";
|
||||
@@ -1025,7 +1222,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
|
||||
}
|
||||
|
||||
return equipments.OrderBy(x => x.Line).ThenBy(x => x.ProcessSegmentID).ThenBy(x => x.MesName).ToArray();
|
||||
return equipments.OrderBy(x => x.OrderByKey).ThenBy(x => x.Line).ThenBy(x => x.ProcessSegmentID).ThenBy(x => x.MesName).ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -1114,7 +1311,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
|
||||
foreach (LogFile logFile in logFiles)
|
||||
{
|
||||
if (string.Compare(item.FullName, logFile.FullName, true) == 0)
|
||||
if (string.Compare(item.FileName, logFile.FileName, true) == 0)
|
||||
{
|
||||
if (current == null)
|
||||
{
|
||||
@@ -1133,6 +1330,9 @@ namespace DDUtilityApp.LOGPARSER
|
||||
return ((LogServer)this.cboxServer.SelectedItem)?.NetworkAccount[logserverIP];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DB에서 GEM 정보 수집
|
||||
/// </summary>
|
||||
private void GetGEMSetting()
|
||||
{
|
||||
try
|
||||
@@ -1160,6 +1360,10 @@ namespace DDUtilityApp.LOGPARSER
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MES DB에서 설비정보 수집
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private DataTable GetMesEquipment()
|
||||
{
|
||||
SqlConnection sqlConnection = null;
|
||||
@@ -1168,6 +1372,8 @@ namespace DDUtilityApp.LOGPARSER
|
||||
try
|
||||
{
|
||||
string connectionString = string.Empty;
|
||||
connectionString = $@"server=192.168.8.232;database=ddmes;uid=DDB2MESAdmin;pwd=Yhqe4csJXJ4W5$%;";
|
||||
|
||||
StringBuilder query = new StringBuilder();
|
||||
query.AppendLine($" SELECT A.SITEID, ");
|
||||
query.AppendLine($" A.FACILITYID, ");
|
||||
@@ -1187,9 +1393,6 @@ namespace DDUtilityApp.LOGPARSER
|
||||
query.AppendLine($" A.MAKER, ");
|
||||
query.AppendLine($" A.EQPSTATE, ");
|
||||
query.AppendLine($" A.LOCATION ");
|
||||
|
||||
connectionString = $@"server=192.168.8.232;database=ddmes;uid=DDB2MESAdmin;pwd=Yhqe4csJXJ4W5$%;";
|
||||
|
||||
query.AppendLine($" , E.PLANDATE ");
|
||||
query.AppendLine($" FROM CIM_EQUIPMENT A (nolock) ");
|
||||
query.AppendLine($" LEFT JOIN CIM_PROCESSSEGMENT B (nolock) ON A.PROCESSSEGMENTID = B.PROCESSSEGMENTID AND A.SITEID = B.SITEID ");
|
||||
@@ -1230,6 +1433,98 @@ namespace DDUtilityApp.LOGPARSER
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SMB Log Files
|
||||
/// </summary>
|
||||
/// <param name="fileItems"></param>
|
||||
/// <returns></returns>
|
||||
private LogFile[] GetLogFiles(FileInfo[] fileItems)
|
||||
{
|
||||
LogFile[] logFiles = fileItems
|
||||
.Select(item => new LogFile
|
||||
{
|
||||
Account = this.Account,
|
||||
FullName = item.FullName,
|
||||
Length = item.Length,
|
||||
CreationTime = item.CreationTime,
|
||||
LastAccessTime = item.LastAccessTime,
|
||||
LastWriteTime = item.LastWriteTime
|
||||
})
|
||||
.OrderByDescending(x => x.Name)
|
||||
.ToArray();
|
||||
|
||||
return logFiles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FTPS Log Files
|
||||
/// </summary>
|
||||
/// <param name="fileItems"></param>
|
||||
/// <returns></returns>
|
||||
private LogFile[] GetLogFiles(FtpListItem[] fileItems)
|
||||
{
|
||||
LogFile[] logFiles = fileItems.Where(item => item.Type == FtpFileSystemObjectType.File)
|
||||
.Select(item => new LogFile
|
||||
{
|
||||
Account = this.Account,
|
||||
FullName = item.FullName,
|
||||
Length = item.Size,
|
||||
CreationTime = item.Modified,
|
||||
LastAccessTime = item.Modified,
|
||||
LastWriteTime = item.Modified
|
||||
})
|
||||
.OrderByDescending(x => x.Name)
|
||||
.ToArray();
|
||||
|
||||
return logFiles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SFTP Log Files
|
||||
/// </summary>
|
||||
/// <param name="fileItems"></param>
|
||||
/// <returns></returns>
|
||||
private LogFile[] GetLogFiles(ISftpFile[] fileItems)
|
||||
{
|
||||
LogFile[] logFiles = fileItems.Where(item => !item.IsDirectory && item.Name != "." && item.Name != "..")
|
||||
.Select(item => new LogFile
|
||||
{
|
||||
Account = this.Account,
|
||||
FullName = item.FullName,
|
||||
Length = item.Length,
|
||||
CreationTime = item.LastAccessTime,
|
||||
LastAccessTime = item.LastAccessTime,
|
||||
LastWriteTime = item.LastWriteTime
|
||||
})
|
||||
.OrderByDescending(x => x.Name)
|
||||
.ToArray();
|
||||
|
||||
return logFiles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fts Log Files jhlim 20250202
|
||||
/// </summary>
|
||||
/// <param name="fileItems"></param>
|
||||
/// <returns></returns>
|
||||
private LogFile[] GetFtpslogFiles(object fileItems)
|
||||
{
|
||||
LogFile[] logFiles = ((FtpListItem[])fileItems).Where(item => item.Type == FtpFileSystemObjectType.File)
|
||||
.Select(item => new LogFile
|
||||
{
|
||||
Account = this.Account,
|
||||
FullName = item.FullName,
|
||||
Length = item.Size,
|
||||
CreationTime = item.Modified,
|
||||
LastAccessTime = item.Modified,
|
||||
LastWriteTime = item.Modified
|
||||
})
|
||||
.OrderByDescending(x => x.Name)
|
||||
.ToArray();
|
||||
|
||||
return logFiles;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@@ -8,10 +8,12 @@ using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Forms;
|
||||
using DDUtilityApp.DATA;
|
||||
using DDUtilityApp.LOGPARSER.DATA;
|
||||
using DDUtilityApp.LOGPARSER.PARSER;
|
||||
using DDUtilityApp.MONGO;
|
||||
using DDUtilityApp.SECS;
|
||||
using FluentFTP;
|
||||
using JWH;
|
||||
using JWH.CONTROL;
|
||||
using JWH.NETWORK;
|
||||
@@ -250,7 +252,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
switch (keyData)
|
||||
{
|
||||
case Keys.F1:
|
||||
Process.Start($"http://192.168.7.221:8081/");
|
||||
Process.Start("IEXPLORE.EXE", "http://pms.e1soft.co.kr:8090/Deploy/eqview/");
|
||||
break;
|
||||
case Keys.F2:
|
||||
this.Location = new Point(0, 0);
|
||||
@@ -354,9 +356,11 @@ namespace DDUtilityApp.LOGPARSER
|
||||
|
||||
int index = -1;
|
||||
index = this.lviewFiles.SelectedItems[0].Index;
|
||||
LogFile logFile = this.lviewFiles.Items[index].Tag as LogFile;
|
||||
if (logFile == null) return;
|
||||
|
||||
this.tboxFilename.Text = Path.GetFileName(this.lviewFiles.Items[index].Tag as string);
|
||||
this.tboxFilename.Tag = Path.GetDirectoryName(this.lviewFiles.Items[index].Tag as string);
|
||||
this.tboxFilename.Text = logFile.FileName;
|
||||
this.tboxFilename.Tag = logFile;
|
||||
if (string.IsNullOrEmpty(this.tboxFilename.Text) == false && this.tboxFilename.Text.Length > 6)
|
||||
{
|
||||
this.tboxFilename.SelectionStart = this.tboxFilename.Text.Length - 6;
|
||||
@@ -453,14 +457,25 @@ namespace DDUtilityApp.LOGPARSER
|
||||
{
|
||||
try
|
||||
{
|
||||
string path = this.tboxFilename.Tag as string;
|
||||
string fileName = this.tboxFilename.Text;
|
||||
if (string.IsNullOrEmpty(fileName)) return;
|
||||
|
||||
foreach (ListViewItem item in this.lviewFiles.Items)
|
||||
if (string.Compare(item.Text, fileName, true) == 0) return;
|
||||
|
||||
ListViewItem lviewItem = this.lviewFiles.Items.Add(fileName);
|
||||
lviewItem.Tag = $"{path}{Path.DirectorySeparatorChar}{fileName}";
|
||||
LogFile srcLogFile = this.tboxFilename.Tag as LogFile;
|
||||
if (srcLogFile == null)
|
||||
{
|
||||
if (this.lviewFiles.Items.Count < 1) return;
|
||||
srcLogFile = this.lviewFiles.Items[0].Tag as LogFile;
|
||||
if (srcLogFile == null) return;
|
||||
}
|
||||
|
||||
string fullName = Path.Combine(srcLogFile.DirectoryName, fileName);
|
||||
LogFile newLogFile = new LogFile(fullName) { Account = srcLogFile.Account };
|
||||
|
||||
ListViewItem lviewItem = this.lviewFiles.Items.Add(newLogFile.FileName);
|
||||
lviewItem.Tag = newLogFile;
|
||||
lviewItem.Checked = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -502,7 +517,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
|
||||
System.GC.Collect();
|
||||
this.Parsing();
|
||||
this.DownLoad_Parsing();
|
||||
|
||||
StandardData[] array = this.Filtering(this.StandardCollection.ToArray());
|
||||
this.grid.AutoBinding(array);
|
||||
@@ -552,14 +567,16 @@ namespace DDUtilityApp.LOGPARSER
|
||||
{
|
||||
if (this.LogParser == null) return;
|
||||
|
||||
List<string> lstFileNames = new List<string>();
|
||||
List<LogFile> lstLogFile = new List<LogFile>();
|
||||
foreach (ListViewItem item in this.lviewFiles.Items)
|
||||
{
|
||||
if (item.Tag != null && item.Tag.GetType() == typeof(string))
|
||||
lstFileNames.Add(item.Tag.ToString());
|
||||
if (item.Tag != null && item.Tag.GetType() == typeof(LogFile))
|
||||
lstLogFile.Add((LogFile)item.Tag);
|
||||
}
|
||||
string[] selectedFiles = this.LogParser.FileSelector(this, lstFileNames.ToArray());
|
||||
if (selectedFiles == null || selectedFiles.Length < 1) return;
|
||||
|
||||
// LogPaser > FrmEqSelector
|
||||
LogFile[] logfiles = this.LogParser.FileSelector(this, lstLogFile.ToArray());
|
||||
if (logfiles == null || logfiles.Length < 1) return;
|
||||
|
||||
if (this.chkAutoClear.Checked) this.BtnFileClear_Click(this.btnFileClear, new EventArgs());
|
||||
this.cboxLineNumber.Items.Clear();
|
||||
@@ -577,12 +594,13 @@ namespace DDUtilityApp.LOGPARSER
|
||||
this.LogParser.ModelID = this.Equipment.ModelID;
|
||||
}
|
||||
|
||||
foreach (string filename in selectedFiles)
|
||||
foreach (LogFile logfile in logfiles)
|
||||
{
|
||||
this.tboxFilename.Tag = Path.GetDirectoryName(filename);
|
||||
this.tboxFilename.Text = Path.GetFileName(filename);
|
||||
this.tboxFilename.Tag = logfile;
|
||||
this.tboxFilename.Text = logfile.FileName;
|
||||
this.BtnFileAdd_Click(this.btnFileAdd, new EventArgs());
|
||||
}
|
||||
this.tboxFilename.Tag = null;
|
||||
|
||||
if (this.chkAutoClear.Checked)
|
||||
this.BtnParsing_Click(this.btnParsing, new EventArgs());
|
||||
@@ -790,25 +808,20 @@ namespace DDUtilityApp.LOGPARSER
|
||||
{
|
||||
try
|
||||
{
|
||||
List<string> lstFileName = new List<string>();
|
||||
List<string> lstFullName = new List<string>();
|
||||
foreach (ListViewItem lviewItem in this.lviewFiles.Items)
|
||||
{
|
||||
if (lviewItem.Checked == false) continue;
|
||||
XLogger.Instance.Info(lviewItem.Text);
|
||||
|
||||
string sourceFileName = lviewItem.Tag as string;
|
||||
string destPath = GlobalVariable.Instance.DownloadPath;
|
||||
if (System.IO.Directory.Exists(destPath) == false) System.IO.Directory.CreateDirectory(destPath);
|
||||
LogFile logFile = lviewItem.Tag as LogFile;
|
||||
if (logFile == null) continue;
|
||||
|
||||
string destFileName = $@"{destPath}{System.IO.Path.GetFileName(sourceFileName)}";
|
||||
if (this.chkDownload.Checked == false) System.IO.File.Copy(sourceFileName, destFileName, true);
|
||||
sourceFileName = destFileName;
|
||||
|
||||
lstFileName.Add(sourceFileName);
|
||||
lstFullName.Add(logFile.DestFullName);
|
||||
}
|
||||
|
||||
foreach (string filename in lstFileName)
|
||||
Process.Start(filename);
|
||||
foreach (string fullName in lstFullName)
|
||||
Process.Start(fullName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -1274,11 +1287,105 @@ namespace DDUtilityApp.LOGPARSER
|
||||
|
||||
#region [ Method ] ----------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// [CheckPoint] 로그파일을 로컬에 복제(다운로드)후, 데이터를 생성한다
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private StandardCollection DownLoad_Parsing()
|
||||
{
|
||||
try
|
||||
{
|
||||
this.tboxLog.Clear();
|
||||
this.tboxException.Clear();
|
||||
this.StandardCollection.Clear();
|
||||
|
||||
List<string> lstFileName = new List<string>();
|
||||
string strTitle = string.Empty;
|
||||
string destPath = string.Empty;
|
||||
|
||||
// Process Unit: File
|
||||
foreach (ListViewItem lviewItem in this.lviewFiles.Items) //jhlim 20250202
|
||||
{
|
||||
if (lviewItem.Checked == false) continue;
|
||||
XLogger.Instance.Info(lviewItem.Text);
|
||||
|
||||
LogFile logFile = lviewItem.Tag as LogFile;
|
||||
switch(logFile.Account.Access)
|
||||
{
|
||||
case AccessType.SMB:
|
||||
{
|
||||
FileInfo fileInfo = new FileInfo(logFile.FullName);
|
||||
if (fileInfo.Exists == false) continue;
|
||||
|
||||
logFile.Length = fileInfo.Length;
|
||||
if (lviewItem.SubItems.Count < 2) lviewItem.SubItems.Add(logFile.GetFileSize());
|
||||
else lviewItem.SubItems[1].Text = logFile.GetFileSize();
|
||||
|
||||
if (this.chkDownload.Checked)
|
||||
{
|
||||
destPath = Path.Combine(GlobalVariable.Instance.DownloadPath, this.Equipment.EquipmentID);
|
||||
if (Directory.Exists(destPath) == false) Directory.CreateDirectory(destPath);
|
||||
|
||||
if (string.IsNullOrEmpty(strTitle)) strTitle = this.Equipment.MesName;
|
||||
logFile.DestFullName = Path.Combine(destPath, logFile.FileName);
|
||||
|
||||
File.Copy(logFile.FullName, logFile.DestFullName, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AccessType.FTPS:
|
||||
{
|
||||
if (FtpsClient._host != logFile.Account.IPAddress)
|
||||
FtpsClient.Initialize(logFile.Account.IPAddress, logFile.Account.UserID, logFile.Account.Password);
|
||||
FtpListItem ftpsFileInfo = FtpsClient.GetFileInfo(logFile.FullName);
|
||||
if (ftpsFileInfo == null) continue;
|
||||
|
||||
logFile.Length = ftpsFileInfo.Size;
|
||||
if (lviewItem.SubItems.Count < 2) lviewItem.SubItems.Add(logFile.GetFileSize());
|
||||
else lviewItem.SubItems[1].Text = logFile.GetFileSize();
|
||||
|
||||
if (this.chkDownload.Checked)
|
||||
{
|
||||
destPath = Path.Combine(GlobalVariable.Instance.DownloadPath, this.Equipment.EquipmentID);
|
||||
if (Directory.Exists(destPath) == false) Directory.CreateDirectory(destPath);
|
||||
|
||||
if (string.IsNullOrEmpty(strTitle)) strTitle = this.Equipment.MesName;
|
||||
logFile.DestFullName = Path.Combine(destPath, logFile.FileName);
|
||||
|
||||
FtpsClient.DownloadFtpsFile(logFile.FullName, logFile.DestFullName);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AccessType.SFTP:
|
||||
break;
|
||||
case AccessType.FTP:
|
||||
break;
|
||||
}
|
||||
|
||||
lstFileName.Add(logFile.DestFullName);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.tboxEISInfo04.Text)) this.LogParser.ModelID = this.tboxEISInfo04.Text;
|
||||
if (this.SECSDefine != null) this.LogParser.SECSDefine = this.SECSDefine;
|
||||
this.LogParser.Parsing(lstFileName.ToArray());
|
||||
this.Text = $"{strTitle} - Ver. {Application.ProductVersion}";
|
||||
this.tboxLog.Text = this.LogParser.LogString.ToString();
|
||||
this.StandardCollection.AddRange(this.LogParser.StandardCollection);
|
||||
|
||||
return this.StandardCollection;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XLogger.Instance.Fatal(ex);
|
||||
return this.StandardCollection;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [CheckPoint] 로그파일을 로컬에 복제후, 데이터를 생성한다
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private StandardCollection Parsing()
|
||||
private StandardCollection xParsing()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -252,9 +252,7 @@ namespace DDUtilityApp.DATA
|
||||
public class Account
|
||||
{
|
||||
|
||||
public enum AccessType { SMB, FTP ,FTPS, SFTP };
|
||||
|
||||
public AccessType Access { get; set; } = Account.AccessType.FTPS;
|
||||
public AccessType Access { get; set; } = AccessType.FTPS;
|
||||
|
||||
public string IPAddress { get; set; }
|
||||
|
||||
@@ -268,7 +266,7 @@ namespace DDUtilityApp.DATA
|
||||
{
|
||||
}
|
||||
|
||||
public Account(string ipAddress, string uid, string pwd, string defaultPath = "", AccessType access = AccessType.FTPS)
|
||||
public Account(string ipAddress, string uid, string pwd, string defaultPath = "", AccessType access = AccessType.SMB)
|
||||
{
|
||||
this.IPAddress = ipAddress;
|
||||
this.UserID = uid;
|
||||
|
||||
@@ -311,23 +311,20 @@ namespace DDUtilityApp.LOGPARSER.PARSER
|
||||
grid.AddColumn("Column5");
|
||||
}
|
||||
|
||||
public override string[] FileSelector(FrmLogParser sender, params string[] args)
|
||||
public override LogFile[] FileSelector(FrmLogParser sender, params LogFile[] args)
|
||||
{
|
||||
FrmEqSelector dlg = null;
|
||||
try
|
||||
{
|
||||
List<LogFile> lstLogFile = new List<LogFile>();
|
||||
foreach (string filename in args)
|
||||
{
|
||||
LogFile logFile = new LogFile(filename);
|
||||
lstLogFile.Add(logFile);
|
||||
}
|
||||
List<LogFile> logFiles = new List<LogFile>();
|
||||
logFiles.AddRange(args);
|
||||
|
||||
FrmEqSelector dlg = new FrmEqSelector();
|
||||
dlg = new FrmEqSelector();
|
||||
dlg.Owner = sender;
|
||||
dlg.Size = sender.Size;
|
||||
dlg.StartPosition = FormStartPosition.CenterParent;
|
||||
dlg.Equipment = sender.Equipment;
|
||||
dlg.SelectedLogFiles = lstLogFile.ToArray();
|
||||
dlg.SelectedLogFiles = logFiles.ToArray();
|
||||
DialogResult dlgResult = dlg.ShowDialog();
|
||||
if (dlgResult != DialogResult.OK) return null;
|
||||
|
||||
@@ -336,17 +333,18 @@ namespace DDUtilityApp.LOGPARSER.PARSER
|
||||
|
||||
sender.Equipment = equipment;
|
||||
sender.SECSDefine = dlg.SECSDefine;
|
||||
List<string> lstFilename = new List<string>();
|
||||
foreach (LogFile logFile in dlg.SelectedLogFiles)
|
||||
lstFilename.Add(logFile.FullName);
|
||||
|
||||
return lstFilename.ToArray();
|
||||
return dlg.SelectedLogFiles;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XLogger.Instance.Fatal(ex, true);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (dlg != null) dlg.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using DDUtilityApp.DATA;
|
||||
using DDUtilityApp.LOGPARSER.DATA;
|
||||
using DDUtilityApp.SECS;
|
||||
using JWH;
|
||||
@@ -367,49 +368,42 @@ namespace DDUtilityApp.LOGPARSER.PARSER
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
public override string[] FileSelector(FrmLogParser sender, params string[] args)
|
||||
public override LogFile[] FileSelector(FrmLogParser sender, params LogFile[] args)
|
||||
{
|
||||
FrmEqSelector dlg = null;
|
||||
try
|
||||
{
|
||||
List<LogFile> lstLogFile = new List<LogFile>();
|
||||
foreach (string filename in args)
|
||||
{
|
||||
LogFile logFile = new LogFile(filename);
|
||||
lstLogFile.Add(logFile);
|
||||
}
|
||||
lstLogFile.AddRange(args);
|
||||
|
||||
FrmEqSelector dlg = new FrmEqSelector();
|
||||
dlg = new FrmEqSelector();
|
||||
dlg.Owner = sender;
|
||||
dlg.Size = sender.Size;
|
||||
dlg.Size = new System.Drawing.Size(sender.Width - 60, sender.Height - 60);
|
||||
dlg.StartPosition = FormStartPosition.CenterParent;
|
||||
dlg.Equipment = sender.Equipment;
|
||||
dlg.ServerName = this.ServerName;
|
||||
dlg.EquipmentID = this.EquipmentID;
|
||||
dlg.Equipment = sender.Equipment == null ? new EisEquipment() { EquipmentID = this.EquipmentID, Server = new LogServer(this.ServerName)} : sender.Equipment;
|
||||
dlg.SelectedLogFiles = lstLogFile.ToArray();
|
||||
DialogResult dlgResult = dlg.ShowDialog();
|
||||
if (dlgResult != DialogResult.OK)
|
||||
{
|
||||
dlg.Dispose();
|
||||
return null;
|
||||
}
|
||||
if (dlgResult != DialogResult.OK) return null;
|
||||
|
||||
this.Account = dlg.Account;
|
||||
EisEquipment equipment = dlg.Equipment as EisEquipment;
|
||||
if (equipment == null) return null;
|
||||
|
||||
sender.Equipment = equipment;
|
||||
sender.SECSDefine = dlg.SECSDefine;
|
||||
List<string> lstFilename = new List<string>();
|
||||
foreach (LogFile logFile in dlg.SelectedLogFiles)
|
||||
lstFilename.Add(logFile.FullName);
|
||||
dlg.Dispose();
|
||||
|
||||
return lstFilename.ToArray();
|
||||
return dlg.SelectedLogFiles;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XLogger.Instance.Fatal(ex, true);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (dlg != null) dlg.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DDUtilityApp.DATA;
|
||||
using DDUtilityApp.LOGPARSER.DATA;
|
||||
using DDUtilityApp.SECS;
|
||||
using JWH;
|
||||
@@ -30,6 +31,11 @@ namespace DDUtilityApp.LOGPARSER.PARSER
|
||||
|
||||
public List<string> Files { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 로그서버 접속정보
|
||||
/// </summary>
|
||||
public Account Account { get; set; } = null;
|
||||
|
||||
public StandardCollection StandardCollection { get; set; } = new StandardCollection();
|
||||
|
||||
public StringBuilder LogString { get; set; } = new StringBuilder();
|
||||
@@ -100,14 +106,14 @@ namespace DDUtilityApp.LOGPARSER.PARSER
|
||||
{
|
||||
}
|
||||
|
||||
public virtual string[] FileSelector(FrmLogParser sender, params string[] args)
|
||||
public virtual LogFile[] FileSelector(FrmLogParser sender, params LogFile[] args)
|
||||
{
|
||||
string directoryName = string.Empty;
|
||||
string fileName = string.Empty;
|
||||
if (args != null && args.Length > 0)
|
||||
{
|
||||
directoryName = Path.GetDirectoryName(args[0]);
|
||||
fileName = Path.GetFileName(args[0]);
|
||||
directoryName = args[0].DirectoryName;
|
||||
fileName = args[0].FileName;
|
||||
}
|
||||
|
||||
OpenFileDialog dlg = new OpenFileDialog();
|
||||
@@ -116,7 +122,16 @@ namespace DDUtilityApp.LOGPARSER.PARSER
|
||||
dlg.FileName = fileName;
|
||||
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
return dlg.FileNames;
|
||||
{
|
||||
List<LogFile> lstFiles = new List<LogFile>();
|
||||
foreach (string name in dlg.FileNames)
|
||||
{
|
||||
FileInfo fileInfo = new FileInfo(name);
|
||||
lstFiles.Add(fileInfo.ToClass<LogFile>());
|
||||
}
|
||||
|
||||
return lstFiles.ToArray();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using JWH.CONTROL;
|
||||
using JWH.NETWORK;
|
||||
using MongoDB.Driver;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
@@ -188,12 +190,21 @@ namespace DDUtilityApp.MESDOWNLOADER
|
||||
{
|
||||
if (totalFiles > 1)
|
||||
{
|
||||
Util.GetFileMerge(mergefileList);
|
||||
string filename = Util.GetFileMerge(mergefileList);
|
||||
MessageBox.Show($"{totalFiles}개의 파일을 머지 하였습니다.");
|
||||
System.Diagnostics.Process.Start(filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"{gd.SelectedRows[0].Cells["Name"].Value} 파일을 저장 하였습니다.");
|
||||
string fileName = mergefileList[0];
|
||||
string extension = Path.GetExtension(fileName);
|
||||
if (string.Compare(extension, ".Log", true) != 0)
|
||||
{
|
||||
fileName += ".Log";
|
||||
File.Move(mergefileList[0], fileName);
|
||||
}
|
||||
System.Diagnostics.Process.Start(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ namespace DDUtilityApp.MESDOWNLOADER
|
||||
{
|
||||
public static class Util
|
||||
{
|
||||
public static int GetFileMerge(List<string> filePaths)
|
||||
public static string GetFileMerge(List<string> filePaths)
|
||||
{
|
||||
int rtnBint = 9; // 기본 실패 코드
|
||||
string mergedFilePath = string.Empty;
|
||||
|
||||
if (filePaths.Count == 0)
|
||||
{
|
||||
Console.WriteLine("병합할 파일이 없습니다.");
|
||||
return 1;
|
||||
return mergedFilePath;
|
||||
}
|
||||
|
||||
// 실행 시간 측정을 위한 Stopwatch 시작
|
||||
@@ -26,9 +26,10 @@ namespace DDUtilityApp.MESDOWNLOADER
|
||||
// 첫 번째 파일명에서 경로 제외
|
||||
string firstFileName = Path.GetFileName(filePaths.First());
|
||||
string mergedFileName = "merge_" + firstFileName;
|
||||
|
||||
// 병합된 파일을 저장할 경로 (첫 번째 파일과 동일한 폴더)
|
||||
string mergedFilePath = Path.Combine(Path.GetDirectoryName(filePaths.First()), mergedFileName);
|
||||
mergedFilePath = Path.Combine(Path.GetDirectoryName(filePaths.First()), mergedFileName);
|
||||
string extension = Path.GetExtension(mergedFilePath);
|
||||
if (string.Compare(extension, ".Log", true) != 0) mergedFilePath = mergedFilePath + ".Log";
|
||||
|
||||
try
|
||||
{
|
||||
@@ -56,14 +57,14 @@ namespace DDUtilityApp.MESDOWNLOADER
|
||||
Console.WriteLine($"모든 파일이 {mergedFileName}로 병합되었습니다.");
|
||||
Console.WriteLine($"병합 실행 시간: {stopwatch.ElapsedMilliseconds} ms");
|
||||
|
||||
rtnBint = 0; // 성공 코드
|
||||
return mergedFilePath;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"오류 발생: {ex.Message}");
|
||||
}
|
||||
|
||||
return rtnBint;
|
||||
return mergedFilePath;
|
||||
}
|
||||
|
||||
public static string GetStr(object str )
|
||||
|
||||
@@ -28,38 +28,71 @@ namespace JWH.MONGODB
|
||||
return item;
|
||||
}
|
||||
|
||||
public static List<TraceCollection> GetCollectionData(string collectionName, DateTime dtStart, DateTime dtEnd, TraceCollection condition = null)
|
||||
public static async void GetCollectionColumns(string collectionName)
|
||||
{
|
||||
MongoClient client = new MongoClient(ConnectionString);
|
||||
IMongoDatabase database = client.GetDatabase(DatabaseName);
|
||||
IMongoCollection<TraceCollection> collection = database.GetCollection<TraceCollection>(collectionName);
|
||||
var collection = database.GetCollection<BsonDocument>(collectionName);
|
||||
|
||||
// # ALL Data
|
||||
//var lst = collection.Find(_ => true).ToList();
|
||||
// # Use BsonDocument
|
||||
//var filter = new BsonDocument("LotID", "13089570006B");
|
||||
// # Use Builders.Filter
|
||||
//var filterBuilder = Builders<TraceCollection>.Filter;
|
||||
//var filter = filterBuilder.Eq(x => x.LotID, "13109360026B");
|
||||
var pipeline = new[]
|
||||
{
|
||||
new BsonDocument("$project", new BsonDocument("fields", new BsonDocument("$objectToArray", "$$ROOT"))),
|
||||
new BsonDocument("$unwind", "$fields"),
|
||||
new BsonDocument("$group", new BsonDocument("_id", BsonNull.Value).Add("uniqueFields", new BsonDocument("$addToSet", "$fields.k")))
|
||||
};
|
||||
|
||||
FilterDefinitionBuilder<TraceCollection> filterBuilder = Builders<TraceCollection>.Filter;
|
||||
FilterDefinition<TraceCollection> filter = filterBuilder.Gte(x => x.EVENTTIME, dtStart) & filterBuilder.Lt(x => x.EVENTTIME, dtEnd);
|
||||
if (condition != null)
|
||||
var result = await collection.Aggregate<BsonDocument>(pipeline).FirstOrDefaultAsync();
|
||||
|
||||
if (result != null && result.Contains("uniqueFields"))
|
||||
{
|
||||
string[] SkipPropertys = new string[] { "_id", "EVENTTIME" };
|
||||
foreach (PropertyInfo property in condition.GetType().GetProperties())
|
||||
var fields = result["uniqueFields"].AsBsonArray.Select(f => f.AsString);
|
||||
Console.WriteLine("컬렉션의 필드 목록:");
|
||||
foreach (var field in fields)
|
||||
{
|
||||
object value = property.GetValue(condition);
|
||||
if (value != null)
|
||||
{
|
||||
if (property.Name.Equals("LotID")) filter &= filterBuilder.Eq(x => x.LotID, value);
|
||||
continue;
|
||||
}
|
||||
Console.WriteLine(field);
|
||||
}
|
||||
}
|
||||
List<TraceCollection> document = collection.Find(filter).ToList();
|
||||
}
|
||||
|
||||
return document;
|
||||
public static List<TraceCollection> GetCollectionData(string collectionName, DateTime dtStart, DateTime dtEnd, TraceCollection condition = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
MongoClient client = new MongoClient(ConnectionString);
|
||||
IMongoDatabase database = client.GetDatabase(DatabaseName);
|
||||
IMongoCollection<TraceCollection> collection = database.GetCollection<TraceCollection>(collectionName);
|
||||
|
||||
// # ALL Data
|
||||
//var lst = collection.Find(_ => true).ToList();
|
||||
// # Use BsonDocument
|
||||
//var filter = new BsonDocument("LotID", "13089570006B");
|
||||
// # Use Builders.Filter
|
||||
//var filterBuilder = Builders<TraceCollection>.Filter;
|
||||
//var filter = filterBuilder.Eq(x => x.LotID, "13109360026B");
|
||||
|
||||
FilterDefinitionBuilder<TraceCollection> filterBuilder = Builders<TraceCollection>.Filter;
|
||||
FilterDefinition<TraceCollection> filter = filterBuilder.Gte(x => x.EVENTTIME, dtStart) & filterBuilder.Lt(x => x.EVENTTIME, dtEnd);
|
||||
if (condition != null)
|
||||
{
|
||||
string[] SkipPropertys = new string[] { "_id", "EVENTTIME" };
|
||||
foreach (PropertyInfo property in condition.GetType().GetProperties())
|
||||
{
|
||||
object value = property.GetValue(condition);
|
||||
if (value != null)
|
||||
{
|
||||
if (property.Name.Equals("LotID")) filter &= filterBuilder.Eq(x => x.LotID, value);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
List<TraceCollection> document = collection.Find(filter).ToList();
|
||||
|
||||
return document;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool GetCollectionSize_Flag = false;
|
||||
@@ -150,35 +183,52 @@ namespace JWH.MONGODB
|
||||
|
||||
public ObjectId _id { get; set; }
|
||||
|
||||
public List<object> LotList { get; set; }
|
||||
|
||||
[BsonDateTimeOptions(Kind = DateTimeKind.Local)]
|
||||
public DateTime EVENTTIME { get; set; }
|
||||
|
||||
public string ProcessID { get; set; }
|
||||
|
||||
public string UnitState { get; set; }
|
||||
|
||||
|
||||
public string VIDName { get; set; }
|
||||
|
||||
public object Value { get; set; }
|
||||
|
||||
public string LotID { get; set; }
|
||||
public string Sign { get; set; }
|
||||
|
||||
public string MaterialID { get; set; }
|
||||
public List<object> LotList { get; set; }
|
||||
|
||||
public string LotID { get; set; }
|
||||
|
||||
public string ProductID { get; set; }
|
||||
|
||||
public object UnitNO { get; set; }
|
||||
|
||||
public string Recipe { get; set; }
|
||||
|
||||
public string ProcessID { get; set; }
|
||||
public object UnitNO { get; set; }
|
||||
|
||||
public string VORNR { get; set; }
|
||||
|
||||
public string UnitState { get; set; }
|
||||
public string MaterialID { get; set; }
|
||||
|
||||
public string Sign { get; set; }
|
||||
public string CarrierId { get; set; }
|
||||
|
||||
public string PanelId { get; set; }
|
||||
|
||||
public string Position { get; set; }
|
||||
|
||||
public string MarkingId { get; set; }
|
||||
|
||||
public string Step { get; set; }
|
||||
|
||||
public double LowerSV { get; set; }
|
||||
|
||||
public double UpperSV { get; set; }
|
||||
|
||||
public string MongGoUnitName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using JWH;
|
||||
using JWH.MONGODB;
|
||||
using MongoDB.Bson;
|
||||
@@ -101,19 +102,22 @@ namespace DDUtilityApp.MONGO
|
||||
List<TraceCollection> data = null;
|
||||
try
|
||||
{
|
||||
string collectionName = $"{this.EquipmentID}.{this.VID}";
|
||||
//FDCMongoDB.GetCollectionColumns(collectionName);
|
||||
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
this.ssName.Text = "GRID";
|
||||
|
||||
DateTime dtStart = this.DateTimeStart;
|
||||
DateTime dtEnd = this.DateTimeEnd;
|
||||
data = FDCMongoDB.GetCollectionData($"{this.EquipmentID}.{this.VID}", dtStart, dtEnd);
|
||||
data = FDCMongoDB.GetCollectionData(collectionName, dtStart, dtEnd);
|
||||
timeStart = this.StatusLabelDisplay(this.ssStatus01, "수집", timeStart, DateTime.Now);
|
||||
|
||||
this.grid.AutoBinding(data.ToArray());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
XLogger.Instance.Fatal(ex, true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -369,6 +373,7 @@ namespace DDUtilityApp.MONGO
|
||||
this.grid.AddColumn("EVENTTIME", "EventTime");
|
||||
this.grid.AddColumn("VIDName");
|
||||
this.grid.AddColumn("Value");
|
||||
this.grid.AddColumn("Sign");
|
||||
this.grid.AddColumn("LotID");
|
||||
this.grid.AddColumn("MaterialID");
|
||||
this.grid.AddColumn("ProductID");
|
||||
@@ -377,7 +382,14 @@ namespace DDUtilityApp.MONGO
|
||||
this.grid.AddColumn("ProcessID");
|
||||
this.grid.AddColumn("VORNR");
|
||||
this.grid.AddColumn("UnitState");
|
||||
this.grid.AddColumn("Sign");
|
||||
this.grid.AddColumn("Step");
|
||||
this.grid.AddColumn("LowerSV");
|
||||
this.grid.AddColumn("UpperSV");
|
||||
this.grid.AddColumn("CarrierId");
|
||||
this.grid.AddColumn("PanelId");
|
||||
this.grid.AddColumn("Position");
|
||||
this.grid.AddColumn("MarkingId");
|
||||
this.grid.AddColumn("MongGoUnitName");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -70,15 +70,14 @@ namespace DDUtilityApp
|
||||
|
||||
#region [ 버튼 생성 정보 ]
|
||||
frmMain.Buttons.Add("EIS Log Viewer", new EisParser0());
|
||||
frmMain.Buttons.Add("MES Log Download", typeof(MESDOWNLOADER.ServerLog)); // 위치
|
||||
frmMain.Buttons.Add("MIS Log Viewer", new AgvParser()); // 제거
|
||||
frmMain.Buttons.Add("MES Log Download", typeof(MESDOWNLOADER.ServerLog));
|
||||
//frmMain.Buttons.Add("MIS Log Viewer", new AgvParser()); // 제거
|
||||
frmMain.Buttons.Add("FDC Mongo Viewer", typeof(MONGO.FrmFDCMongo));
|
||||
frmMain.Buttons.Add("TIB Simulator", typeof(TIBRENDEZVOUS.FrmSimulator01));
|
||||
frmMain.Buttons.Add("HSMS Converter", typeof(LOGPARSER.FrmHsmsViewer));
|
||||
frmMain.Buttons.Add("TIB Simulator", typeof(TIBRENDEZVOUS.FrmSimulator01));
|
||||
frmMain.Buttons.Add("TibcoConfig.Xml", typeof(ETC.FrmTIbcoConfig));
|
||||
#if DEBUG
|
||||
frmMain.Buttons.Add("FTP Test", typeof(SPECDOCUMENT.FrmSpecDocument));
|
||||
// frmMain.Buttons.Add("MES Log Download", typeof(MESDOWNLOADER.ServerLog));
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
@@ -89,7 +88,7 @@ namespace DDUtilityApp
|
||||
if (frmMain.SelectedObject is Type)
|
||||
{
|
||||
Type frmType = frmMain.SelectedObject as Type;
|
||||
// 관리자 권한으로 실행
|
||||
// 목록에 등록된 클래스는 관리자 권한으로 실행
|
||||
if (new string[] { "FRMTIBCOCONFIG" }.Contains(frmType.Name.ToUpper()))
|
||||
{
|
||||
if (IsAdministrator() == false)
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
|
||||
// 지정되도록 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2025.01.07.0")]
|
||||
[assembly: AssemblyFileVersion("2025.01.07.0")]
|
||||
[assembly: AssemblyVersion("2025.02.28.0")]
|
||||
[assembly: AssemblyFileVersion("2025.02.28.0")]
|
||||
|
||||
22
DDUtilityApp/ViewList.xml
Normal file
22
DDUtilityApp/ViewList.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Viewer>
|
||||
<Server name="MES">
|
||||
<Item name="AP01" url="192.168.8.223" dir="/MESLog" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
<Item name="AP02" url="192.168.8.224" dir="/MESLog" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
</Server>
|
||||
<Server name="MES(Backup)">
|
||||
<Item name="AP01" url="192.168.8.223" dir="/MESLogBU" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
<Item name="AP02" url="192.168.8.224" dir="/MESLogBU" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
</Server>
|
||||
<Server name="RMS">
|
||||
<Item name="AP01" url="192.168.8.223" dir="/RMSLog" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
<Item name="AP02" url="192.168.8.224" dir="/RMSLog" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
</Server>
|
||||
<Server name="FDC">
|
||||
<Item name="AP01" url="192.168.8.212" dir="/FDCLog" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
</Server>
|
||||
<Server name="RMS">
|
||||
<Item name="AP01" url="192.168.8.221" dir="/RTDLog" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
<Item name="AP02" url="192.168.8.222" dir="/RTDLog" conkey="bG9ndXNlcjpEYWVkdWNrITE="/>
|
||||
</Server>
|
||||
</Viewer>
|
||||
@@ -19,16 +19,16 @@ Global
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Debug|x64.Build.0 = Debug|x64
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Release|Any CPU.Build.0 = Release|x64
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Release|x64.ActiveCfg = Release|x64
|
||||
{B8459F14-92D3-482C-A932-65E76E6D11F6}.Release|x64.Build.0 = Release|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Debug|x64.Build.0 = Debug|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Release|Any CPU.Build.0 = Release|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Release|x64.ActiveCfg = Release|x64
|
||||
{004BC1F3-B24A-402D-92ED-C5FC501E915A}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
|
||||
@@ -397,6 +397,46 @@ namespace JWH
|
||||
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>();
|
||||
|
||||
@@ -674,7 +674,7 @@ namespace JWH
|
||||
SetMDC(eMDCKey.Class, strClassFullName);
|
||||
SetMDC(eMDCKey.Method, strMethod);
|
||||
|
||||
result = $"{strConsole}" + (e != null ? Environment.NewLine + e.ToString() : "");
|
||||
result = $"{strConsole}" + (e != null ? string.Format("{0}{2}", Environment.NewLine, e.Message, e.ToString()) : "");
|
||||
switch (level)
|
||||
{
|
||||
case eXLogLevel.Debug:
|
||||
|
||||
@@ -1,115 +1,177 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using FluentFTP;
|
||||
using Org.BouncyCastle.Crypto.Agreement.JPake;
|
||||
|
||||
namespace JWH.NETWORK
|
||||
{
|
||||
public static class FtpsClient
|
||||
{
|
||||
private static FluentFTP.FtpClient _ftpClient;
|
||||
private static string _host;
|
||||
public static string _host { get; private set; }
|
||||
private static int _port = 990; // FTPS 기본 포트
|
||||
private static string _userId;
|
||||
private static string _password;
|
||||
|
||||
public static void Initialize(string host, string userId, string password, int port = 990)
|
||||
{
|
||||
_host = host;
|
||||
_userId = userId;
|
||||
_password = password;
|
||||
_port = port;
|
||||
|
||||
_ftpClient = new FluentFTP.FtpClient(_host, _port, new NetworkCredential(_userId, _password))
|
||||
try
|
||||
{
|
||||
//EncryptionMode = FtpEncryptionMode.Explicit,
|
||||
EncryptionMode = FtpEncryptionMode.Implicit,
|
||||
SslProtocols = System.Security.Authentication.SslProtocols.Tls12,
|
||||
ConnectTimeout = 500 // 타임아웃 설정 (0.5초)
|
||||
};
|
||||
_ftpClient.ValidateCertificate += (control, args) => args.Accept = true; // 인증서 검증 비활성화 (운영 확인 필요!)
|
||||
_host = host;
|
||||
_userId = userId;
|
||||
_password = password;
|
||||
_port = port;
|
||||
|
||||
_ftpClient = new FluentFTP.FtpClient(_host, _port, new NetworkCredential(_userId, _password))
|
||||
{
|
||||
//EncryptionMode = FtpEncryptionMode.Explicit,
|
||||
EncryptionMode = FtpEncryptionMode.Implicit,
|
||||
SslProtocols = System.Security.Authentication.SslProtocols.Tls12,
|
||||
ConnectTimeout = 500 // 타임아웃 설정 (0.5초)
|
||||
};
|
||||
_ftpClient.ValidateCertificate += (control, args) => args.Accept = true; // 인증서 검증 비활성화 (운영 확인 필요!)
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static void Connect()
|
||||
{
|
||||
if (_ftpClient == null)
|
||||
try
|
||||
{
|
||||
throw new InvalidOperationException("FTPS client is not initialized. Call Initialize() first.");
|
||||
}
|
||||
if (_ftpClient == null)
|
||||
throw new InvalidOperationException("FTPS client is not initialized. Call Initialize() first.");
|
||||
|
||||
if (!_ftpClient.IsConnected)
|
||||
if (!_ftpClient.IsConnected)
|
||||
_ftpClient.Connect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_ftpClient.Connect();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Disconnect()
|
||||
{
|
||||
if (_ftpClient != null && _ftpClient.IsConnected)
|
||||
try
|
||||
{
|
||||
if (_ftpClient != null && _ftpClient.IsConnected)
|
||||
_ftpClient.Disconnect();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_ftpClient.Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsFileExists(string path)
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.FileExists(path);
|
||||
try
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.FileExists(path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsDirExists(string path)
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.DirectoryExists(path);
|
||||
try
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.DirectoryExists(path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static FtpListItem[] GetFtpsList(string path)
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.GetListing(path);
|
||||
try
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.GetListing(path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static object GetObjectInfo(string filePath)
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.GetObjectInfo(filePath);
|
||||
try
|
||||
{
|
||||
Connect();
|
||||
return _ftpClient.GetObjectInfo(filePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static FtpListItem GetFileInfo(string remoteFilePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
FtpsClient.Connect();
|
||||
Connect();
|
||||
|
||||
if (!_ftpClient.IsConnected)
|
||||
{
|
||||
Console.WriteLine("FTPS 서버에 연결되지 않았습니다.");
|
||||
return null;
|
||||
}
|
||||
throw new InvalidOperationException("FTPS 서버에 연결되지 않았습니다.");
|
||||
|
||||
// Passive Mode 설정 (필요한 경우)
|
||||
// _ftpClient.SetPassiveMode(true);
|
||||
// _ftpClient.SetPassiveMode(true);
|
||||
|
||||
if (!FtpsClient.IsFileExists(remoteFilePath))
|
||||
{
|
||||
Console.WriteLine("파일이 존재하지 않습니다.");
|
||||
return null;
|
||||
}
|
||||
throw new InvalidOperationException("파일이 존재하지 않습니다.");
|
||||
|
||||
var fileInfo = FtpsClient.GetObjectInfo(remoteFilePath) ;
|
||||
var fileInfo = FtpsClient.GetObjectInfo(remoteFilePath);
|
||||
if (fileInfo == null)
|
||||
{
|
||||
Console.WriteLine("파일 정보를 가져오는 데 실패했습니다.");
|
||||
}
|
||||
throw new InvalidOperationException("파일 정보를 가져오는 데 실패했습니다.");
|
||||
|
||||
return (FtpListItem)fileInfo;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"파일 정보 조회 오류: {ex.Message}");
|
||||
return null;
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
FtpsClient.Disconnect();
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,8 +185,11 @@ namespace JWH.NETWORK
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Download error: {ex.Message}");
|
||||
return false;
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +203,11 @@ namespace JWH.NETWORK
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Upload error: {ex.Message}");
|
||||
return false;
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,19 @@ namespace JWH.NETWORK
|
||||
|
||||
public static bool IsFileExists(string path)
|
||||
{
|
||||
Connect();
|
||||
return _sftpClient.Exists(path);
|
||||
try
|
||||
{
|
||||
Connect();
|
||||
return _sftpClient.Exists(path);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static Renci.SshNet.Sftp.SftpFileAttributes GetFileInfo(string remoteFilePath)
|
||||
@@ -74,12 +85,27 @@ namespace JWH.NETWORK
|
||||
Console.WriteLine($"파일 정보 조회 오류: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static object GetSftpList(string path)
|
||||
{
|
||||
Connect();
|
||||
return _sftpClient.ListDirectory(path);
|
||||
try
|
||||
{
|
||||
Connect();
|
||||
return _sftpClient.ListDirectory(path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool DownloadSftpFile(string remotePath, string localPath)
|
||||
@@ -98,6 +124,10 @@ namespace JWH.NETWORK
|
||||
Console.WriteLine($"Download error: {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool UploadSftpFile(string localPath, string remotePath)
|
||||
@@ -116,6 +146,10 @@ namespace JWH.NETWORK
|
||||
Console.WriteLine($"Upload error: {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user