diff --git a/AnimeStudio.CLI/AnimeStudio.CLI.csproj b/AnimeStudio.CLI/AnimeStudio.CLI.csproj
index 708f5d83..8c1e0229 100644
--- a/AnimeStudio.CLI/AnimeStudio.CLI.csproj
+++ b/AnimeStudio.CLI/AnimeStudio.CLI.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/AnimeStudio.GUI/AnimeStudio.GUI.csproj b/AnimeStudio.GUI/AnimeStudio.GUI.csproj
index 7afe47f7..60d0c4c8 100644
--- a/AnimeStudio.GUI/AnimeStudio.GUI.csproj
+++ b/AnimeStudio.GUI/AnimeStudio.GUI.csproj
@@ -127,7 +127,7 @@
-
+
diff --git a/AnimeStudio.GUI/AssetBrowser.cs b/AnimeStudio.GUI/AssetBrowser.cs
index 7e53c6f2..5efa5cbc 100644
--- a/AnimeStudio.GUI/AssetBrowser.cs
+++ b/AnimeStudio.GUI/AssetBrowser.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Data;
using System.Drawing;
using System.Globalization;
using System.IO;
@@ -16,17 +15,17 @@ namespace AnimeStudio.GUI
{
partial class AssetBrowser : Form
{
- private readonly MainForm _parent;
- private readonly List _assetEntries;
- private readonly List _backupAssetEntries;
- private readonly List _firstAssetEntries;
- private readonly List _secondAssetEntries;
+ private readonly List _assetEntries;
+ private readonly List _backupAssetEntries;
private readonly Dictionary _filters;
+ private readonly List _firstAssetEntries;
+ private readonly MainForm _parent;
+ private readonly List _secondAssetEntries;
+ private DataGridViewColumn _sortedColumn;
- private SortOrder _sortOrder;
- private DataGridViewColumn _sortedColumn;
- private List types = new();
+ private SortOrder _sortOrder;
private List selectedTypes = new();
+ private List types = new List();
public AssetBrowser(MainForm form)
{
@@ -44,7 +43,11 @@ private async void loadAssetMap_Click(object sender, EventArgs e)
{
loadAssetMap.Enabled = false;
- var openFileDialog = new OpenFileDialog() { Multiselect = false, Filter = "MessagePack AssetMap File|*.map|JSON AssetMap File|*.json" };
+ var openFileDialog = new OpenFileDialog
+ {
+ Multiselect = false, Filter = "MessagePack AssetMap File|*" +
+ ".map|JSON AssetMap File|*.json|MemoryPack AssetMap File|*.memory"
+ };
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
{
try
@@ -61,6 +64,8 @@ private async void loadAssetMap_Click(object sender, EventArgs e)
_sortedColumn = null;
_firstAssetEntries.Clear();
+ _secondAssetEntries.Clear();
+ _backupAssetEntries.Clear();
_firstAssetEntries.AddRange(ResourceMap.GetEntries());
updateDisplay();
@@ -172,12 +177,14 @@ private void bringMainToFront()
_parent.TopMost = false;
_parent.Focus();
}
+
private void clear_Click(object sender, EventArgs e)
{
Clear();
updateButtons();
Logger.Info($"Cleared !!");
}
+
private void loadSelected_Click(object sender, EventArgs e)
{
var files = assetDataGridView.SelectedRows.Cast()
@@ -210,6 +217,7 @@ private void loadSelected_Click(object sender, EventArgs e)
_parent.Invoke(() => _parent.LoadPaths(files, filePaths.ToArray()));
}
}
+
private async void exportSelected_Click(object sender, EventArgs e)
{
var saveFolderDialog = new OpenFolderDialog();
@@ -245,6 +253,7 @@ await Task.Run(async () =>
StatusStripUpdate = statusStripUpdate;
}
}
+
private void BuildAssetData(List exportableAssets, AssetEntry[] entries)
{
var objectAssetItemDic = new Dictionary