private void HostMigrated(object sender, HostMigratedEventArgs dpMessage)
 {
     if (LocalPlayerID == dpMessage.Message.NewHostID) {
         // This application instance is the new host, update the UI
         parent.Text += " (HOST)";
     }
 }
 private void HostMigrated(object sender, HostMigratedEventArgs dpMessage)
 {
     if (LocalPlayerID == dpMessage.Message.NewHostID)
     {
         // This application instance is the new host, update the UI
         parent.Text += " (HOST)";
     }
 }
Example #3
0
 /// <summary>
 /// The host was migrated, see if you're the new host
 /// </summary>
 private void HostMigrated(object sender, HostMigratedEventArgs e)
 {
     if (localPlayerId == e.Message.NewHostID)
     {
         // I'm the new host, update my UI
         this.Text += " (HOST)";
     }
 }
Example #4
0
        /// <summary>
        /// Handler for incoming DirectPlay HostMigrated events
        /// </summary>
        public void HostMigratedHandler(object sender, HostMigratedEventArgs args)
        {
            PlayerInformation info = m_Peer.GetPeerInformation(args.Message.NewHostID);

            // See if we are the new host
            if (info.Local)
            {
                m_Connection = ConnectionType.Hosting;
                UpdateUI();
            }
        }