Esempio n. 1
0
 private void ConnectExpansion()
 {
     if (PPDExpansionCore.Tcp.Client.IsListening(PPDSetting.Setting.ExpansionWaitPort) && gameutility.SongInformation != null)
     {
         expansionClient = new PPDExpansionCore.Tcp.Client(PPDSetting.Setting.ExpansionWaitPort);
         expansionClient.Start();
         SendScoreInfo();
         SendPlayerInfo();
     }
 }
Esempio n. 2
0
        protected override void DisposeResource()
        {
            client.Closed         -= client_Closed;
            byteReader.ByteReaded -= TcpByteReader_ByteReaded;

            if (expansionClient != null)
            {
                expansionClient.Close();
                expansionClient = null;
            }

            foreach (GameComponent gc in shouldDisposeItem)
            {
                if (gc != null)
                {
                    gc.Dispose();
                }
            }
            shouldDisposeItem.Clear();

            base.DisposeResource();
        }