Skip to content

Commit

Permalink
Update v3.0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunaretic committed Jun 30, 2024
2 parents 1138d3f + 22125b6 commit b51c4fe
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions FFXIV_TexTools/FFXIV_TexTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<AssemblyTitle>FFXIV_TexTools</AssemblyTitle>
<Product>FFXIV_TexTools</Product>
<Copyright>Copyright © 2024</Copyright>
<AssemblyVersion>3.0.1.4</AssemblyVersion>
<FileVersion>3.0.1.4</FileVersion>
<AssemblyVersion>3.0.1.5</AssemblyVersion>
<FileVersion>3.0.1.5</FileVersion>
<LangVersion>9.0</LangVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<UseWPF>true</UseWPF>
Expand Down
12 changes: 3 additions & 9 deletions FFXIV_TexTools/ViewModels/ModListViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,7 @@ await Task.Run(async () =>
var allmods = modList.GetMods(x => !x.IsInternal());
foreach (var modEntry in allmods)
{
if (!modEntry.ItemName.Equals(string.Empty))
{
mainCategories.Add(modEntry.ItemCategory);
}
mainCategories.Add(modEntry.ItemCategory);
}

foreach (var mainCategory in mainCategories)
Expand Down Expand Up @@ -318,10 +315,7 @@ await Task.Run(async () =>

foreach (var modEntry in modsInModpack)
{
if (!modEntry.ItemName.Equals(string.Empty))
{
mainCategories.Add(modEntry.ItemCategory);
}
mainCategories.Add(modEntry.ItemCategory);
}

foreach (var mainCategory in mainCategories)
Expand Down Expand Up @@ -723,7 +717,7 @@ public async void UpdateInfoGrid(Category category)
if (category.Name.Equals(UIStrings.Standalone_Non_ModPack))
{
modPackModList = (from items in allMods
where !items.ItemName.Equals(string.Empty) && items.ModPack == null
where string.IsNullOrWhiteSpace(items.ModPack)
select items).ToList();

ModPackModAuthorLabel = "[ N/A ]";
Expand Down
19 changes: 16 additions & 3 deletions FFXIV_TexTools/Views/ModListView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ private async void TreeView_SelectedItemChanged(object sender, RoutedPropertyCha
else
{
await (DataContext as ModListViewModel).UpdateList(selectedItem, _cts);
modToggleButton.IsEnabled = false;
modDeleteButton.IsEnabled = false;
}
}
else
Expand Down Expand Up @@ -282,14 +284,25 @@ private async void modDeleteButton_Click(object sender, RoutedEventArgs e)
await LockUi("Deleting Mod".L(), "Please wait...".L(), this);
try
{
if ((ModListTreeView.SelectedItem as Category).ParentCategory.Name.Equals("ModPacks"))
var cat = (ModListTreeView.SelectedItem as Category);

if (cat == null) return;

var catName = cat.Name;
if (catName == UIStrings.Standalone_Non_ModPack)
{
catName = "";
}

if (cat.ParentCategory.Name.Equals("ModPacks"))
{
if (FlexibleMessageBox.Show(wind,
UIMessages.DeleteModPackMessage,
UIMessages.DeleteModPackTitle,
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes)
{
await Modding.DeleteModPack((ModListTreeView.SelectedItem as Category).Name, MainWindow.UserTransaction);

await Modding.DeleteModPack(catName, MainWindow.UserTransaction);
(DataContext as ModListViewModel).RemoveModPack();
}

Expand All @@ -302,7 +315,7 @@ private async void modDeleteButton_Click(object sender, RoutedEventArgs e)
foreach (var selectedModItem in selectedItems)
{
await Modding.DeleteMod(selectedModItem.ModItem.FilePath, MainWindow.UserTransaction);
await (DataContext as ModListViewModel).RemoveItem(selectedModItem, (Category)ModListTreeView.SelectedItem);
await (DataContext as ModListViewModel).RemoveItem(selectedModItem, cat);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ where modpack.IsChecked
if (modpackEntry.ModpackName == UIStrings.Standalone_Non_ModPack)
{
modsInModpack = from mods in allMods
where !mods.ItemName.Equals(string.Empty) && mods.ModPack == null
where string.IsNullOrWhiteSpace(mods.ModPack)
select mods;
}
else
Expand Down Expand Up @@ -209,7 +209,7 @@ private void ModpackList_SelectionChanged(object sender, RoutedEventArgs e)
if (selectedModpackName == UIStrings.Standalone_Non_ModPack)
{
modsInModpack = (from mods in allMods
where !mods.ItemName.Equals(string.Empty) && mods.ModPack == null
where string.IsNullOrWhiteSpace(mods.ModPack)
select mods).ToList();
}
else
Expand Down

0 comments on commit b51c4fe

Please sign in to comment.