Beispiel #1
0
 public Logic(int size, DelegateShow show)
 {
     this.size = size;
     map       = new int[size, size];
     this.show = show;
     Ni        = 0;
     flag      = false;
     flag2     = false;
 }
Beispiel #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     RecShow = new DelegateShow(ShowRec);
     m_udpReceiveCallback = new AsyncCallback(RecvFromCallback);
     m_udpBuf             = new byte[2048];
     udpOut = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
     udpOut.Bind(new IPEndPoint(IPAddress.Any, int.Parse(tbxPort.Text)));
     BeginReceiveUDP(udpOut, this);
 }
 private void btnProccess_Click(object sender, EventArgs e)
 {
     if (!isContinue)
     {
         btnProccess.Text = "&Стоп";
         delegateShow     = new DelegateShow(ShowPacket);
         ReturnPacket returnPacket = new ReturnPacket(RecievePacket);
         ps = new PacketSniffer(returnPacket);
         ps.StartSniff(cbIP.Text);
     }
     else
     {
         btnProccess.Text = "&Начать";
         ps.CloseSocket();
     }
     isContinue    = !isContinue;
     ps.IsContinue = isContinue;
     cbIP.Enabled  = !cbIP.Enabled;
 }
Beispiel #4
0
 public Logic(int size, DelegateShow show)
 {
     this.size = size;
     map       = new int[size, size];
     this.show = show;
 }
Beispiel #5
0
 private void Form1_Load(object sender, EventArgs e)
 {
     RecShow = new DelegateShow(ShowRec);
     m_udpReceiveCallback = new AsyncCallback(RecvFromCallback);
     m_udpBuf = new byte[2048];
     udpOut = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
     udpOut.Bind(new IPEndPoint(IPAddress.Any, int.Parse(tbxPort.Text)));
     BeginReceiveUDP(udpOut, this);
 }