// Checks for corrupted worlds and refreshes the table cells.
        private void OnLoadingFinished(IMyAsyncResult result, MyGuiScreenProgressAsync screen)
        {
            var loadListRes = (MyLoadListResult)result;

            m_loadedDirectories.Add(CurrentDirectory);
            foreach (var saveTuple in loadListRes.AvailableSaves)
            {
                if (!m_loadedWorldsByFilePaths.ContainsKey(saveTuple.Item1))
                {
                    // add if new
                    m_loadedWorldsByFilePaths.Add(saveTuple.Item1, saveTuple.Item2);
                }
                else
                {
                    // Rewrite if forced
                    m_loadedWorldsByFilePaths[saveTuple.Item1] = saveTuple.Item2;
                }
            }

            if (loadListRes.ContainsCorruptedWorlds)
            {
                var messageBox = MyGuiSandbox.CreateMessageBox(
                    messageText: MyTexts.Get(MyCommonTexts.SomeWorldFilesCouldNotBeLoaded),
                    messageCaption: MyTexts.Get(MyCommonTexts.MessageBoxCaptionError));
                MyGuiSandbox.AddScreen(messageBox);
            }

            RefreshAfterLoaded();

            // Close the loading miniscreen
            screen.CloseScreen();
        }
示例#2
0
        private static void endActionPublishUGC(IMyAsyncResult iResult, MyGuiScreenProgressAsync screen)
        {
            screen.CloseScreenNow();
            PublishUGCResult result = (PublishUGCResult)iResult;

            result.CallbackOnFinished(result.PublishedFileId.HasValue, result.PublishedFileId);
        }
示例#3
0
 private static void endAction(IMyAsyncResult arg1, MyGuiScreenProgressAsync arg2)
 {
     Logger.WriteLine("closing download screen");
     arg2.CloseScreen();
     _instance.Dispose();
 }