Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 public Logic(int size, DelegateShow show)
 {
     this.size = size;
     map       = new int[size, size];
     this.show = show;
 }
Exemplo n.º 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);
 }