📄 snmptraphandler.cs
字号:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Messaging;
using System.Runtime.InteropServices;
using System.Threading;
using System.Net.Sockets;
using System.Diagnostics;
using System.Net;
using System.Text;
using System.IO;
using System.Xml;
using WinSnmp;
namespace SnmpTrapHandler
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class SnmpTrapHandler
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Console.WriteLine("\nSnmpTrapHandler test program - v1.0\nWritten for .NET Developer's Journal\n\nListening for all traps.\n");
//
// Start the trap handler
//
TrapHandler th = new TrapHandler();
th.Start();
//
// Wait for a key...
//
Console.WriteLine("Press enter at anytime to exit...\n");
Console.ReadLine();
//
// Stop the trap handler and exit
//
th.Stop();
return;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -