示例#1
0
        /// <summary>
        ///     Called when the Game ends.
        /// </summary>
        /// <param name="args">
        ///     The <see cref="GameEndEventArgs" /> instance containing the event data.
        /// </param>
        private static void Game_OnEnd(GameEndEventArgs args)
        {
            var gameEndPacket = new GameEndPacket(client.CreateMessage());
            gameEndPacket.Send(client);

            client.Shutdown(string.Empty);
        }
示例#2
0
        /// <summary>
        ///     Called when the domain is unloaded.
        /// </summary>
        /// <param name="sender">
        ///     The sender.
        /// </param>
        /// <param name="e">
        ///     The <see cref="EventArgs" /> instance containing the event data.
        /// </param>
        private static void CurrentDomainDomainUnload(object sender, EventArgs e)
        {
            var gameEndPacket = new GameEndPacket(client.CreateMessage());
            gameEndPacket.Send(client);

            client.Shutdown(string.Empty);
        }