示例#1
0
        private void unregisterServerButton_Click(object sender, EventArgs e)
        {
            burraForm = new BurraForm();
            burraForm.Show(this);

            unregistFromServerWorker.RunWorkerAsync();
        }
示例#2
0
        private void registerServerButton_Click(object sender, EventArgs e)
        {
            burraForm = new BurraForm();
            burraForm.Show(this);

            string ipAddress = addressTextBox.Text.Trim();
            Protocol protocol = protocolComboBox.SelectedIndex == 0 ? Protocol.TCP : Protocol.HTTP;
            int port = int.Parse(portTextBox.Text.Trim());
            string serverName = serverNameTextBox.Text.Trim();
            EndPointInfo endPointInfo = new EndPointInfo(serverName, ipAddress, protocol, port);

            registOnServerWorker.RunWorkerAsync(endPointInfo);
        }