借助网络配置,控制Modbus工具的日志显示,避免卡死界面
智能大石头
authored at
2021-12-11 22:09:19
XCoder
using System;
using Gtk;
using NewLife;
using NewLife.Log;
namespace XCoder
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
XTrace.UseConsole();
MachineInfo.RegisterAsync();
GLib.ExceptionManager.UnhandledException += ExceptionManager_UnhandledException;
// 检查环境
GtkHelper.CheckRuntime();
Application.Init();
var window = new SharpApp();
window.ShowAll();
// Window.InteractiveDebugging = true;
//XTrace2.UseWinForm(window);
Application.Run();
}
private static void ExceptionManager_UnhandledException(GLib.UnhandledExceptionArgs args)
{
if (args.ExceptionObject is Exception ex) XTrace.WriteException(ex);
}
}
}
|