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.
|
|
|
|
using HslCommunication.LogNet;
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
private ILogNet logNet = ILogNetFactory.GetLogNet;
|
|
|
|
|
|
|
|
|
|
public Form1()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
logNet.ConsoleOutput = true;
|
|
|
|
|
|
|
|
|
|
logNet.WriteInfo("nihao");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果所有的日志在记录之前需要在控制台显示出来
|
|
|
|
|
logNet.BeforeSaveToFile += (object sender, HslEventArgs e) =>
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(e.HslMessage.ToString());
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|