|
|
|
@ -1,5 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Data; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
@ -19,9 +21,25 @@ namespace formula_manage.EX |
|
|
|
/// </summary>
|
|
|
|
public partial class Exchange : Window |
|
|
|
{ |
|
|
|
string Log_time = DateTime.Now.ToString("yyyy-MM-dd"); |
|
|
|
DataTable logdataTable = new DataTable(); //建立log缓存
|
|
|
|
|
|
|
|
public Exchange() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
|
|
|
|
logdataTable.Columns.Add("Name", typeof(string)); |
|
|
|
logdataTable.Columns.Add("length", typeof(int)); |
|
|
|
|
|
|
|
LOG_file(); |
|
|
|
} |
|
|
|
private void LOG_file()//建立列表
|
|
|
|
{ |
|
|
|
DirectoryInfo loginfo = new DirectoryInfo(System.Environment.CurrentDirectory + "\\Exchange"); //new文件夹
|
|
|
|
FileInfo[] logFile = loginfo.GetFiles("*.log");//生成文件夹中的文件名合集
|
|
|
|
// logdataTable.ItemsSource = logFile;//加载合集
|
|
|
|
// logFile.fill()
|
|
|
|
//gridLog.DisplayMemberPath = "Name"; // 显示文件名
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|