Added filter for the items ListBox

This commit is contained in:
Asval
2019-03-08 00:35:54 +01:00
parent d5c82315ef
commit b94752ab95
6 changed files with 182 additions and 14 deletions

View File

@@ -14,6 +14,24 @@
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>false</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -40,6 +58,24 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>3ED5A42E3C4689AF46F18366F8BF30D245116948</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>FModel_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>false</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -81,6 +117,7 @@
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -108,6 +145,17 @@
<None Include="Resources\C512.png" />
<None Include="Resources\BG512.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 et x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -44,6 +44,8 @@
this.ConsoleRichTextBox = new System.Windows.Forms.RichTextBox();
this.ExtractButton = new System.Windows.Forms.Button();
this.ItemRichTextBox = new System.Windows.Forms.RichTextBox();
this.FilterLabel = new System.Windows.Forms.Label();
this.FilterTextBox = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ItemIconPictureBox)).BeginInit();
this.groupBox2.SuspendLayout();
@@ -75,7 +77,7 @@
// AESKeyLabel
//
this.AESKeyLabel.AutoSize = true;
this.AESKeyLabel.Location = new System.Drawing.Point(6, 50);
this.AESKeyLabel.Location = new System.Drawing.Point(6, 51);
this.AESKeyLabel.Name = "AESKeyLabel";
this.AESKeyLabel.Size = new System.Drawing.Size(52, 13);
this.AESKeyLabel.TabIndex = 2;
@@ -137,14 +139,14 @@
this.groupBox2.Controls.Add(this.ItemIconPictureBox);
this.groupBox2.Location = new System.Drawing.Point(426, 12);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(928, 667);
this.groupBox2.Size = new System.Drawing.Size(928, 693);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
//
// SaveImageCheckBox
//
this.SaveImageCheckBox.AutoSize = true;
this.SaveImageCheckBox.Location = new System.Drawing.Point(703, 613);
this.SaveImageCheckBox.Location = new System.Drawing.Point(703, 639);
this.SaveImageCheckBox.Name = "SaveImageCheckBox";
this.SaveImageCheckBox.Size = new System.Drawing.Size(108, 17);
this.SaveImageCheckBox.TabIndex = 9;
@@ -154,7 +156,7 @@
//
// SaveImageButton
//
this.SaveImageButton.Location = new System.Drawing.Point(816, 609);
this.SaveImageButton.Location = new System.Drawing.Point(816, 635);
this.SaveImageButton.Name = "SaveImageButton";
this.SaveImageButton.Size = new System.Drawing.Size(106, 23);
this.SaveImageButton.TabIndex = 8;
@@ -165,7 +167,7 @@
// LoadDataCheckBox
//
this.LoadDataCheckBox.AutoSize = true;
this.LoadDataCheckBox.Location = new System.Drawing.Point(703, 642);
this.LoadDataCheckBox.Location = new System.Drawing.Point(703, 668);
this.LoadDataCheckBox.Name = "LoadDataCheckBox";
this.LoadDataCheckBox.Size = new System.Drawing.Size(101, 17);
this.LoadDataCheckBox.TabIndex = 7;
@@ -179,13 +181,13 @@
this.ConsoleRichTextBox.Location = new System.Drawing.Point(6, 374);
this.ConsoleRichTextBox.Name = "ConsoleRichTextBox";
this.ConsoleRichTextBox.ReadOnly = true;
this.ConsoleRichTextBox.Size = new System.Drawing.Size(922, 153);
this.ConsoleRichTextBox.Size = new System.Drawing.Size(922, 229);
this.ConsoleRichTextBox.TabIndex = 6;
this.ConsoleRichTextBox.Text = "";
//
// ExtractButton
//
this.ExtractButton.Location = new System.Drawing.Point(816, 638);
this.ExtractButton.Location = new System.Drawing.Point(816, 664);
this.ExtractButton.Name = "ExtractButton";
this.ExtractButton.Size = new System.Drawing.Size(106, 23);
this.ExtractButton.TabIndex = 5;
@@ -204,13 +206,32 @@
this.ItemRichTextBox.TabIndex = 4;
this.ItemRichTextBox.Text = "";
//
// FilterLabel
//
this.FilterLabel.AutoSize = true;
this.FilterLabel.Location = new System.Drawing.Point(18, 688);
this.FilterLabel.Name = "FilterLabel";
this.FilterLabel.Size = new System.Drawing.Size(32, 13);
this.FilterLabel.TabIndex = 6;
this.FilterLabel.Text = "Filter:";
//
// FilterTextBox
//
this.FilterTextBox.Location = new System.Drawing.Point(56, 685);
this.FilterTextBox.Name = "FilterTextBox";
this.FilterTextBox.Size = new System.Drawing.Size(364, 20);
this.FilterTextBox.TabIndex = 5;
this.FilterTextBox.TextChanged += new System.EventHandler(this.FilterTextBox_TextChanged);
//
// PAKWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1366, 691);
this.ClientSize = new System.Drawing.Size(1366, 712);
this.Controls.Add(this.FilterLabel);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.PAKTreeView);
this.Controls.Add(this.FilterTextBox);
this.Controls.Add(this.ItemsListBox);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
@@ -226,6 +247,7 @@
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -246,6 +268,8 @@
private System.Windows.Forms.CheckBox LoadDataCheckBox;
private System.Windows.Forms.CheckBox SaveImageCheckBox;
private System.Windows.Forms.Button SaveImageButton;
private System.Windows.Forms.Label FilterLabel;
private System.Windows.Forms.TextBox FilterTextBox;
}
}

