Ejemplo n.º 1
0
        private void miAttach_Click(object sender, System.EventArgs e)
        {
            SelectProcess selProc = new SelectProcess();

            selProc.TopMost = TopMost;
            if (selProc.ShowDialog() == DialogResult.OK)
            {
                Process process = selProc.GetSelectedProcess();

                if (process != null)
                {
                    try
                    {
                        PacketPump pump = new PacketPump(this, new PacketPumpPacketHandler(m_PacketRecorder.PacketPumpDequeue));
                        pump.Start(process);

                        PacketPump = pump;
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString(), "Packet pump error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void OnExit(object sender, System.EventArgs e)
        {
            if (PacketPump != null)
            {
                PacketPump = null;
            }

            if (m_PacketRecorder != null)
            {
                m_PacketRecorder.Dispose();
            }
        }
Ejemplo n.º 3
0
        public void PacketPumpDequeue(PacketPump packetPump)
        {
            TimePacket packet = packetPump.Dequeue();

            if (packet != null)
            {
                m_Packets.Add(packet);

                UpdateTables(packet);

                if (OnPacket != null)
                {
                    OnPacket(packet);
                }
            }
        }
Ejemplo n.º 4
0
        private void miStart_Click(object sender, System.EventArgs e)
        {
            if (ofdStart.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    PacketPump pump = new PacketPump(this, new PacketPumpPacketHandler(m_PacketRecorder.PacketPumpDequeue));
                    pump.Start(ofdStart.FileName);

                    PacketPump = pump;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "Packet pump error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 5
0
 private void miDetach_Click(object sender, System.EventArgs e)
 {
     PacketPump = null;
 }
Ejemplo n.º 6
0
		public void PacketPumpDequeue( PacketPump packetPump )
		{
			TimePacket packet = packetPump.Dequeue();
			if ( packet != null )
			{
				m_Packets.Add( packet );

				UpdateTables( packet );

				if ( OnPacket != null )
					OnPacket( packet );
			}
		}
Ejemplo n.º 7
0
 private void PacketPumpTerminated()
 {
     PacketPump = null;
 }
Ejemplo n.º 8
0
		private void miDetach_Click( object sender, System.EventArgs e )
		{
			PacketPump = null;
		}
Ejemplo n.º 9
0
		private void miAttach_Click( object sender, System.EventArgs e )
		{
			SelectProcess selProc = new SelectProcess();
			selProc.TopMost = TopMost;
			if ( selProc.ShowDialog() == DialogResult.OK )
			{
				Process process = selProc.GetSelectedProcess();

				if ( process != null )
				{
					try
					{
						PacketPump pump = new PacketPump( this, new PacketPumpPacketHandler( m_PacketRecorder.PacketPumpDequeue ) );
						pump.Start( process );

						PacketPump = pump;
					}
					catch ( Exception ex )
					{
						MessageBox.Show( ex.ToString(), "Packet pump error", MessageBoxButtons.OK, MessageBoxIcon.Error );
					}
				}
			}
		}
Ejemplo n.º 10
0
		private void miStart_Click( object sender, System.EventArgs e )
		{
			if ( ofdStart.ShowDialog() == DialogResult.OK )
			{
				try
				{
					PacketPump pump = new PacketPump( this, new PacketPumpPacketHandler( m_PacketRecorder.PacketPumpDequeue ) );
					pump.Start( ofdStart.FileName );

					PacketPump = pump;
				}
				catch ( Exception ex )
				{
					MessageBox.Show( ex.ToString(), "Packet pump error", MessageBoxButtons.OK, MessageBoxIcon.Error );
				}
			}
		}
Ejemplo n.º 11
0
		private void OnExit( object sender, System.EventArgs e )
		{
			if ( PacketPump != null )
				PacketPump = null;

			if ( m_PacketRecorder != null )
				m_PacketRecorder.Dispose();
		}
Ejemplo n.º 12
0
		private void PacketPumpTerminated()
		{
			PacketPump = null;
		}