Ejemplo n.º 1
0
        public Tasker.Conclusion CheckRemoteStorageRequirements(Tasker tasker, Object syncObject = null)
        {
            // calculating size constraints
            tasker.SetStatus(Resources.CalculatingFreeSpace);
            MemoryStats.Refresh();
            if (stats.TotalSize > MemoryStats.AvailableForGames())
            {
                throw new OutOfMemoryException(string.Format(Resources.MemoryFull, Shared.SizeSuffix(stats.TotalSize)) + "\r\n" +
                                               string.Format(Resources.MemoryStats.Replace("|", "\r\n"),
                                                             MemoryStats.StorageTotal / 1024.0 / 1024.0,
                                                             MemoryStats.AvailableForGames() / 1024.0 / 1024.0,
                                                             MemoryStats.SaveStatesSize / 1024.0 / 1024.0,
                                                             (MemoryStats.StorageUsed - MemoryStats.AllGamesSize - MemoryStats.SaveStatesSize) / 1024.0 / 1024.0));
            }

            return(Tasker.Conclusion.Success);
        }
Ejemplo n.º 2
0
        public Tasker.Conclusion FinishRemoteTransfer(Tasker tasker, Object syncObject = null)
        {
            try
            {
                if (hakchi.Shell.IsOnline)
                {
                    hakchi.Shell.ExecuteSimple("hakchi overmount_games; uistart", 2000, true);
                    MemoryStats.Refresh();
                }
            }
            catch { }
#if !VERY_DEBUG
            try
            {
                Directory.Delete(tempDirectory, true);
            }
            catch { }
#endif
            return(Tasker.Conclusion.Success);
        }