Example #1
0
        private void ResourceDialog_Load(object sender, EventArgs e)
        {
            // Display details in UI
            LabelCategory.Text    = Categories.GetCategoryById(ModItem.CategoryId).Title;
            LabelName.Text        = ModItem.Name.Replace("&", "&&");
            LabelSystemType.Text  = ModItem.FirmwareType;
            LabelVersion.Text     = string.Join(" & ", ModItem.Versions).Replace("&", "&&");
            LabelCreatedBy.Text   = ModItem.CreatedBy.Replace("&", "&&");
            LabelSubmittedBy.Text = ModItem.SubmittedBy.Replace("&", "&&");
            LabelModType.Text     = ModItem.ModType;
            LabelDescription.Text = string.IsNullOrWhiteSpace(ModItem.Description)
                ? "No other details can be found for this yet."
                : ModItem.Description.Replace("&", "&&");

            if (MainWindow.Settings.FavoriteIds.Exists(x => x.Platform == PlatformPrefix.PS3 && x.Ids.Contains(ModItem.Id)))
            {
                ButtonFavorite.Text = Language.GetString("Unfavorite");
                ButtonFavorite.SetControlTextWidth(30);
            }
            else
            {
                ButtonFavorite.Text = Language.GetString("Favorite");
                ButtonFavorite.SetControlTextWidth(28);
            }
        }
Example #2
0
        private void GameSaveDialog_Load(object sender, EventArgs e)
        {
            // Display details in UI
            LabelName.Text        = GameSaveItem.Name.Replace("&", "&&");
            LabelCategory.Text    = Categories.GetCategoryById(GameSaveItem.CategoryId).Title;
            LabelVersion.Text     = GameSaveItem.Version;
            LabelRegion.Text      = GameSaveItem.Region;
            LabelGameMode.Text    = GameSaveItem.GameMode;
            LabelCreatedBy.Text   = GameSaveItem.CreatedBy.Replace("&", "&&");
            LabelSubmittedBy.Text = GameSaveItem.SubmittedBy.Replace("&", "&&");
            LabelDescription.Text = string.IsNullOrWhiteSpace(GameSaveItem.Description)
                ? "No other details can be found for this yet."
                : GameSaveItem.Description.Replace("&", "&&");

            StringBuilder extraDescription = new StringBuilder("\n---------------------------------------------\n")
                                             .AppendLine("Important Information:\n")
                                             .AppendLine("- You must have at least one USB device connected to the console before installing the game save files.\n")
                                             .Append("- It's suggested to use 'Apollo Tool' (Homebrew > Applications) for patching and resigning game save files directly on your console.");

            LabelDescription.Text += extraDescription.ToString();

            InstalledModInfo installedModInfo = MainWindow.Settings.GetInstalledMods(GameSaveItem.GetPlatform(), GameSaveItem.CategoryId, GameSaveItem.Id);

            if (installedModInfo == null)
            {
                ButtonActions.Text = Language.GetString("Not Installed");
                ButtonActions.ImageOptions.SvgImage = Images[0];
                ButtonActions.SetControlTextWidth(34);
            }
            else
            {
                ButtonActions.Text = Language.GetString("Installed");
                ButtonActions.ImageOptions.SvgImage = Images[1];
                ButtonActions.SetControlTextWidth(32);
            }

            if (MainWindow.Settings.FavoriteIds.Exists(x => x.Platform == MainWindow.PlatformType && x.Ids.Contains(GameSaveItem.Id)))
            {
                ButtonFavorite.Text = Language.GetString("Unfavorite");
                ButtonFavorite.SetControlTextWidth(30);
            }
            else
            {
                ButtonFavorite.Text = Language.GetString("Favorite");
                ButtonFavorite.SetControlTextWidth(28);
            }
        }
Example #3
0
        private void GameModDialog_Load(object sender, EventArgs e)
        {
            // Display details in UI
            LabelCategory.Text    = Categories.GetCategoryById(ModItem.CategoryId).Title;
            LabelName.Text        = ModItem.Name.Replace("&", "&&");
            LabelModType.Text     = ModItem.ModType;
            LabelSystemType.Text  = string.Join(" & ", ModItem.Versions).Replace("&", "&&");
            LabelVersion.Text     = ModItem.FirmwareType;
            LabelRegion.Text      = string.Join(", ", ModItem.Regions);
            LabelCreatedBy.Text   = ModItem.CreatedBy.Replace("&", "&&");
            LabelSubmittedBy.Text = ModItem.SubmittedBy.Replace("&", "&&");
            LabelGameMode.Text    = string.Join(", ", ModItem.GameModes);
            LabelDescription.Text = string.IsNullOrWhiteSpace(ModItem.Description)
                ? "No other details can be found for this yet."
                : ModItem.Description.Replace("&", "&&");

            InstalledModInfo installedModInfo = MainWindow.Settings.GetInstalledMods(ModItem.GetPlatform(), ModItem.CategoryId, ModItem.Id);

            if (installedModInfo == null)
            {
                ButtonActions.Text = Language.GetString("Not Installed");
                ButtonActions.ImageOptions.SvgImage = Images[0];
                ButtonActions.SetControlTextWidth(34);
            }
            else
            {
                ButtonActions.Text = Language.GetString("Installed");
                ButtonActions.ImageOptions.SvgImage = Images[1];
                ButtonActions.SetControlTextWidth(32);
            }

            if (MainWindow.Settings.FavoriteIds.Exists(x => x.Platform == PlatformPrefix.PS3 && x.Ids.Contains(ModItem.Id)))
            {
                ButtonFavorite.Text = Language.GetString("Unfavorite");
                ButtonFavorite.SetControlTextWidth(30);
            }
            else
            {
                ButtonFavorite.Text = Language.GetString("Favorite");
                ButtonFavorite.SetControlTextWidth(28);
            }
        }