65 lines
1.6 KiB
C#
65 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using SkinSE;
|
|
// ReSharper disable IdentifierTypo
|
|
|
|
namespace UFIDA.U8.Framework.Api.App
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
{
|
|
var skin = new SkinSE_Net();
|
|
|
|
skin.Init_NET(panel1, 1);
|
|
skin.Init_NET(panel1, 1);
|
|
skin.Init_NET(this, 0);
|
|
}
|
|
|
|
private void TsmiConfig_Click(object sender, EventArgs e)
|
|
{
|
|
var frm = new ApiConfig();
|
|
frm.ShowDialog();
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
var path = ConfigurationManager.AppSettings["ServerPath"];
|
|
|
|
var logPath = Path.Combine(path, "Log", $"Log_{dateTimePicker1.Value:yyyyMMdd}.log");
|
|
|
|
|
|
var reader = new StreamReader(logPath,Encoding.Default);
|
|
|
|
var tk = reader.ReadToEndAsync();
|
|
|
|
richTextBox1.Text = tk.Result;
|
|
|
|
reader.Close();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
richTextBox1.Text = ex.Message;
|
|
MessageBox.Show($@"未查询到{dateTimePicker1.Value:yyyy-MM-dd}的日志文件");
|
|
}
|
|
}
|
|
}
|
|
}
|