Compare commits
2 Commits
f92e560e87
...
0b7f4ba366
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b7f4ba366 | |||
| 933519164e |
115
DDUtilityApp/LOGPARSER/FrmEqSelector.Designer.cs
generated
115
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();
|
||||
@@ -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
|
||||
//
|
||||
@@ -556,6 +556,7 @@
|
||||
// rstatus1
|
||||
//
|
||||
this.rstatus1.Name = "rstatus1";
|
||||
this.radStatusStrip1.SetSpring(this.rstatus1, false);
|
||||
this.rstatus1.Text = "";
|
||||
this.rstatus1.TextWrap = true;
|
||||
//
|
||||
@@ -597,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();
|
||||
@@ -642,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;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ 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;
|
||||
@@ -214,27 +215,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(GetLogFiles(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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,6 +428,9 @@ namespace DDUtilityApp.LOGPARSER
|
||||
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;
|
||||
@@ -393,6 +441,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
string path = string.Empty;
|
||||
|
||||
#region [ Model Details ]
|
||||
|
||||
// 모델 버전 정보
|
||||
EisModelDetails[] modelDetails = this.GetModelDetails(equipment);
|
||||
this.gridModelDetail.AutoBinding(modelDetails);
|
||||
@@ -415,6 +464,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
{
|
||||
this.tboxModelDescription.Text = modelInfo[0].Description;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [ LogFiles ]
|
||||
@@ -464,10 +514,8 @@ namespace DDUtilityApp.LOGPARSER
|
||||
if (ftpFiles != null) this.gridLogFiles.AutoBinding(this.GetLogFiles(ftpFiles));
|
||||
this.rstatus1.Text = $"Path={this.Account.IPAddress}{path}";
|
||||
|
||||
if (FtpsClient.IsDirExists($"{path}/THiRA_SECSGEM/HSMS"))
|
||||
{ if (!tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Add(tabPage4); }
|
||||
else
|
||||
{ if (tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Remove(tabPage4); }
|
||||
//if (FtpsClient.IsDirExists($"{path}/THiRA_SECSGEM/HSMS") && !this.tabControl1.TabPages.Contains(tabHSMS))
|
||||
// this.tabControl1.TabPages.Add(this.tabHSMS);
|
||||
|
||||
FtpsClient.Disconnect();
|
||||
}
|
||||
@@ -482,10 +530,8 @@ namespace DDUtilityApp.LOGPARSER
|
||||
if (ftpFiles != null) this.gridLogFiles.AutoBinding(this.GetLogFiles(ftpFiles));
|
||||
this.rstatus1.Text = $"Path={this.Account.IPAddress}{path}";
|
||||
|
||||
if (StpClientWrap.IsDirExists($"{path}/THiRA_SECSGEM/HSMS"))
|
||||
{ if (!tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Add(tabPage4); }
|
||||
else
|
||||
{ if (tabControl1.TabPages.Contains(tabPage4)) tabControl1.TabPages.Remove(tabPage4); }
|
||||
//if (StpClientWrap.IsDirExists($"{path}/THiRA_SECSGEM/HSMS") && !this.tabControl1.TabPages.Contains(tabHSMS))
|
||||
// this.tabControl1.TabPages.Add(this.tabHSMS);
|
||||
|
||||
StpClientWrap.Disconnect();
|
||||
}
|
||||
@@ -500,6 +546,12 @@ namespace DDUtilityApp.LOGPARSER
|
||||
|
||||
#endregion
|
||||
|
||||
#region [ Workflow & HSMS ]
|
||||
|
||||
this.tabControl1_SelectedIndexChanged(this.tabControl1, new EventArgs());
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -618,16 +670,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -768,7 +820,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
grid.AddColumn("Length");
|
||||
grid.AddColumn("LastWriteTime");
|
||||
|
||||
grid.AddContextMenu("");
|
||||
//grid.AddContextMenu("");
|
||||
//grid.AddContextMenu("Open Log", GridEquipments_OpenWindows);
|
||||
}
|
||||
|
||||
@@ -813,28 +865,54 @@ namespace DDUtilityApp.LOGPARSER
|
||||
/// <param name="e"></param>
|
||||
private void Grid_CellDoubleClick(object sender, GridViewCellEventArgs e)
|
||||
{
|
||||
RadGridView gd = sender.GetType().Name.Contains("GridDataCellElement") ?
|
||||
((GridDataCellElement)sender)?.RowElement?.GridControl : (GridViewEx)sender;
|
||||
try
|
||||
{
|
||||
List<string> downfiles = new List<string>();
|
||||
foreach (GridViewRowInfo row in gd.SelectedRows)
|
||||
{
|
||||
LogFile item = row.DataBoundItem as LogFile;
|
||||
var fullPath = item.FullName;
|
||||
string destPath = GlobalVariable.Instance.DownloadPath;
|
||||
string destPath = Path.Combine(GlobalVariable.Instance.DownloadPath, this.Equipment.EquipmentID);
|
||||
|
||||
if (System.IO.Directory.Exists(destPath) == false) System.IO.Directory.CreateDirectory(destPath);
|
||||
string destFileName = $@"{destPath}{System.IO.Path.GetFileName(fullPath)}";
|
||||
FtpsClient.DownloadFtpsFile(fullPath, destFileName);
|
||||
downfiles.Add(destFileName);
|
||||
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, Path.GetFileName(logFile.FullName));
|
||||
|
||||
switch (this.Account.Access)
|
||||
{
|
||||
case AccessType.SMB:
|
||||
{ }
|
||||
break;
|
||||
case AccessType.FTPS:
|
||||
{
|
||||
FtpsClient.DownloadFtpsFile(logFile.FullName, destFileName);
|
||||
downfiles.Add(destFileName);
|
||||
}
|
||||
break;
|
||||
case AccessType.SFTP:
|
||||
{
|
||||
StpClientWrap.DownloadSftpFile(logFile.FullName, destFileName);
|
||||
downfiles.Add(destFileName);
|
||||
}
|
||||
break;
|
||||
case AccessType.FTP:
|
||||
{ }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox.Show($"{gd.SelectedRows.Count}개의 파일을 저장하였습니다.");
|
||||
|
||||
//System.Diagnostics.Process.Start($"explorer.exe", $"/select,{argument}");
|
||||
foreach(string command in downfiles)
|
||||
System.Diagnostics.Process.Start(command);
|
||||
MessageBox.Show($"{grid.SelectedRows.Count}개의 파일을 저장하였습니다.");
|
||||
foreach (string file in downfiles)
|
||||
System.Diagnostics.Process.Start(file);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -520,7 +520,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);
|
||||
@@ -1298,7 +1298,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
/// [CheckPoint] 로그파일을 로컬에 복제(다운로드)후, 데이터를 생성한다
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private StandardCollection Parsing()
|
||||
private StandardCollection DownLoad_Parsing()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1318,7 +1318,7 @@ namespace DDUtilityApp.LOGPARSER
|
||||
XLogger.Instance.Info(lviewItem.Text);
|
||||
|
||||
LogFile logFile = lviewItem.Tag as LogFile;
|
||||
switch(logFile.Account.Access)
|
||||
switch(this.Account.Access)
|
||||
{
|
||||
case AccessType.SMB:
|
||||
{
|
||||
|
||||
@@ -381,7 +381,7 @@ namespace DDUtilityApp.LOGPARSER.PARSER
|
||||
dlg.Size = sender.Size;
|
||||
dlg.StartPosition = FormStartPosition.CenterParent;
|
||||
dlg.ServerName = this.ServerName;
|
||||
dlg.Equipment = sender.Equipment;
|
||||
dlg.Equipment = sender.Equipment == null ? new EisEquipment() { EquipmentID = this.EquipmentID, Server = new LogServer(this.ServerName)} : sender.Equipment;
|
||||
dlg.SelectedLogFiles = logFiles.ToArray();
|
||||
DialogResult dlgResult = dlg.ShowDialog();
|
||||
if (dlgResult != DialogResult.OK) return null;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user