Exemple #1
0
        }   // end of Callback_Ping()

        public void Callback_PutWorldData(AsyncResult result)
        {
            LevelMetadata uploadedLevel = result.Param as LevelMetadata;

            if (result.Success && uploadedLevel != null && uploadedLevel.LinkedToLevel != null)
            {
                LevelMetadata nextLevel = uploadedLevel.NextLink();

                if (nextLevel != null)
                {
                    string folderName = Utils.FolderNameFromFlags(nextLevel.Genres);
                    string fullPath   = BokuGame.Settings.MediaPath + folderName + nextLevel.WorldId.ToString() + @".Xml";

                    // Read it back from disk and start uploading it to the community.
                    BokuShared.Wire.WorldPacket packet = XmlDataHelper.ReadWorldPacketFromDisk(fullPath);

                    UploadWorldData(packet, nextLevel);

                    return;
                }
            }

            if (result.Success)
            {
                ShowShareSuccessDialog();
            }
            else
            {
                ShowShareErrorDialog("Share failed.");
            }
        }   // end of Callback_PutWorldData()