//starts client
        public void Run()
        {
            mClientForm = new ClientForm(this);

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

            threads.Start();
            mClientForm.ShowDialog();
        }
Beispiel #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();
        }
Beispiel #3
0
 public static void RunClientForm()
 {
     ClientForm form = new ClientForm();
     Application.Run(form);
 }
Beispiel #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     ClientForm clientForm = new ClientForm();
     clientForm.Show();
 }
Beispiel #5
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            ClientForm c = new ClientForm();

            c.Show();
        }