Exemplo n.º 1
0
        //starts client
        public void Run()
        {
            mClientForm = new ClientForm(this);

            //sets up new thread
            Thread threads = new Thread(ProcessServerResponse);

            threads.Start();
            mClientForm.ShowDialog();
        }
Exemplo n.º 2
0
        private void InitClient(PacketHeader packetHeader, Connection connection, string serverIp)
        {
            string address = (connection.ToString().Split('>').Last()).Split('(').First();

            Debug.Print(String.Format(".{0}.\n", address));
            string clientIP = address.Split(':').First().Replace(" ", "");

            Debug.Print(String.Format(".{0}.\n", clientIP));

            int clientPort = int.Parse(address.Split(':').Last());

            Debug.Print(String.Format(".{0}.\n", clientPort.ToString()));



            ClientForm clientForm = new ClientForm(clientIP, clientPort, serverIp);

            clientsForms.Add(new Tuple <string, ClientForm>(clientIP + clientPort.ToString(), clientForm));

            clientForm.ShowDialog();
        }
Exemplo n.º 3
0
 public static void RunClientForm()
 {
     ClientForm form = new ClientForm();
     Application.Run(form);
 }
Exemplo n.º 4
0
 private void button2_Click(object sender, EventArgs e)
 {
     ClientForm clientForm = new ClientForm();
     clientForm.Show();
 }
Exemplo n.º 5
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            ClientForm c = new ClientForm();

            c.Show();
        }