log信息添加
This commit is contained in:
commit
3bdeeb028d
4 files changed
+70
-3
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -27,6 +28,9 @@ namespace formula_manage.Windows
|
||||
}
|
||||
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini";
|
||||
|
||||
string logpath = System.Environment.CurrentDirectory + "\\Log";//日志文件目录
|
||||
string logPath = "" + System.Environment.CurrentDirectory + "\\Log\\Log.txt";//日志文件
|
||||
string Log_time = "[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]:";
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) //窗口关闭事件
|
||||
{
|
||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);
|
||||
@@ -37,6 +41,12 @@ namespace formula_manage.Windows
|
||||
Configini.IniWritevalue("SOFTWARE_SET", " T1", Prepose.Text);
|
||||
Configini.IniWritevalue("SOFTWARE_SET", " T2", TimeFormat.Text);
|
||||
Configini.IniWritevalue("SOFTWARE_SET", " T3", Order.Text);
|
||||
|
||||
System.IO.DirectoryInfo log = new System.IO.DirectoryInfo(@logpath);//生成日志文件目录
|
||||
FileStream fs = new FileStream(logPath, FileMode.Append, FileAccess.Write);
|
||||
StreamWriter wr = new StreamWriter(fs);//创建文件
|
||||
wr.WriteLine(Log_time + "FORMULA_SET:INIFile_Write");
|
||||
wr.Close();
|
||||
}
|
||||
|
||||
bool Loginlink;
|
||||
|
||||
Reference in new issue
Block a user