Пример #1
0
        public static String getName(String titleName, String platform)
        {
            String platformName = PlatformModel.GetPlatformName(platform);
            String ViewName     = null;

            switch (IniModel.GetGameView())
            {
            case GameViewModel.DEFAULT:
                ViewName = titleName + " - " + platformName;
                break;

            case GameViewModel.PLATFORM_SHORTCUT:
                ViewName = titleName + " - " + platform;
                break;

            case GameViewModel.GAME_NAME_ONLY:
                ViewName = titleName;
                break;

            default:
                ViewName = titleName + " - " + platformName;
                break;
            }
            return(ViewName);
        }
Пример #2
0
        /* GetPSNPlatform */

        public static String GetPSNPlatform()
        {
            if (!Program.iniFile.KeyExists(PLATFORM, PSN) || PlatformModel.GetPlatformName(Program.iniFile.Read(PLATFORM, PSN)) == null)
            {
                Program.iniFile.Write(PLATFORM, PlatformModel.PS4, PSN);
            }
            return(Program.iniFile.Read(PLATFORM, PSN));
        }
Пример #3
0
 public static void SetPSNPlatform(String value)
 {
     if (PlatformModel.GetPlatformName(value) == null)
     {
         Program.iniFile.Write(PLATFORM, PlatformModel.PS4, PSN);
     }
     else
     {
         Program.iniFile.Write(PLATFORM, value, PSN);
     }
 }
Пример #4
0
        public static ArrayList GetAvailablePlatforms(String onlineId)
        {
            String Path = Program.SavePath + @"\profiles\" + onlineId;

            if (!Directory.Exists(Path))
            {
                Directory.CreateDirectory(Path);
            }
            ArrayList availablePlatformList = new ArrayList();
            var       directories           = Directory.GetDirectories(Path);

            foreach (var directory in directories)
            {
                String[] arr      = directory.Split('\\');
                String   platform = arr[arr.Length - 1];
                if (PlatformModel.GetPlatformName(platform) != null)
                {
                    availablePlatformList.Add(platform);
                }
            }
            return(availablePlatformList);
        }