示例#1
0
 private void Client_Connected(object sender, ClientConnectedEventArgs e)
 {
     Invoke((MethodInvoker)(() => { btnVerbinden.Enabled = false; }));
     Invoke((MethodInvoker)(() => { txtPort.Enabled = false; }));
     Invoke((MethodInvoker)(() => { txtIp.Enabled = false; }));
     Invoke((MethodInvoker)(() => { lblStatus.Text = string.Format("Verbindungsstatus: Verbunden"); }));
     Invoke((MethodInvoker)(() => { lblStatus.ForeColor = Color.Green; }));
 }
示例#2
0
        private void OnClientConnected(ClientConnectedEventArgs e)
        {
            ClientConnectedEventHandler handler = ClientConnected;

            if (handler != null)
            {
                handler(this, e);
            }
        }
示例#3
0
        protected void OnConnected(ClientConnectedEventArgs e)
        {
            ConnectedEventHandler conHandler = Connected;

            if (conHandler != null)
            {
                conHandler(this, e);
            }
        }