コード例 #1
0
 private void btnStart_Click(object sender, EventArgs e)
 {
     try
     {
         PacketMonitor.StartMonitor();
         SetMonitorButtonStatus();
     }
     catch (ArgumentException ex)
     {
         MessageBox.Show($"{ex.Message}.\r\rRun command IpConfig /all at a windows CMD prompt to find your network.", "Packet Monitor Failed to Start", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Exception occurred: " + ex.ToString(), "Packet Monitor Failed to Start", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
コード例 #2
0
        static void Main(string[] args)
        {
            var pm = new PacketMonitor();

            pm.OnPingSample += PmOnOnPingSample;

            var monitor = new FFXIVNetworkMonitor();

            monitor.MessageReceived = pm.MessageReceived;
            monitor.MessageSent     = pm.MessageSent;
            monitor.Start();


            Console.WriteLine("Press any key to stop...");
            Console.ReadKey();

            monitor.Stop();
        }
コード例 #3
0
 private void btnStop_Click(object sender, EventArgs e)
 {
     PacketMonitor.StopMonitor();
     SetMonitorButtonStatus();
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: DOSSTONED/testPrograms
 void PMonitor_NewPacket(PacketMonitor pm, Packet p)
 {
     p.DestinationAddress.ToString();//throw new NotImplementedException();
 }
コード例 #5
0
ファイル: Form1.cs プロジェクト: DOSSTONED/testPrograms
 private void Form1_Load(object sender, EventArgs e)
 {
     PMonitor            = new PacketMonitor(System.Net.IPAddress.Parse("DOSSTONED"));
     PMonitor.NewPacket += new NewPacketEventHandler(PMonitor_NewPacket);
     PMonitor.Start6();
 }