コード例 #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);
                    }
                }
            }
        }
コード例 #2
0
ファイル: Display.cs プロジェクト: cbnolok/SphereSvrSource
		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 );
					}
				}
			}
		}