추가패치

This commit is contained in:
2025-03-05 10:00:08 +09:00
parent 8b39c28efb
commit fb46e2b17a
12 changed files with 356 additions and 139 deletions

View File

@@ -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

View File

@@ -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);
}
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.ServerName = this.ServerName;
dlg.EquipmentID = this.EquipmentID;
dlg.SelectedLogFiles = lstLogFile.ToArray();
dlg.Equipment = sender.Equipment;
dlg.SelectedLogFiles = logFiles.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

View File

@@ -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 = Path.GetDirectoryName(args[0].Name);
fileName = Path.GetFileName(args[0].Name);
}
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;
}