You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CaiQie/RfidWeb/Form1.cs

42 lines
806 B
C#

2 months ago
using HslCommunication.LogNet;
using System;
3 months ago
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Tool;
namespace RfidWeb
{
public partial class Form1 : Form
{
2 months ago
private ILogNet logNet = ILogNetFactory.GetLogNet;
3 months ago
public Form1()
{
InitializeComponent();
2 months ago
logNet.ConsoleOutput = true;
logNet.WriteInfo("nihao");
// 如果所有的日志在记录之前需要在控制台显示出来
logNet.BeforeSaveToFile += (object sender, HslEventArgs e) =>
{
Console.WriteLine(e.HslMessage.ToString());
};
3 months ago
}
}
}