Skip to content

Commit

Permalink
Update v1.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gemilepus committed Dec 8, 2023
1 parent ef21591 commit f451300
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Metro/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ public MainWindow()
mDataGrid.DataContext = null;
mDataTable.Add(new MainTable() { Enable = true, Mode = "Delay", Action = "200", Event = "", Note = "" });
mDataGrid.DataContext = mDataTable;
mEdit.StartEdit("");
}

#endregion
Expand Down Expand Up @@ -2320,6 +2321,7 @@ private void Btn_New_Click(object sender, RoutedEventArgs e)
mDataGrid.DataContext = mDataTable;

ScriptName.Text = "";
mEdit.StartEdit("");

// .ini
var parser = new FileIniDataParser();
Expand Down
10 changes: 8 additions & 2 deletions Metro/Util/Edit.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.IO;
using SharpDX;
using System.IO;
using System.Windows.Shapes;

namespace Metro
{
public class Edit
{
public string ModifiedTime, FilePath;
public string ModifiedTime="", FilePath;

public void StartEdit(string path)
{
Expand All @@ -14,6 +16,10 @@ public void StartEdit(string path)

public string GetModifiedTime(string path)
{
if (!File.Exists(path))
{
return "";
}
FileInfo mFileInfo = new FileInfo(path);

return mFileInfo.LastWriteTime.ToString();
Expand Down

0 comments on commit f451300

Please sign in to comment.