View File

@@ -189,10 +189,11 @@ namespace FModel
}
}
}
private static List<string> afterItems;
private void PAKTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
List<string> beforeItems = new List<string>();
List<string> afterItems = new List<string>();
afterItems = new List<string>();
ItemsListBox.Items.Clear();
@@ -233,6 +234,29 @@ namespace FModel
ExtractButton.Enabled = ItemsListBox.SelectedIndex >= 0;
}
private void FilterTextBox_TextChanged(object sender, EventArgs e)
{
ItemsListBox.BeginUpdate();
ItemsListBox.Items.Clear();
if (!string.IsNullOrEmpty(FilterTextBox.Text))
{
foreach (string str in afterItems)
{
if (str.Contains(FilterTextBox.Text))
{
ItemsListBox.Items.Add(str);
}
}
}
else
{
foreach (var b in afterItems)
{
ItemsListBox.Items.Add(b);
}
}
ItemsListBox.EndUpdate();
}
private void ItemsListBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (ItemsListBox.SelectedItem != null)
@@ -622,7 +646,7 @@ namespace FModel
{
jwpmProcess("extract \"" + Config.conf.pathToFortnitePAKs + "\\pakchunk0-WindowsClient.pak" + "\" \"" + textureFile + "\" \"" + docPath + "\"");
}
else if (data.SmallPreviewImage.AssetPathName.Contains("/Game/Athena/TestAssets/"))
else if (data.SmallPreviewImage.AssetPathName.Contains("/Game/Athena/TestAssets/") || data.SmallPreviewImage.AssetPathName.Contains("/Game/Athena/Prototype/"))
{
jwpmProcess("extract \"" + Config.conf.pathToFortnitePAKs + "\\" + PAKsComboBox.SelectedItem + "\" \"" + textureFile + "\" \"" + docPath + "\"");
}

View File

@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
// associées à un assembly.
[assembly: AssemblyTitle("FModel")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("FModel is a Fortnite .PAK file explorer built in C#")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FModel")]

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- Options du manifeste de contrôle de compte d'utilisateur
Si vous souhaitez modifier le niveau du contrôle de compte d'utilisateur Windows, remplacez le
nœud requestedExecutionLevel par l'une des propositions suivantes.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
La spécification de l'élément requestedExecutionLevel désactive la virtualisation de fichiers et du Registre.
Supprimez cet élément si votre application a besoin de la virtualisation pour des
raisons de compatibilité descendante.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Liste des versions de Windows pour lesquelles cette application a été testée,
et sur lesquelles elle doit fonctionner. Décommentez éléments appropriés,
et Windows va automatiquement sélectionner l'environnement le plus compatible. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indique que l'application prend en charge DPI et qu'elle n'est pas automatiquement mise à l'échelle par Windows à un niveau de
DPI plus élevé. Les applications Windows Presentation Foundation (WPF) prennent automatiquement en charge DPI et n'ont pas besoin
d'opter pour ce choix. Les applications Windows Forms qui ciblent .NET Framework 4.6 et qui optent pour ce paramètre, doivent
également affecter la valeur 'true' au paramètre 'EnableWindowsFormsHighDpiAutoResizing' dans leur fichier app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Activer les thèmes pour les contrôles et boîtes de dialogue communes de Windows (Windows XP et version ultérieure) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View File

@@ -29,7 +29,7 @@
**5.** Clicking on **Extract** will extract the selected Asset to your `Documents` folder, try to serialize it and will display infos about it
- Asset is an **_ID_**:
- Try to create an icon with **Name**, **Description**, **Rarity**, **Type** and the **Cosmetic Source**
- Try to create an [Icon](https://i.imgur.com/CkiU3p5.png) with **Name**, **Description**, **Rarity**, **Type** and the **Cosmetic Source**
- Asset is a **_Texture_**:
- Try to display the Asset as PNG
- Asset is a **_Sound_**:
@@ -46,5 +46,7 @@
## TODO
- [ ] Improve speed
- [ ] Detect the pak file of an image if default isn't working
- [ ] Filter ItemsListBox
- [x] Filter for the items ListBox
- [ ] Support for meshes
- [ ] Support for animations
- [ ] Readable code