한글 Encoding, 병합시 파일시간 기준

This commit is contained in:
2025-03-18 15:00:37 +09:00
parent fda27adace
commit f3d11daf94
4 changed files with 19 additions and 9 deletions

View File

@@ -53,6 +53,9 @@ namespace DDUtilityApp
bool isAdmin = false;
string adminPWD = ConfigurationManager.AppSettings["ADMIN"];
if (adminPWD != null && adminPWD == "daeduck!1") isAdmin = true;
#if DEBUG
isAdmin = true;
#endif
int btnWidth = 200;
int btnHeight = 32;

View File

@@ -181,7 +181,7 @@ namespace DDUtilityApp.MESDOWNLOADER
rowFile["Name"] = file.Name;
rowFile["FileName"] = file.Name;
rowFile["Size"] = this.GetFileSize(file.Size, FileSizeType.MB);
rowFile["Modified"] = file.Modified.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
rowFile["Modified"] = file.Modified.ToLocalTime();
rowFile["Type"] = file.Type;
rowFile["url"] = url;
rowFile["dir"] = dir;
@@ -289,7 +289,7 @@ namespace DDUtilityApp.MESDOWNLOADER
this.gridFiles.Columns.Add(new GridViewTextBoxColumn("Name") { ReadOnly=true, IsVisible = false });
this.gridFiles.Columns.Add(new GridViewTextBoxColumn("FileName") { ReadOnly = true });
this.gridFiles.Columns.Add(new GridViewTextBoxColumn("Size") { ReadOnly = true, TextAlignment = ContentAlignment.MiddleRight });
this.gridFiles.Columns.Add(new GridViewTextBoxColumn("Modified") { ReadOnly = true });
this.gridFiles.Columns.Add(new GridViewDateTimeColumn("Modified") { ReadOnly = true });
this.gridFiles.Columns.Add(new GridViewTextBoxColumn("Type") { ReadOnly = true });
}
catch (Exception ex)
@@ -328,14 +328,21 @@ namespace DDUtilityApp.MESDOWNLOADER
else
{
// 선택된 파일들 추가
List<DataRow> rowsSRC = new List<DataRow>();
foreach(GridViewRowInfo row in this.gridFiles.SelectedRows)
{
DataRowView view = row.DataBoundItem as DataRowView;
if (view != null && view.Row != null) rows.Add(view.Row);
if (view != null && view.Row != null) rowsSRC.Add(view.Row);
}
// 수정일자 정렬
foreach (DataRow row in rowsSRC.OrderBy(row => row.Field<DateTime>("Modified")))
rows.Add(row);
}
// 다운로드
// 다운로드
bool hasZip = false;
using (ProgressForm frmProgress = new ProgressForm(rows.Count))
{
@@ -438,7 +445,7 @@ namespace DDUtilityApp.MESDOWNLOADER
this.DTFileInfo.Columns.Add("Name", typeof(string));
this.DTFileInfo.Columns.Add("FileName", typeof(string));
this.DTFileInfo.Columns.Add("Size", typeof(string));
this.DTFileInfo.Columns.Add("Modified", typeof(string));
this.DTFileInfo.Columns.Add("Modified", typeof(DateTime));
this.DTFileInfo.Columns.Add("Type", typeof(string));
this.DTFileInfo.Columns.Add("url", typeof(string));
this.DTFileInfo.Columns.Add("dir", typeof(string));

View File

@@ -33,13 +33,13 @@ namespace DDUtilityApp.MESDOWNLOADER
try
{
using (StreamWriter writer = new StreamWriter(mergedFilePath, false)) // false: 새 파일 생성
using (StreamWriter writer = new StreamWriter(mergedFilePath, false, Encoding.Default))
{
foreach (string file in filePaths)
{
if (File.Exists(file))
{
using (StreamReader reader = new StreamReader(file))
using (StreamReader reader = new StreamReader(file, Encoding.Default))
{
writer.Write(reader.ReadToEnd());
}

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2025.03.18.4")]
[assembly: AssemblyFileVersion("2025.03.18.4")]
[assembly: AssemblyVersion("2025.03.18.5")]
[assembly: AssemblyFileVersion("2025.03.18.5")]