public Logic(int size, DelegateShow show) { this.size = size; map = new int[size, size]; this.show = show; Ni = 0; flag = false; flag2 = false; }
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; }
public Logic(int size, DelegateShow show) { this.size = size; map = new int[size, size]; this.show = show; }