Example #1
0
        static void csClient_OnConnectionStateChanged(object sender, KDF.ClientEventArgs.ConnectionStateChangedEventArgs e)
        {
            GSClient client = (GSClient)sender;

            if (e.Connected && !e.LoggedIn)
            {
                client.Login();
            }
            else if (e.Connected && e.LoggedIn)
            {
                client.JoinRoom();
            }
        }
Example #2
0
        void _cardClient_OnConnectionStateChanged(object sender, ConnectionStateChangedEventArgs e)
        {
            GSClient client = (GSClient)sender;

            tbxLog.AppendText(string.Format("The connectionstate of CardServer-Client changed, the client is {0} connected and {1} logged in\r\n", client.Connected ? "" : "not", client.LoggedIn ? "" : "not"));

            if (e.Connected && !e.LoggedIn)
            {
                client.Login();
            }
            else if (e.Connected && e.LoggedIn)
            {
                client.JoinRoom();
            }
        }