Esempio n. 1
0
 private void ChallengeChange(Object sender, ServerChallengeChangedEventArgs e)
 {
     PBUCONServer server = sender as PBUCONServer;
     if (rtb.InvokeRequired)
     {
         rtb.Invoke(new MethodInvoker(
             delegate {
                 tab.ImageIndex = 1; // Tick the tab. TODO: Still needs improvement if there's a disconnection (which is near impossible to detect)
                 rtb.AppendText("Server challenge now " + e.NewServerChallenge.ToString("X8") + ", was " + e.OldServerChallenge.ToString("X8") + "\n");
                 ScrollRTB();
             }
         ));
     }
 }
Esempio n. 2
0
        private void OnServerChallengeChanged(UInt32 newChallenge)
        {
            UInt32 oldChallenge = this.serverChallenge;
            SetServerChallenge(newChallenge);

            ServerChallengeChangedEventArgs e = new ServerChallengeChangedEventArgs(newChallenge, oldChallenge);
            EventArgExtensions.Raise<ServerChallengeChangedEventArgs>(e, this, ref ServerChallengeChanged);
        }
Esempio n. 3
0
 // Need this because a heartbeat needs to be sent when the challenge is changed
 private void ServerChallengeChange(Object sender, ServerChallengeChangedEventArgs e)
 {
     PBUCONServer server = sender as PBUCONServer;
     SendHeartbeat(server);
 }