한글 Encoding, 병합시 파일시간 기준
This commit is contained in:
@@ -53,6 +53,9 @@ namespace DDUtilityApp
|
|||||||
bool isAdmin = false;
|
bool isAdmin = false;
|
||||||
string adminPWD = ConfigurationManager.AppSettings["ADMIN"];
|
string adminPWD = ConfigurationManager.AppSettings["ADMIN"];
|
||||||
if (adminPWD != null && adminPWD == "daeduck!1") isAdmin = true;
|
if (adminPWD != null && adminPWD == "daeduck!1") isAdmin = true;
|
||||||
|
#if DEBUG
|
||||||
|
isAdmin = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
int btnWidth = 200;
|
int btnWidth = 200;
|
||||||
int btnHeight = 32;
|
int btnHeight = 32;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ namespace DDUtilityApp.MESDOWNLOADER
|
|||||||
rowFile["Name"] = file.Name;
|
rowFile["Name"] = file.Name;
|
||||||
rowFile["FileName"] = file.Name;
|
rowFile["FileName"] = file.Name;
|
||||||
rowFile["Size"] = this.GetFileSize(file.Size, FileSizeType.MB);
|
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["Type"] = file.Type;
|
||||||
rowFile["url"] = url;
|
rowFile["url"] = url;
|
||||||
rowFile["dir"] = dir;
|
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("Name") { ReadOnly=true, IsVisible = false });
|
||||||
this.gridFiles.Columns.Add(new GridViewTextBoxColumn("FileName") { ReadOnly = true });
|
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("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 });
|
this.gridFiles.Columns.Add(new GridViewTextBoxColumn("Type") { ReadOnly = true });
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -328,14 +328,21 @@ namespace DDUtilityApp.MESDOWNLOADER
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 선택된 파일들 추가
|
// 선택된 파일들 추가
|
||||||
|
List<DataRow> rowsSRC = new List<DataRow>();
|
||||||
foreach(GridViewRowInfo row in this.gridFiles.SelectedRows)
|
foreach(GridViewRowInfo row in this.gridFiles.SelectedRows)
|
||||||
{
|
{
|
||||||
DataRowView view = row.DataBoundItem as DataRowView;
|
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;
|
bool hasZip = false;
|
||||||
using (ProgressForm frmProgress = new ProgressForm(rows.Count))
|
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("Name", typeof(string));
|
||||||
this.DTFileInfo.Columns.Add("FileName", typeof(string));
|
this.DTFileInfo.Columns.Add("FileName", typeof(string));
|
||||||
this.DTFileInfo.Columns.Add("Size", 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("Type", typeof(string));
|
||||||
this.DTFileInfo.Columns.Add("url", typeof(string));
|
this.DTFileInfo.Columns.Add("url", typeof(string));
|
||||||
this.DTFileInfo.Columns.Add("dir", typeof(string));
|
this.DTFileInfo.Columns.Add("dir", typeof(string));
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ namespace DDUtilityApp.MESDOWNLOADER
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (StreamWriter writer = new StreamWriter(mergedFilePath, false)) // false: 새 파일 생성
|
using (StreamWriter writer = new StreamWriter(mergedFilePath, false, Encoding.Default))
|
||||||
{
|
{
|
||||||
foreach (string file in filePaths)
|
foreach (string file in filePaths)
|
||||||
{
|
{
|
||||||
if (File.Exists(file))
|
if (File.Exists(file))
|
||||||
{
|
{
|
||||||
using (StreamReader reader = new StreamReader(file))
|
using (StreamReader reader = new StreamReader(file, Encoding.Default))
|
||||||
{
|
{
|
||||||
writer.Write(reader.ReadToEnd());
|
writer.Write(reader.ReadToEnd());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
|
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
|
||||||
// 지정되도록 할 수 있습니다.
|
// 지정되도록 할 수 있습니다.
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2025.03.18.4")]
|
[assembly: AssemblyVersion("2025.03.18.5")]
|
||||||
[assembly: AssemblyFileVersion("2025.03.18.4")]
|
[assembly: AssemblyFileVersion("2025.03.18.5")]
|
||||||
|
|||||||
Reference in New Issue
Block a user