파일일자 변경 ToLocalTime

This commit is contained in:
2025-03-18 13:46:23 +09:00
parent f57a9ae1ff
commit fda27adace
6 changed files with 48 additions and 29 deletions

View File

@@ -6,7 +6,7 @@
<appSettings> <appSettings>
<add key="ClientSettingsProvider.ServiceUri" value=""/> <add key="ClientSettingsProvider.ServiceUri" value=""/>
<add key="BULK_VIEWER" value="ViewList.xml" /> <add key="BULK_VIEWER" value="ViewList.xml" />
</appSettings> </appSettings>
<system.web> <system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider"> <membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers> <providers>

View File

@@ -1,8 +1,10 @@
using JWH; using JWH;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using Telerik.WinControls.UI;
namespace DDUtilityApp namespace DDUtilityApp
{ {
@@ -11,7 +13,7 @@ namespace DDUtilityApp
public object SelectedObject { get; set; } = null; public object SelectedObject { get; set; } = null;
public Dictionary<string, object> Buttons { get; set; } = new Dictionary<string, object>(); public List<DynamicControl> Buttons { get; set; } = new List<DynamicControl>();
public FrmMain() public FrmMain()
{ {
@@ -21,7 +23,7 @@ namespace DDUtilityApp
this.SetEventHandler(); this.SetEventHandler();
} }
public FrmMain(Dictionary<string, object> args) : this() public FrmMain(List<DynamicControl> args) : this()
{ {
this.Buttons = args; this.Buttons = args;
this.SetButtons(); this.SetButtons();
@@ -48,21 +50,24 @@ namespace DDUtilityApp
{ {
try try
{ {
bool isAdmin = false;
string adminPWD = ConfigurationManager.AppSettings["ADMIN"];
if (adminPWD != null && adminPWD == "daeduck!1") isAdmin = true;
int btnWidth = 200; int btnWidth = 200;
int btnHeight = 32; int btnHeight = 32;
int tabIndex = 0; int tabIndex = 10;
List<Button> lstControls = new List<Button>(); List<Button> lstControls = new List<Button>();
foreach(string name in this.Buttons.Keys) foreach(DynamicControl obj in this.Buttons)
{ {
object obj = this.Buttons[name];
Button button = new Button(); Button button = new Button();
button.Text = name; button.Text = obj.Name;
button.Size = new Size(btnWidth, btnHeight); button.Size = new Size(btnWidth, btnHeight);
button.Dock = DockStyle.Top; button.Dock = DockStyle.Top;
button.TabIndex = tabIndex++; button.TabIndex = tabIndex++;
button.Tag = obj; button.Tag = obj.Value;
button.Visible = obj.Visible | isAdmin;
button.Click += Button_Click; button.Click += Button_Click;
lstControls.Add(button); lstControls.Add(button);
} }

View File

@@ -1469,9 +1469,9 @@ namespace DDUtilityApp.LOGPARSER
Account = this.Account, Account = this.Account,
FullName = item.FullName, FullName = item.FullName,
Length = item.Size, Length = item.Size,
CreationTime = item.Modified, CreationTime = item.Created.ToLocalTime(),
LastAccessTime = item.Modified, LastAccessTime = item.Modified.ToLocalTime(),
LastWriteTime = item.Modified LastWriteTime = item.Modified.ToLocalTime()
}) })
.OrderByDescending(x => x.Name) .OrderByDescending(x => x.Name)
.ToArray(); .ToArray();

View File

@@ -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.ToString("yyyy-MM-dd HH:mm:ss"); rowFile["Modified"] = file.Modified.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
rowFile["Type"] = file.Type; rowFile["Type"] = file.Type;
rowFile["url"] = url; rowFile["url"] = url;
rowFile["dir"] = dir; rowFile["dir"] = dir;

View File

@@ -30,8 +30,6 @@ namespace DDUtilityApp
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Form frm = null; Form frm = null;
bool isShowServerLodDownload = false;
if (args.Length > 0) if (args.Length > 0)
{ {
if (string.Compare(args[0], "FrmLogParser", true) == 0 && args.Length >= 3) if (string.Compare(args[0], "FrmLogParser", true) == 0 && args.Length >= 3)
@@ -57,10 +55,6 @@ namespace DDUtilityApp
} }
frm = frmFDCMongo; frm = frmFDCMongo;
} }
if (string.Compare(args[0], "daeduck!1") == 0)
{
isShowServerLodDownload = true;
}
} }
if (frm == null) if (frm == null)
@@ -74,16 +68,16 @@ namespace DDUtilityApp
frmMain.FormBorderStyle = FormBorderStyle.FixedDialog; frmMain.FormBorderStyle = FormBorderStyle.FixedDialog;
#region [ ] #region [ ]
frmMain.Buttons.Add("EIS Log Viewer", new EisParser0()); frmMain.Buttons.Add(new DynamicControl("EIS Log Viewer", new EisParser0()));
//frmMain.Buttons.Add("MES Log Download", typeof(MESDOWNLOADER.ServerLog)); //frmMain.Buttons.Add("MES Log Download", typeof(MESDOWNLOADER.ServerLog));
if (isShowServerLodDownload) frmMain.Buttons.Add("ServerLog Download", typeof(MESDOWNLOADER.FrmServerLog)); frmMain.Buttons.Add(new DynamicControl("ServerLog Download", typeof(MESDOWNLOADER.FrmServerLog), false));
//frmMain.Buttons.Add("MIS Log Viewer", new AgvParser()); // 제거 //frmMain.Buttons.Add("MIS Log Viewer", new AgvParser());
frmMain.Buttons.Add("FDC Mongo Viewer", typeof(MONGO.FrmFDCMongo)); frmMain.Buttons.Add(new DynamicControl("FDC Mongo Viewer", typeof(MONGO.FrmFDCMongo)));
frmMain.Buttons.Add("HSMS Converter", typeof(LOGPARSER.FrmHsmsViewer)); frmMain.Buttons.Add(new DynamicControl("HSMS Converter", typeof(LOGPARSER.FrmHsmsViewer)));
frmMain.Buttons.Add("TIB Simulator", typeof(TIBRENDEZVOUS.FrmSimulator01)); frmMain.Buttons.Add(new DynamicControl("TIB Simulator", typeof(TIBRENDEZVOUS.FrmSimulator01)));
frmMain.Buttons.Add("TibcoConfig.Xml", typeof(ETC.FrmTIbcoConfig)); frmMain.Buttons.Add(new DynamicControl("TibcoConfig.Xml", typeof(ETC.FrmTIbcoConfig)));
#if DEBUG #if DEBUG
frmMain.Buttons.Add("FTP Test", typeof(SPECDOCUMENT.FrmSpecDocument)); frmMain.Buttons.Add(new DynamicControl("FTP Test", typeof(SPECDOCUMENT.FrmSpecDocument)));
#endif #endif
#endregion #endregion
@@ -224,4 +218,24 @@ namespace DDUtilityApp
} }
public class DynamicControl
{
public string Name { get; set; } = string.Empty;
public object Value { get; set; } = null;
public bool Visible { get; set; } = true;
public DynamicControl(string name, object value, bool visible = true)
{
this.Name = name;
this.Value = value;
this.Visible = visible;
}
}
} }

View File

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