예제 #1
0
        public void GameInstalled(DownloadEngine.DownloadStatus status, long id, DownloadManager.DownloadTypes type)
        {
            Debug.LogWarning("Game installation status: " + status);

            if (status != DownloadEngine.DownloadStatus.success)
            {
                return;
            }

            Game game = FindGame(id);

            if (game == null)
            {
                Debug.LogError("Something went desperately wrong, downloaded game not found");
                return;
            }

            UnpackGame(game);

            File.WriteAllText(appPath + game.path + "version.txt", game.version.ToString());

            game.installed = true;

            //RefreshGamesDisplay();
            if (!GameListTextTemplate.Dispatcher.CheckAccess())
            {
                GameListTextTemplate.Dispatcher.Invoke(new Action(RefreshGamesDisplay));
                return;
            }
        }
예제 #2
0
 private void IconDownloaded(DownloadEngine.DownloadStatus status, Int64 gameID, DownloadManager.DownloadTypes type)
 {
     if (status == DownloadEngine.DownloadStatus.success)
     {
         SetIcon(AppDomain.CurrentDomain.BaseDirectory + Library.iconsPath + gameID.ToString() + "_1.png");
     }
 }
예제 #3
0
        public void IconDownloaded(DownloadEngine.DownloadStatus status, Int64 gameID, DownloadManager.DownloadTypes type)
        {
            if (status == DownloadEngine.DownloadStatus.success)
            {
                if (actualGameSelected.id == gameID)
                {
                    LoadIcon(gameID);
                }
                return;
            }

            if (status == DownloadEngine.DownloadStatus.appWithoutIcon)
            {
                if (!GameIcon.Dispatcher.CheckAccess())
                {
                    GameIcon.Dispatcher.Invoke(new Action(() => IconDownloaded(status, gameID, type)));
                    return;
                }

                GameIcon.Source = originalIcon;
            }
        }