mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
just refactoring
This commit is contained in:
parent
6782fc31fb
commit
6f43219854
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -327,4 +327,4 @@ ASALocalRun/
|
|||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
.mfractor/
|
||||
|
|
@ -1,19 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FModel.Converter
|
||||
{
|
||||
class UnrealEngineDataToOGG
|
||||
class UnrealEngineDataToOgg
|
||||
{
|
||||
static byte[] oggFind = { 0x4F, 0x67, 0x67, 0x53 };
|
||||
static byte[] oggNoHeader = { 0x4F, 0x67, 0x67, 0x53 };
|
||||
static byte[] uexpToDelete = { 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00 };
|
||||
static byte[] oggOutNewArray = null;
|
||||
static byte[] _oggOutNewArray;
|
||||
public static List<int> SearchBytePattern(byte[] pattern, byte[] bytes)
|
||||
{
|
||||
List<int> positions = new List<int>();
|
||||
|
|
@ -26,7 +23,7 @@ namespace FModel.Converter
|
|||
{
|
||||
byte[] match = new byte[patternLength];
|
||||
Array.Copy(bytes, i, match, 0, patternLength);
|
||||
if (match.SequenceEqual<byte>(pattern))
|
||||
if (match.SequenceEqual(pattern))
|
||||
{
|
||||
positions.Add(i);
|
||||
i += patternLength - 1;
|
||||
|
|
@ -51,7 +48,7 @@ namespace FModel.Converter
|
|||
for (var start = 0; start < source.Length - pattern.Length + 1; start += 1)
|
||||
{
|
||||
var segment = new ArraySegment<T>(source, start, pattern.Length);
|
||||
if (Enumerable.SequenceEqual(segment, pattern))
|
||||
if (segment.SequenceEqual(pattern))
|
||||
{
|
||||
newArray = replacement.Concat(source.Skip(start + pattern.Length)).ToArray();
|
||||
return true;
|
||||
|
|
@ -59,17 +56,17 @@ namespace FModel.Converter
|
|||
}
|
||||
return false;
|
||||
}
|
||||
public static string convertToOGG(string file)
|
||||
public static string ConvertToOgg(string file)
|
||||
{
|
||||
var isUBULKFound = new DirectoryInfo(System.IO.Path.GetDirectoryName(file)).GetFiles(Path.GetFileNameWithoutExtension(file) + "*.ubulk", SearchOption.AllDirectories).FirstOrDefault();
|
||||
if (isUBULKFound == null)
|
||||
var isUbulkFound = new DirectoryInfo(Path.GetDirectoryName(file) ?? throw new InvalidOperationException()).GetFiles(Path.GetFileNameWithoutExtension(file) + "*.ubulk", SearchOption.AllDirectories).FirstOrDefault();
|
||||
if (isUbulkFound == null)
|
||||
{
|
||||
string oggPattern = "OggS";
|
||||
if (File.ReadAllText(file).Contains(oggPattern))
|
||||
{
|
||||
byte[] src = File.ReadAllBytes(file);
|
||||
TryFindAndReplace<byte>(src, oggFind, oggNoHeader, out oggOutNewArray);
|
||||
File.WriteAllBytes(Path.GetFileNameWithoutExtension(file) + ".temp", oggOutNewArray);
|
||||
TryFindAndReplace(src, oggFind, oggNoHeader, out _oggOutNewArray);
|
||||
File.WriteAllBytes(Path.GetFileNameWithoutExtension(file) + ".temp", _oggOutNewArray);
|
||||
|
||||
FileInfo fi = new FileInfo(Path.GetFileNameWithoutExtension(file) + ".temp");
|
||||
FileStream fs = fi.Open(FileMode.Open);
|
||||
|
|
@ -96,8 +93,8 @@ namespace FModel.Converter
|
|||
byte[] src = File.ReadAllBytes(file);
|
||||
List<int> positions = SearchBytePattern(uexpToDelete, src);
|
||||
|
||||
TryFindAndReplace<byte>(src, oggFind, oggNoHeader, out oggOutNewArray);
|
||||
File.WriteAllBytes(Path.GetFileNameWithoutExtension(file) + ".temp", oggOutNewArray);
|
||||
TryFindAndReplace(src, oggFind, oggNoHeader, out _oggOutNewArray);
|
||||
File.WriteAllBytes(Path.GetFileNameWithoutExtension(file) + ".temp", _oggOutNewArray);
|
||||
|
||||
int lengthToDelete = src.Length - positions[0];
|
||||
|
||||
|
|
@ -108,9 +105,9 @@ namespace FModel.Converter
|
|||
fs.Close();
|
||||
|
||||
byte[] src44 = File.ReadAllBytes(Path.GetFileNameWithoutExtension(file) + ".temp");
|
||||
byte[] srcUBULK = File.ReadAllBytes(Path.GetDirectoryName(file) + "\\" + isUBULKFound.ToString());
|
||||
byte[] buffer = new byte[srcUBULK.Length];
|
||||
using (FileStream fs1 = new FileStream(Path.GetDirectoryName(file) + "\\" + isUBULKFound.ToString(), FileMode.Open, FileAccess.ReadWrite))
|
||||
byte[] srcUbulk = File.ReadAllBytes(Path.GetDirectoryName(file) + "\\" + isUbulkFound);
|
||||
byte[] buffer = new byte[srcUbulk.Length];
|
||||
using (FileStream fs1 = new FileStream(Path.GetDirectoryName(file) + "\\" + isUbulkFound, FileMode.Open, FileAccess.ReadWrite))
|
||||
{
|
||||
fs1.Read(buffer, 0, buffer.Length);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FModel.Custom
|
||||
namespace FModel
|
||||
{
|
||||
public class TypeAssistant
|
||||
{
|
||||
public event EventHandler Idled = delegate { };
|
||||
public int WaitingMilliSeconds { get; set; }
|
||||
System.Threading.Timer waitingTimer;
|
||||
Timer waitingTimer;
|
||||
|
||||
public TypeAssistant(int waitingMilliSeconds = 600)
|
||||
{
|
||||
|
|
@ -23,7 +19,7 @@ namespace FModel.Custom
|
|||
}
|
||||
public void TextChanged()
|
||||
{
|
||||
waitingTimer.Change(WaitingMilliSeconds, System.Threading.Timeout.Infinite);
|
||||
waitingTimer.Change(WaitingMilliSeconds, Timeout.Infinite);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
FModel/DLLs/csharp-wick.dll
Normal file
BIN
FModel/DLLs/csharp-wick.dll
Normal file
Binary file not shown.
|
|
@ -82,8 +82,9 @@
|
|||
<Reference Include="AutoUpdater.NET, Version=1.5.1.0, Culture=neutral, PublicKeyToken=501435c91b35f4bc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autoupdater.NET.Official.1.5.1\lib\net40\AutoUpdater.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="csharp-wick">
|
||||
<HintPath>..\..\..\csharp-wick\platform\csharp-wick\bin\Release\netstandard1.4\csharp-wick.dll</HintPath>
|
||||
<Reference Include="csharp-wick, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>DLLs\csharp-wick.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
|
|
@ -143,11 +144,11 @@
|
|||
</Compile>
|
||||
<Compile Include="Parser\Banners\BannersParser.cs" />
|
||||
<Compile Include="Parser\Challenges\ChallengeBundleIdParser.cs" />
|
||||
<Compile Include="Parser\Challenges\QuestParser.cs" />
|
||||
<Compile Include="Parser\FeaturedParser.cs" />
|
||||
<Compile Include="Parser\ItemIDParser.cs" />
|
||||
<Compile Include="Parser\Featured\FeaturedParser.cs" />
|
||||
<Compile Include="Parser\Items\ItemIDParser.cs" />
|
||||
<Compile Include="Parser\Meshes\MeshesParser.cs" />
|
||||
<Compile Include="Parser\RenderSwitchMaterial.cs" />
|
||||
<Compile Include="Parser\Quests\QuestParser.cs" />
|
||||
<Compile Include="Parser\RenderMat\RenderSwitchMaterial.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Forms\About.resx">
|
||||
|
|
@ -193,6 +194,7 @@
|
|||
<Content Include="csharp_wick.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="DLLs\csharp-wick.dll" />
|
||||
<Content Include="DLLs\ScintillaNET FindReplaceDialog.dll" />
|
||||
<Content Include="FModel.ico" />
|
||||
<None Include="Resources\Challenges_Slider.png" />
|
||||
|
|
|
|||
|
|
@ -1,12 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
|
|
@ -16,7 +8,7 @@ namespace FModel.Forms
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
label2.Text += " " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, 5);
|
||||
label2.Text += @" " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, 5);
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,6 @@
|
|||
using FModel.Custom;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
|
@ -17,12 +10,12 @@ namespace FModel.Forms
|
|||
{
|
||||
TypeAssistant assistant;
|
||||
List<FileInfo> myInfos = new List<FileInfo>();
|
||||
List<FileInfoFilter> myFilteredInfos;
|
||||
private static string fileName;
|
||||
private static Dictionary<string, string> myInfosDict;
|
||||
private static Dictionary<string, string> myFilteredInfosDict;
|
||||
public static string sfPath;
|
||||
public static bool isClosed;
|
||||
List<FileInfoFilter> _myFilteredInfos;
|
||||
private static string _fileName;
|
||||
private static Dictionary<string, string> _myInfosDict;
|
||||
private static Dictionary<string, string> _myFilteredInfosDict;
|
||||
public static string SfPath;
|
||||
public static bool IsClosed;
|
||||
|
||||
public SearchFiles()
|
||||
{
|
||||
|
|
@ -34,40 +27,40 @@ namespace FModel.Forms
|
|||
|
||||
private async void SearchFiles_Load(object sender, EventArgs e)
|
||||
{
|
||||
isClosed = false;
|
||||
myInfosDict = new Dictionary<string, string>();
|
||||
IsClosed = false;
|
||||
_myInfosDict = new Dictionary<string, string>();
|
||||
|
||||
if (MainWindow.PAKasTXT != null)
|
||||
if (MainWindow.pakAsTxt != null)
|
||||
{
|
||||
if (MainWindow.currentUsedPAKGUID != null && MainWindow.currentUsedPAKGUID != "0-0-0-0")
|
||||
if (MainWindow.CurrentUsedPakGuid != null && MainWindow.CurrentUsedPakGuid != "0-0-0-0")
|
||||
{
|
||||
for (int i = 0; i < MainWindow.PAKasTXT.Length; i++)
|
||||
for (int i = 0; i < MainWindow.pakAsTxt.Length; i++)
|
||||
{
|
||||
if (MainWindow.PAKasTXT[i].Contains(".uasset") || MainWindow.PAKasTXT[i].Contains(".uexp") || MainWindow.PAKasTXT[i].Contains(".ubulk"))
|
||||
if (MainWindow.pakAsTxt[i].Contains(".uasset") || MainWindow.pakAsTxt[i].Contains(".uexp") || MainWindow.pakAsTxt[i].Contains(".ubulk"))
|
||||
{
|
||||
if (!myInfosDict.ContainsKey(MainWindow.PAKasTXT[i].Substring(0, MainWindow.PAKasTXT[i].LastIndexOf("."))))
|
||||
if (!_myInfosDict.ContainsKey(MainWindow.pakAsTxt[i].Substring(0, MainWindow.pakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal))))
|
||||
{
|
||||
myInfosDict.Add(MainWindow.PAKasTXT[i].Substring(0, MainWindow.PAKasTXT[i].LastIndexOf(".")), MainWindow.currentUsedPAK);
|
||||
_myInfosDict.Add(MainWindow.pakAsTxt[i].Substring(0, MainWindow.pakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal)), MainWindow.CurrentUsedPak);
|
||||
|
||||
fileName = MainWindow.PAKasTXT[i].Substring(0, MainWindow.PAKasTXT[i].LastIndexOf("."));
|
||||
_fileName = MainWindow.pakAsTxt[i].Substring(0, MainWindow.pakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal));
|
||||
myInfos.Add(new FileInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.currentUsedPAK,
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.CurrentUsedPak,
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!myInfosDict.ContainsKey(MainWindow.PAKasTXT[i]))
|
||||
if (!_myInfosDict.ContainsKey(MainWindow.pakAsTxt[i]))
|
||||
{
|
||||
myInfosDict.Add(MainWindow.PAKasTXT[i], MainWindow.currentUsedPAK);
|
||||
_myInfosDict.Add(MainWindow.pakAsTxt[i], MainWindow.CurrentUsedPak);
|
||||
|
||||
fileName = MainWindow.PAKasTXT[i];
|
||||
_fileName = MainWindow.pakAsTxt[i];
|
||||
myInfos.Add(new FileInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.currentUsedPAK,
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.CurrentUsedPak,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -75,33 +68,33 @@ namespace FModel.Forms
|
|||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < MainWindow.PAKasTXT.Length; i++)
|
||||
for (int i = 0; i < MainWindow.pakAsTxt.Length; i++)
|
||||
{
|
||||
if (MainWindow.PAKasTXT[i].Contains(".uasset") || MainWindow.PAKasTXT[i].Contains(".uexp") || MainWindow.PAKasTXT[i].Contains(".ubulk"))
|
||||
if (MainWindow.pakAsTxt[i].Contains(".uasset") || MainWindow.pakAsTxt[i].Contains(".uexp") || MainWindow.pakAsTxt[i].Contains(".ubulk"))
|
||||
{
|
||||
if (!myInfosDict.ContainsKey(MainWindow.PAKasTXT[i].Substring(0, MainWindow.PAKasTXT[i].LastIndexOf("."))))
|
||||
if (!_myInfosDict.ContainsKey(MainWindow.pakAsTxt[i].Substring(0, MainWindow.pakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal))))
|
||||
{
|
||||
myInfosDict.Add(MainWindow.PAKasTXT[i].Substring(0, MainWindow.PAKasTXT[i].LastIndexOf(".")), MainWindow.AllPAKsDictionary[Path.GetFileNameWithoutExtension(MainWindow.PAKasTXT[i])]);
|
||||
_myInfosDict.Add(MainWindow.pakAsTxt[i].Substring(0, MainWindow.pakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal)), MainWindow.AllpaksDictionary[Path.GetFileNameWithoutExtension(MainWindow.pakAsTxt[i])]);
|
||||
|
||||
fileName = MainWindow.PAKasTXT[i].Substring(0, MainWindow.PAKasTXT[i].LastIndexOf("."));
|
||||
_fileName = MainWindow.pakAsTxt[i].Substring(0, MainWindow.pakAsTxt[i].LastIndexOf(".", StringComparison.Ordinal));
|
||||
myInfos.Add(new FileInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.AllPAKsDictionary[Path.GetFileNameWithoutExtension(MainWindow.PAKasTXT[i])],
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.AllpaksDictionary[Path.GetFileNameWithoutExtension(MainWindow.pakAsTxt[i])],
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!myInfosDict.ContainsKey(MainWindow.PAKasTXT[i]))
|
||||
if (!_myInfosDict.ContainsKey(MainWindow.pakAsTxt[i]))
|
||||
{
|
||||
myInfosDict.Add(MainWindow.PAKasTXT[i], MainWindow.AllPAKsDictionary[Path.GetFileName(MainWindow.PAKasTXT[i])]);
|
||||
_myInfosDict.Add(MainWindow.pakAsTxt[i], MainWindow.AllpaksDictionary[Path.GetFileName(MainWindow.pakAsTxt[i])]);
|
||||
|
||||
fileName = MainWindow.PAKasTXT[i];
|
||||
_fileName = MainWindow.pakAsTxt[i];
|
||||
myInfos.Add(new FileInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.AllPAKsDictionary[Path.GetFileName(MainWindow.PAKasTXT[i])],
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.AllpaksDictionary[Path.GetFileName(MainWindow.pakAsTxt[i])],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -117,19 +110,19 @@ namespace FModel.Forms
|
|||
|
||||
private void listView1_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
|
||||
{
|
||||
if (myFilteredInfos == null || myFilteredInfos.Count == 0)
|
||||
if (_myFilteredInfos == null || _myFilteredInfos.Count == 0)
|
||||
{
|
||||
var acc = myInfos[e.ItemIndex];
|
||||
e.Item = new ListViewItem(
|
||||
new string[]
|
||||
{ acc.FileName, acc.PAKFile });
|
||||
new[]
|
||||
{ acc.FileName, acc.PakFile });
|
||||
}
|
||||
else
|
||||
{
|
||||
var acc2 = myFilteredInfos[e.ItemIndex];
|
||||
var acc2 = _myFilteredInfos[e.ItemIndex];
|
||||
e.Item = new ListViewItem(
|
||||
new string[]
|
||||
{ acc2.FileName, acc2.PAKFile });
|
||||
new[]
|
||||
{ acc2.FileName, acc2.PakFile });
|
||||
}
|
||||
}
|
||||
private void ShowItemsVirtual(List<FileInfo> infos)
|
||||
|
|
@ -147,23 +140,23 @@ namespace FModel.Forms
|
|||
}));
|
||||
}
|
||||
|
||||
private void filterListView()
|
||||
private void FilterListView()
|
||||
{
|
||||
if (listView1.InvokeRequired)
|
||||
{
|
||||
listView1.Invoke(new Action(filterListView));
|
||||
listView1.Invoke(new Action(FilterListView));
|
||||
return;
|
||||
}
|
||||
|
||||
myFilteredInfos = new List<FileInfoFilter>();
|
||||
myFilteredInfosDict = new Dictionary<string, string>();
|
||||
_myFilteredInfos = new List<FileInfoFilter>();
|
||||
_myFilteredInfosDict = new Dictionary<string, string>();
|
||||
listView1.BeginUpdate();
|
||||
listView1.VirtualListSize = 0;
|
||||
listView1.Invalidate();
|
||||
|
||||
if (MainWindow.PAKasTXT != null)
|
||||
if (MainWindow.pakAsTxt != null)
|
||||
{
|
||||
if (MainWindow.currentUsedPAKGUID != null && MainWindow.currentUsedPAKGUID != "0-0-0-0")
|
||||
if (MainWindow.CurrentUsedPakGuid != null && MainWindow.CurrentUsedPakGuid != "0-0-0-0")
|
||||
{
|
||||
if (!string.IsNullOrEmpty(textBox1.Text) && textBox1.Text.Length > 2)
|
||||
{
|
||||
|
|
@ -173,34 +166,34 @@ namespace FModel.Forms
|
|||
{
|
||||
if (myInfos[i].FileName.Contains(".uasset") || myInfos[i].FileName.Contains(".uexp") || myInfos[i].FileName.Contains(".ubulk"))
|
||||
{
|
||||
if (!myFilteredInfosDict.ContainsKey(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf("."))))
|
||||
if (!_myFilteredInfosDict.ContainsKey(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal))))
|
||||
{
|
||||
myFilteredInfosDict.Add(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".")), MainWindow.currentUsedPAK);
|
||||
_myFilteredInfosDict.Add(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal)), MainWindow.CurrentUsedPak);
|
||||
|
||||
fileName = myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf("."));
|
||||
myFilteredInfos.Add(new FileInfoFilter
|
||||
_fileName = myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal));
|
||||
_myFilteredInfos.Add(new FileInfoFilter
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.currentUsedPAK,
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.CurrentUsedPak,
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!myFilteredInfosDict.ContainsKey(myInfos[i].FileName))
|
||||
if (!_myFilteredInfosDict.ContainsKey(myInfos[i].FileName))
|
||||
{
|
||||
myFilteredInfosDict.Add(myInfos[i].FileName, MainWindow.currentUsedPAK);
|
||||
_myFilteredInfosDict.Add(myInfos[i].FileName, MainWindow.CurrentUsedPak);
|
||||
|
||||
fileName = myInfos[i].FileName;
|
||||
myFilteredInfos.Add(new FileInfoFilter
|
||||
_fileName = myInfos[i].FileName;
|
||||
_myFilteredInfos.Add(new FileInfoFilter
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.currentUsedPAK,
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.CurrentUsedPak,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ShowItemsVirtualFiltered(myFilteredInfos);
|
||||
ShowItemsVirtualFiltered(_myFilteredInfos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -219,34 +212,34 @@ namespace FModel.Forms
|
|||
{
|
||||
if (myInfos[i].FileName.Contains(".uasset") || myInfos[i].FileName.Contains(".uexp") || myInfos[i].FileName.Contains(".ubulk"))
|
||||
{
|
||||
if (!myFilteredInfosDict.ContainsKey(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf("."))))
|
||||
if (!_myFilteredInfosDict.ContainsKey(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal))))
|
||||
{
|
||||
myFilteredInfosDict.Add(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".")), MainWindow.AllPAKsDictionary[Path.GetFileNameWithoutExtension(myInfos[i].FileName)]);
|
||||
_myFilteredInfosDict.Add(myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal)), MainWindow.AllpaksDictionary[Path.GetFileNameWithoutExtension(myInfos[i].FileName)]);
|
||||
|
||||
fileName = myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf("."));
|
||||
myFilteredInfos.Add(new FileInfoFilter
|
||||
_fileName = myInfos[i].FileName.Substring(0, myInfos[i].FileName.LastIndexOf(".", StringComparison.Ordinal));
|
||||
_myFilteredInfos.Add(new FileInfoFilter
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.AllPAKsDictionary[Path.GetFileNameWithoutExtension(myInfos[i].FileName)],
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.AllpaksDictionary[Path.GetFileNameWithoutExtension(myInfos[i].FileName)],
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!myFilteredInfosDict.ContainsKey(myInfos[i].FileName))
|
||||
if (!_myFilteredInfosDict.ContainsKey(myInfos[i].FileName))
|
||||
{
|
||||
myFilteredInfosDict.Add(myInfos[i].FileName, MainWindow.AllPAKsDictionary[Path.GetFileName(myInfos[i].FileName)]);
|
||||
_myFilteredInfosDict.Add(myInfos[i].FileName, MainWindow.AllpaksDictionary[Path.GetFileName(myInfos[i].FileName)]);
|
||||
|
||||
fileName = myInfos[i].FileName;
|
||||
myFilteredInfos.Add(new FileInfoFilter
|
||||
_fileName = myInfos[i].FileName;
|
||||
_myFilteredInfos.Add(new FileInfoFilter
|
||||
{
|
||||
FileName = fileName,
|
||||
PAKFile = MainWindow.AllPAKsDictionary[Path.GetFileName(myInfos[i].FileName)],
|
||||
FileName = _fileName,
|
||||
PakFile = MainWindow.AllpaksDictionary[Path.GetFileName(myInfos[i].FileName)],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ShowItemsVirtualFiltered(myFilteredInfos);
|
||||
ShowItemsVirtualFiltered(_myFilteredInfos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -261,10 +254,10 @@ namespace FModel.Forms
|
|||
}
|
||||
void assistant_Idled(object sender, EventArgs e)
|
||||
{
|
||||
this.Invoke(
|
||||
Invoke(
|
||||
new MethodInvoker(() =>
|
||||
{
|
||||
filterListView();
|
||||
FilterListView();
|
||||
}));
|
||||
}
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
|
|
@ -275,15 +268,15 @@ namespace FModel.Forms
|
|||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
ListView.SelectedIndexCollection col = listView1.SelectedIndices;
|
||||
sfPath = listView1.Items[col[0]].Text;
|
||||
SfPath = listView1.Items[col[0]].Text;
|
||||
|
||||
isClosed = true;
|
||||
IsClosed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedIndices != null)
|
||||
if (true)
|
||||
{
|
||||
button1.Enabled = true;
|
||||
}
|
||||
|
|
@ -297,7 +290,7 @@ namespace FModel.Forms
|
|||
get;
|
||||
set;
|
||||
}
|
||||
public string PAKFile
|
||||
public string PakFile
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
|
@ -310,7 +303,7 @@ namespace FModel.Forms
|
|||
get;
|
||||
set;
|
||||
}
|
||||
public string PAKFile
|
||||
public string PakFile
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using FModel.Properties;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
public partial class Settings : Form
|
||||
{
|
||||
private static string PAKsPathBefore;
|
||||
private static string OutputPathBefore;
|
||||
private static string _paKsPathBefore;
|
||||
private static string _outputPathBefore;
|
||||
|
||||
public static Bitmap ResizeImage(Image image, int width, int height)
|
||||
{
|
||||
|
|
@ -109,9 +104,9 @@ namespace FModel.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
filenameLabel.Text = "File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -121,13 +116,13 @@ namespace FModel.Forms
|
|||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
if (Properties.Settings.Default.loadFeaturedImage == true)
|
||||
if (Properties.Settings.Default.loadFeaturedImage)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
filenameLabel.Text = "File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -138,48 +133,48 @@ namespace FModel.Forms
|
|||
}
|
||||
}
|
||||
|
||||
PAKsPathBefore = Properties.Settings.Default.PAKsPath;
|
||||
OutputPathBefore = Properties.Settings.Default.ExtractOutput;
|
||||
_paKsPathBefore = Properties.Settings.Default.PAKsPath;
|
||||
_outputPathBefore = Properties.Settings.Default.ExtractOutput;
|
||||
}
|
||||
|
||||
private void OKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
//INPUT
|
||||
Properties.Settings.Default.PAKsPath = textBox2.Text; //SET
|
||||
string PAKsPathAfter = Properties.Settings.Default.PAKsPath;
|
||||
if (PAKsPathBefore != PAKsPathAfter)
|
||||
string paKsPathAfter = Properties.Settings.Default.PAKsPath;
|
||||
if (_paKsPathBefore != paKsPathAfter)
|
||||
{
|
||||
MessageBox.Show("Please, restart FModel to apply your new input path", "Fortnite .PAK Path Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBox.Show(@"Please, restart FModel to apply your new input path", @"Fortnite .PAK Path Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
//OUTPUT
|
||||
Properties.Settings.Default.ExtractOutput = textBox1.Text; //SET
|
||||
if (!Directory.Exists(Properties.Settings.Default.ExtractOutput))
|
||||
Directory.CreateDirectory(Properties.Settings.Default.ExtractOutput);
|
||||
string OutputPathAfter = Properties.Settings.Default.ExtractOutput;
|
||||
if (OutputPathBefore != OutputPathAfter)
|
||||
string outputPathAfter = Properties.Settings.Default.ExtractOutput;
|
||||
if (_outputPathBefore != outputPathAfter)
|
||||
{
|
||||
MessageBox.Show("Please, restart FModel to apply your new output path", "FModel Output Path Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBox.Show(@"Please, restart FModel to apply your new output path", @"FModel Output Path Changed", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
//ICON CREATION
|
||||
if (checkBox2.Checked == true)
|
||||
if (checkBox2.Checked)
|
||||
Properties.Settings.Default.createIconForCosmetics = true;
|
||||
if (checkBox2.Checked == false)
|
||||
Properties.Settings.Default.createIconForCosmetics = false;
|
||||
if (checkBox5.Checked == true)
|
||||
if (checkBox5.Checked)
|
||||
Properties.Settings.Default.createIconForVariants = true;
|
||||
if (checkBox5.Checked == false)
|
||||
Properties.Settings.Default.createIconForVariants = false;
|
||||
if (checkBox3.Checked == true)
|
||||
if (checkBox3.Checked)
|
||||
Properties.Settings.Default.createIconForConsumablesWeapons = true;
|
||||
if (checkBox3.Checked == false)
|
||||
Properties.Settings.Default.createIconForConsumablesWeapons = false;
|
||||
if (checkBox4.Checked == true)
|
||||
if (checkBox4.Checked)
|
||||
Properties.Settings.Default.createIconForTraps = true;
|
||||
if (checkBox4.Checked == false)
|
||||
Properties.Settings.Default.createIconForTraps = false;
|
||||
if (checkBox6.Checked == true)
|
||||
if (checkBox6.Checked)
|
||||
Properties.Settings.Default.createIconForChallenges = true;
|
||||
if (checkBox6.Checked == false)
|
||||
Properties.Settings.Default.createIconForChallenges = false;
|
||||
|
|
@ -189,7 +184,7 @@ namespace FModel.Forms
|
|||
Properties.Settings.Default.mergerImagesRow = Decimal.ToInt32(imgsPerRow.Value);
|
||||
|
||||
//WATERMARK
|
||||
if (checkBox7.Checked == true)
|
||||
if (checkBox7.Checked)
|
||||
Properties.Settings.Default.isWatermark = true;
|
||||
if (checkBox7.Checked == false)
|
||||
Properties.Settings.Default.isWatermark = false;
|
||||
|
|
@ -197,7 +192,7 @@ namespace FModel.Forms
|
|||
Properties.Settings.Default.wOpacity = trackBar1.Value;
|
||||
|
||||
//FEATURED
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
Properties.Settings.Default.loadFeaturedImage = true;
|
||||
if (checkBox8.Checked == false)
|
||||
Properties.Settings.Default.loadFeaturedImage = false;
|
||||
|
|
@ -210,21 +205,21 @@ namespace FModel.Forms
|
|||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog theDialog = new OpenFileDialog();
|
||||
theDialog.Title = "Choose your watermark";
|
||||
theDialog.Title = @"Choose your watermark";
|
||||
theDialog.Multiselect = false;
|
||||
theDialog.Filter = "PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|DDS Files (*.dds)|*.dds|All Files (*.*)|*.*";
|
||||
theDialog.Filter = @"PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|DDS Files (*.dds)|*.dds|All Files (*.*)|*.*";
|
||||
|
||||
if (theDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.wFilename = theDialog.FileName;
|
||||
Properties.Settings.Default.Save();
|
||||
filenameLabel.Text = "File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.wFilename);
|
||||
|
||||
if (checkBox8.Checked == false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -234,11 +229,11 @@ namespace FModel.Forms
|
|||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -259,7 +254,7 @@ namespace FModel.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -270,11 +265,11 @@ namespace FModel.Forms
|
|||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -292,7 +287,7 @@ namespace FModel.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -303,11 +298,11 @@ namespace FModel.Forms
|
|||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.wFilename);
|
||||
|
|
@ -329,7 +324,7 @@ namespace FModel.Forms
|
|||
trackBar1.Enabled = false;
|
||||
trackBar2.Enabled = false;
|
||||
}
|
||||
if (checkBox7.Checked == true)
|
||||
if (checkBox7.Checked)
|
||||
{
|
||||
button1.Enabled = true;
|
||||
trackBar1.Enabled = true;
|
||||
|
|
@ -341,7 +336,7 @@ namespace FModel.Forms
|
|||
{
|
||||
if (checkBox8.Checked == false)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
|
|
@ -351,9 +346,9 @@ namespace FModel.Forms
|
|||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using FModel.Properties;
|
||||
|
||||
namespace FModel.Forms
|
||||
{
|
||||
|
|
@ -30,9 +25,9 @@ namespace FModel.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
filenameLabel.Text = "File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -42,13 +37,13 @@ namespace FModel.Forms
|
|||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
if (Properties.Settings.Default.UMFeatured == true)
|
||||
if (Properties.Settings.Default.UMFeatured)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
filenameLabel.Text = "File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -80,63 +75,63 @@ namespace FModel.Forms
|
|||
|
||||
private void optionsOKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox2.Checked == true)
|
||||
if (checkBox2.Checked)
|
||||
Properties.Settings.Default.UMCosmetics = true;
|
||||
if (checkBox2.Checked == false)
|
||||
Properties.Settings.Default.UMCosmetics = false;
|
||||
if (checkBox5.Checked == true)
|
||||
if (checkBox5.Checked)
|
||||
Properties.Settings.Default.UMVariants = true;
|
||||
if (checkBox5.Checked == false)
|
||||
Properties.Settings.Default.UMVariants = false;
|
||||
if (checkBox3.Checked == true)
|
||||
if (checkBox3.Checked)
|
||||
Properties.Settings.Default.UMConsumablesWeapons = true;
|
||||
if (checkBox3.Checked == false)
|
||||
Properties.Settings.Default.UMConsumablesWeapons = false;
|
||||
if (checkBox4.Checked == true)
|
||||
if (checkBox4.Checked)
|
||||
Properties.Settings.Default.UMTraps = true;
|
||||
if (checkBox4.Checked == false)
|
||||
Properties.Settings.Default.UMTraps = false;
|
||||
if (checkBox6.Checked == true)
|
||||
if (checkBox6.Checked)
|
||||
Properties.Settings.Default.UMChallenges = true;
|
||||
if (checkBox6.Checked == false)
|
||||
Properties.Settings.Default.UMChallenges = false;
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
Properties.Settings.Default.UMFeatured = true;
|
||||
if (checkBox8.Checked == false)
|
||||
Properties.Settings.Default.UMFeatured = false;
|
||||
if (checkBox7.Checked == true)
|
||||
if (checkBox7.Checked)
|
||||
Properties.Settings.Default.UMWatermark = true;
|
||||
if (checkBox7.Checked == false)
|
||||
Properties.Settings.Default.UMWatermark = false;
|
||||
if (checkBox9.Checked == true)
|
||||
if (checkBox9.Checked)
|
||||
Properties.Settings.Default.UMTCosmeticsVariants = true;
|
||||
if (checkBox9.Checked == false)
|
||||
Properties.Settings.Default.UMTCosmeticsVariants = false;
|
||||
if (checkBox14.Checked == true)
|
||||
if (checkBox14.Checked)
|
||||
Properties.Settings.Default.UMTLoading = true;
|
||||
if (checkBox14.Checked == false)
|
||||
Properties.Settings.Default.UMTLoading = false;
|
||||
if (checkBox1.Checked == true)
|
||||
if (checkBox1.Checked)
|
||||
Properties.Settings.Default.UMTWeapons = true;
|
||||
if (checkBox1.Checked == false)
|
||||
Properties.Settings.Default.UMTWeapons = false;
|
||||
if (checkBox10.Checked == true)
|
||||
if (checkBox10.Checked)
|
||||
Properties.Settings.Default.UMTBanners = true;
|
||||
if (checkBox10.Checked == false)
|
||||
Properties.Settings.Default.UMTBanners = false;
|
||||
if (checkBox11.Checked == true)
|
||||
if (checkBox11.Checked)
|
||||
Properties.Settings.Default.UMTFeaturedIMGs = true;
|
||||
if (checkBox11.Checked == false)
|
||||
Properties.Settings.Default.UMTFeaturedIMGs = false;
|
||||
if (checkBox12.Checked == true)
|
||||
if (checkBox12.Checked)
|
||||
Properties.Settings.Default.UMTAthena = true;
|
||||
if (checkBox12.Checked == false)
|
||||
Properties.Settings.Default.UMTAthena = false;
|
||||
if (checkBox13.Checked == true)
|
||||
if (checkBox13.Checked)
|
||||
Properties.Settings.Default.UMTDevices = true;
|
||||
if (checkBox13.Checked == false)
|
||||
Properties.Settings.Default.UMTDevices = false;
|
||||
if (checkBox15.Checked == true)
|
||||
if (checkBox15.Checked)
|
||||
Properties.Settings.Default.UMTVehicles = true;
|
||||
if (checkBox15.Checked == false)
|
||||
Properties.Settings.Default.UMTVehicles = false;
|
||||
|
|
@ -152,21 +147,21 @@ namespace FModel.Forms
|
|||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog theDialog = new OpenFileDialog();
|
||||
theDialog.Title = "Choose your watermark";
|
||||
theDialog.Title = @"Choose your watermark";
|
||||
theDialog.Multiselect = false;
|
||||
theDialog.Filter = "PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|DDS Files (*.dds)|*.dds|All Files (*.*)|*.*";
|
||||
theDialog.Filter = @"PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|DDS Files (*.dds)|*.dds|All Files (*.*)|*.*";
|
||||
|
||||
if (theDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.UMFilename = theDialog.FileName;
|
||||
Properties.Settings.Default.Save();
|
||||
filenameLabel.Text = "File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
filenameLabel.Text = @"File Name: " + Path.GetFileName(Properties.Settings.Default.UMFilename);
|
||||
|
||||
if (checkBox8.Checked == false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -176,11 +171,11 @@ namespace FModel.Forms
|
|||
wPictureBox.Image = bmp;
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -201,7 +196,7 @@ namespace FModel.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -212,11 +207,11 @@ namespace FModel.Forms
|
|||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -234,7 +229,7 @@ namespace FModel.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -245,11 +240,11 @@ namespace FModel.Forms
|
|||
wPictureBox.Refresh();
|
||||
}
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
|
||||
Image watermark = Image.FromFile(Properties.Settings.Default.UMFilename);
|
||||
|
|
@ -271,7 +266,7 @@ namespace FModel.Forms
|
|||
trackBar1.Enabled = false;
|
||||
trackBar2.Enabled = false;
|
||||
}
|
||||
if (checkBox7.Checked == true)
|
||||
if (checkBox7.Checked)
|
||||
{
|
||||
button1.Enabled = true;
|
||||
trackBar1.Enabled = true;
|
||||
|
|
@ -283,7 +278,7 @@ namespace FModel.Forms
|
|||
{
|
||||
if (checkBox8.Checked == false)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplate);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplate);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
|
|
@ -293,9 +288,9 @@ namespace FModel.Forms
|
|||
}
|
||||
wPictureBox.Image = bmp;
|
||||
}
|
||||
if (checkBox8.Checked == true)
|
||||
if (checkBox8.Checked)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Properties.Resources.wTemplateF);
|
||||
Bitmap bmp = new Bitmap(Resources.wTemplateF);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename))
|
||||
{
|
||||
|
|
|
|||
2004
FModel/MainWindow.cs
2004
FModel/MainWindow.cs
File diff suppressed because it is too large
Load Diff
|
|
@ -6,15 +6,12 @@
|
|||
//
|
||||
// var bannersParser = BannersParser.FromJson(jsonString);
|
||||
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FModel.Parser.Banners
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class BannersParser
|
||||
{
|
||||
[JsonProperty("export_type")]
|
||||
|
|
@ -39,7 +36,7 @@ namespace FModel.Parser.Banners
|
|||
public bool BFullUsageRights { get; set; }
|
||||
}
|
||||
|
||||
public partial class Image
|
||||
public class Image
|
||||
{
|
||||
[JsonProperty("asset_path_name")]
|
||||
public string AssetPathName { get; set; }
|
||||
|
|
@ -50,12 +47,12 @@ namespace FModel.Parser.Banners
|
|||
|
||||
public partial class BannersParser
|
||||
{
|
||||
public static BannersParser FromJson(string json) => JsonConvert.DeserializeObject<BannersParser>(json, FModel.Parser.Banners.Converter.Settings);
|
||||
public static BannersParser FromJson(string json) => JsonConvert.DeserializeObject<BannersParser>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this BannersParser self) => JsonConvert.SerializeObject(self, FModel.Parser.Banners.Converter.Settings);
|
||||
public static string ToJson(this BannersParser self) => JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
|
|
@ -67,7 +64,7 @@ namespace FModel.Parser.Banners
|
|||
Converters =
|
||||
{
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FModel.Parser.Challenges
|
||||
{
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class ChallengeBundleIdParser
|
||||
{
|
||||
[JsonProperty("export_type")]
|
||||
|
|
@ -34,7 +28,7 @@ namespace FModel.Parser.Challenges
|
|||
public LargePreviewImage LargePreviewImage { get; set; }
|
||||
}
|
||||
|
||||
public partial class BundleCompletionReward
|
||||
public class BundleCompletionReward
|
||||
{
|
||||
[JsonProperty("CompletionCount")]
|
||||
public long CompletionCount { get; set; }
|
||||
|
|
@ -43,7 +37,7 @@ namespace FModel.Parser.Challenges
|
|||
public Reward[] Rewards { get; set; }
|
||||
}
|
||||
|
||||
public partial class Reward
|
||||
public class Reward
|
||||
{
|
||||
[JsonProperty("ItemDefinition")]
|
||||
public LargePreviewImage ItemDefinition { get; set; }
|
||||
|
|
@ -64,7 +58,7 @@ namespace FModel.Parser.Challenges
|
|||
public string RewardType { get; set; }
|
||||
}
|
||||
|
||||
public partial class LargePreviewImage
|
||||
public class LargePreviewImage
|
||||
{
|
||||
[JsonProperty("asset_path_name")]
|
||||
public string AssetPathName { get; set; }
|
||||
|
|
@ -73,7 +67,7 @@ namespace FModel.Parser.Challenges
|
|||
public string SubPathString { get; set; }
|
||||
}
|
||||
|
||||
public partial class RewardGiftBox
|
||||
public class RewardGiftBox
|
||||
{
|
||||
[JsonProperty("GiftBoxToUse")]
|
||||
public LargePreviewImage GiftBoxToUse { get; set; }
|
||||
|
|
@ -82,7 +76,7 @@ namespace FModel.Parser.Challenges
|
|||
public object[] GiftBoxFormatData { get; set; }
|
||||
}
|
||||
|
||||
public partial class DisplayStyle
|
||||
public class DisplayStyle
|
||||
{
|
||||
[JsonProperty("PrimaryColor")]
|
||||
public ColorChallenge PrimaryColor { get; set; }
|
||||
|
|
@ -97,7 +91,7 @@ namespace FModel.Parser.Challenges
|
|||
public LargePreviewImage DisplayImage { get; set; }
|
||||
}
|
||||
|
||||
public partial class ColorChallenge
|
||||
public class ColorChallenge
|
||||
{
|
||||
[JsonProperty("r")]
|
||||
public double R { get; set; }
|
||||
|
|
@ -112,7 +106,7 @@ namespace FModel.Parser.Challenges
|
|||
public long A { get; set; }
|
||||
}
|
||||
|
||||
public partial class QuestInfo
|
||||
public class QuestInfo
|
||||
{
|
||||
[JsonProperty("QuestDefinition")]
|
||||
public LargePreviewImage QuestDefinition { get; set; }
|
||||
|
|
@ -129,12 +123,12 @@ namespace FModel.Parser.Challenges
|
|||
|
||||
public partial class ChallengeBundleIdParser
|
||||
{
|
||||
public static ChallengeBundleIdParser[] FromJson(string json) => JsonConvert.DeserializeObject<ChallengeBundleIdParser[]>(json, FModel.Parser.Challenges.Converter.Settings);
|
||||
public static ChallengeBundleIdParser[] FromJson(string json) => JsonConvert.DeserializeObject<ChallengeBundleIdParser[]>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this ChallengeBundleIdParser[] self) => JsonConvert.SerializeObject(self, FModel.Parser.Challenges.Converter.Settings);
|
||||
public static string ToJson(this ChallengeBundleIdParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
|
|
@ -146,7 +140,7 @@ namespace FModel.Parser.Challenges
|
|||
Converters =
|
||||
{
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FModel.Parser.Featured
|
||||
{
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class FeaturedParser
|
||||
{
|
||||
[JsonProperty("export_type")]
|
||||
|
|
@ -28,7 +22,7 @@ namespace FModel.Parser.Featured
|
|||
public Background Background { get; set; }
|
||||
}
|
||||
|
||||
public partial class Background
|
||||
public class Background
|
||||
{
|
||||
[JsonProperty("r")]
|
||||
public double R { get; set; }
|
||||
|
|
@ -43,7 +37,7 @@ namespace FModel.Parser.Featured
|
|||
public long A { get; set; }
|
||||
}
|
||||
|
||||
public partial class ImageLol
|
||||
public class ImageLol
|
||||
{
|
||||
[JsonProperty("ImageSize")]
|
||||
public ImageSize ImageSize { get; set; }
|
||||
|
|
@ -52,7 +46,7 @@ namespace FModel.Parser.Featured
|
|||
public string ResourceObject { get; set; }
|
||||
}
|
||||
|
||||
public partial class ImageSize
|
||||
public class ImageSize
|
||||
{
|
||||
[JsonProperty("x")]
|
||||
public long X { get; set; }
|
||||
|
|
@ -61,7 +55,7 @@ namespace FModel.Parser.Featured
|
|||
public long Y { get; set; }
|
||||
}
|
||||
|
||||
public partial class Gradient
|
||||
public class Gradient
|
||||
{
|
||||
[JsonProperty("Start")]
|
||||
public Background Start { get; set; }
|
||||
|
|
@ -72,12 +66,12 @@ namespace FModel.Parser.Featured
|
|||
|
||||
public partial class FeaturedParser
|
||||
{
|
||||
public static FeaturedParser[] FromJson(string json) => JsonConvert.DeserializeObject<FeaturedParser[]>(json, FModel.Parser.Featured.Converter.Settings);
|
||||
public static FeaturedParser[] FromJson(string json) => JsonConvert.DeserializeObject<FeaturedParser[]>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this FeaturedParser[] self) => JsonConvert.SerializeObject(self, FModel.Parser.Featured.Converter.Settings);
|
||||
public static string ToJson(this FeaturedParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
|
|
@ -89,7 +83,7 @@ namespace FModel.Parser.Featured
|
|||
Converters =
|
||||
{
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FModel.Parser.Items
|
||||
{
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class ItemsIDParser
|
||||
public partial class ItemsIdParser
|
||||
{
|
||||
[JsonProperty("export_type")]
|
||||
public string ExportType { get; set; }
|
||||
|
||||
[JsonProperty("cosmetic_item")]
|
||||
public string cosmetic_item { get; set; }
|
||||
public string CosmeticItem { get; set; }
|
||||
|
||||
[JsonProperty("CharacterParts")]
|
||||
public string[] CharacterParts { get; set; }
|
||||
|
|
@ -55,13 +49,13 @@ namespace FModel.Parser.Items
|
|||
public DisplayAssetPath DisplayAssetPath { get; set; }
|
||||
}
|
||||
|
||||
public partial class GameplayTags
|
||||
public class GameplayTags
|
||||
{
|
||||
[JsonProperty("gameplay_tags")]
|
||||
public string[] GameplayTagsGameplayTags { get; set; }
|
||||
}
|
||||
|
||||
public partial class PreviewImage
|
||||
public class PreviewImage
|
||||
{
|
||||
[JsonProperty("asset_path_name")]
|
||||
public string AssetPathName { get; set; }
|
||||
|
|
@ -70,7 +64,7 @@ namespace FModel.Parser.Items
|
|||
public string SubPathString { get; set; }
|
||||
}
|
||||
|
||||
public partial class DisplayAssetPath
|
||||
public class DisplayAssetPath
|
||||
{
|
||||
[JsonProperty("asset_path_name")]
|
||||
public string AssetPathName { get; set; }
|
||||
|
|
@ -79,14 +73,14 @@ namespace FModel.Parser.Items
|
|||
public string SubPathString { get; set; }
|
||||
}
|
||||
|
||||
public partial class ItemsIDParser
|
||||
public partial class ItemsIdParser
|
||||
{
|
||||
public static ItemsIDParser[] FromJson(string json) => JsonConvert.DeserializeObject<ItemsIDParser[]>(json, FModel.Parser.Items.Converter.Settings);
|
||||
public static ItemsIdParser[] FromJson(string json) => JsonConvert.DeserializeObject<ItemsIdParser[]>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this ItemsIDParser[] self) => JsonConvert.SerializeObject(self, FModel.Parser.Items.Converter.Settings);
|
||||
public static string ToJson(this ItemsIdParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
|
|
@ -98,7 +92,7 @@ namespace FModel.Parser.Items
|
|||
Converters =
|
||||
{
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -6,15 +6,13 @@
|
|||
//
|
||||
// var meshesParser = MeshesParser.FromJson(jsonString);
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FModel.Parser.Meshes
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class MeshesParser
|
||||
{
|
||||
[JsonProperty("super_object")]
|
||||
|
|
@ -33,7 +31,7 @@ namespace FModel.Parser.Meshes
|
|||
public LodModel[] LodModels { get; set; }
|
||||
}
|
||||
|
||||
public partial class ImportedBounds
|
||||
public class ImportedBounds
|
||||
{
|
||||
[JsonProperty("origin")]
|
||||
public BoxExtend Origin { get; set; }
|
||||
|
|
@ -45,7 +43,7 @@ namespace FModel.Parser.Meshes
|
|||
public double SphereRadius { get; set; }
|
||||
}
|
||||
|
||||
public partial class BoxExtend
|
||||
public class BoxExtend
|
||||
{
|
||||
[JsonProperty("x")]
|
||||
public double X { get; set; }
|
||||
|
|
@ -60,7 +58,7 @@ namespace FModel.Parser.Meshes
|
|||
public double? W { get; set; }
|
||||
}
|
||||
|
||||
public partial class LodModel
|
||||
public class LodModel
|
||||
{
|
||||
[JsonProperty("sections")]
|
||||
public Section[] Sections { get; set; }
|
||||
|
|
@ -87,13 +85,13 @@ namespace FModel.Parser.Meshes
|
|||
public object ColourVertexBuffer { get; set; }
|
||||
}
|
||||
|
||||
public partial class Indices
|
||||
public class Indices
|
||||
{
|
||||
[JsonProperty("Indices16")]
|
||||
public long[] Indices16 { get; set; }
|
||||
}
|
||||
|
||||
public partial class PositionVertexBuffer
|
||||
public class PositionVertexBuffer
|
||||
{
|
||||
[JsonProperty("verts")]
|
||||
public BoxExtend[] Verts { get; set; }
|
||||
|
|
@ -105,7 +103,7 @@ namespace FModel.Parser.Meshes
|
|||
public long NumVerts { get; set; }
|
||||
}
|
||||
|
||||
public partial class Section
|
||||
public class Section
|
||||
{
|
||||
[JsonProperty("material_index")]
|
||||
public long MaterialIndex { get; set; }
|
||||
|
|
@ -138,7 +136,7 @@ namespace FModel.Parser.Meshes
|
|||
public bool Disabled { get; set; }
|
||||
}
|
||||
|
||||
public partial class ClothingData
|
||||
public class ClothingData
|
||||
{
|
||||
[JsonProperty("asset_guid")]
|
||||
public string AssetGuid { get; set; }
|
||||
|
|
@ -147,7 +145,7 @@ namespace FModel.Parser.Meshes
|
|||
public long AssetLodIndex { get; set; }
|
||||
}
|
||||
|
||||
public partial class SkinWeightVertexBuffer
|
||||
public class SkinWeightVertexBuffer
|
||||
{
|
||||
[JsonProperty("weights")]
|
||||
public Weight[] Weights { get; set; }
|
||||
|
|
@ -156,7 +154,7 @@ namespace FModel.Parser.Meshes
|
|||
public long NumVertices { get; set; }
|
||||
}
|
||||
|
||||
public partial class Weight
|
||||
public class Weight
|
||||
{
|
||||
[JsonProperty("bone_index")]
|
||||
public long[] BoneIndex { get; set; }
|
||||
|
|
@ -165,7 +163,7 @@ namespace FModel.Parser.Meshes
|
|||
public long[] BoneWeight { get; set; }
|
||||
}
|
||||
|
||||
public partial class StaticMeshVertexBuffer
|
||||
public class StaticMeshVertexBuffer
|
||||
{
|
||||
[JsonProperty("num_tex_coords")]
|
||||
public long NumTexCoords { get; set; }
|
||||
|
|
@ -180,13 +178,13 @@ namespace FModel.Parser.Meshes
|
|||
public Uvs Uvs { get; set; }
|
||||
}
|
||||
|
||||
public partial class Tangents
|
||||
public class Tangents
|
||||
{
|
||||
[JsonProperty("Low")]
|
||||
public TangentsLow[] Low { get; set; }
|
||||
}
|
||||
|
||||
public partial class TangentsLow
|
||||
public class TangentsLow
|
||||
{
|
||||
[JsonProperty("normal")]
|
||||
public BoxExtend Normal { get; set; }
|
||||
|
|
@ -195,19 +193,19 @@ namespace FModel.Parser.Meshes
|
|||
public BoxExtend Tangent { get; set; }
|
||||
}
|
||||
|
||||
public partial class Uvs
|
||||
public class Uvs
|
||||
{
|
||||
[JsonProperty("Low")]
|
||||
public UvsLow[] Low { get; set; }
|
||||
}
|
||||
|
||||
public partial class UvsLow
|
||||
public class UvsLow
|
||||
{
|
||||
[JsonProperty("value")]
|
||||
public Value Value { get; set; }
|
||||
}
|
||||
|
||||
public partial class Value
|
||||
public class Value
|
||||
{
|
||||
[JsonProperty("x")]
|
||||
public long X { get; set; }
|
||||
|
|
@ -216,7 +214,7 @@ namespace FModel.Parser.Meshes
|
|||
public long Y { get; set; }
|
||||
}
|
||||
|
||||
public partial class Material
|
||||
public class Material
|
||||
{
|
||||
[JsonProperty("material_interface")]
|
||||
public string MaterialInterface { get; set; }
|
||||
|
|
@ -228,7 +226,7 @@ namespace FModel.Parser.Meshes
|
|||
public UvChannelData UvChannelData { get; set; }
|
||||
}
|
||||
|
||||
public partial class UvChannelData
|
||||
public class UvChannelData
|
||||
{
|
||||
[JsonProperty("initialised")]
|
||||
public bool Initialised { get; set; }
|
||||
|
|
@ -240,7 +238,7 @@ namespace FModel.Parser.Meshes
|
|||
public double[] LocalUvDensities { get; set; }
|
||||
}
|
||||
|
||||
public partial class RefSkeleton
|
||||
public class RefSkeleton
|
||||
{
|
||||
[JsonProperty("ref_bone_info")]
|
||||
public RefBoneInfo[] RefBoneInfo { get; set; }
|
||||
|
|
@ -252,7 +250,7 @@ namespace FModel.Parser.Meshes
|
|||
public NameToIndex[][] NameToIndex { get; set; }
|
||||
}
|
||||
|
||||
public partial class RefBoneInfo
|
||||
public class RefBoneInfo
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
|
@ -261,7 +259,7 @@ namespace FModel.Parser.Meshes
|
|||
public long ParentIndex { get; set; }
|
||||
}
|
||||
|
||||
public partial class RefBonePose
|
||||
public class RefBonePose
|
||||
{
|
||||
[JsonProperty("rotation")]
|
||||
public BoxExtend Rotation { get; set; }
|
||||
|
|
@ -273,7 +271,7 @@ namespace FModel.Parser.Meshes
|
|||
public BoxExtend Scale3D { get; set; }
|
||||
}
|
||||
|
||||
public partial class SuperObject
|
||||
public class SuperObject
|
||||
{
|
||||
[JsonProperty("export_type")]
|
||||
public string ExportType { get; set; }
|
||||
|
|
@ -294,7 +292,7 @@ namespace FModel.Parser.Meshes
|
|||
public SamplingInfo SamplingInfo { get; set; }
|
||||
}
|
||||
|
||||
public partial class LodInfo
|
||||
public class LodInfo
|
||||
{
|
||||
[JsonProperty("ScreenSize")]
|
||||
public MinLod ScreenSize { get; set; }
|
||||
|
|
@ -341,7 +339,7 @@ namespace FModel.Parser.Meshes
|
|||
public bool BSupportUniformlyDistributedSampling { get; set; }
|
||||
}
|
||||
|
||||
public partial class ReductionSettings
|
||||
public class ReductionSettings
|
||||
{
|
||||
[JsonProperty("TerminationCriterion")]
|
||||
public string TerminationCriterion { get; set; }
|
||||
|
|
@ -404,7 +402,7 @@ namespace FModel.Parser.Meshes
|
|||
public long BaseLod { get; set; }
|
||||
}
|
||||
|
||||
public partial class MinLod
|
||||
public class MinLod
|
||||
{
|
||||
[JsonProperty("cooked")]
|
||||
public bool Cooked { get; set; }
|
||||
|
|
@ -413,19 +411,19 @@ namespace FModel.Parser.Meshes
|
|||
public double Value { get; set; }
|
||||
}
|
||||
|
||||
public partial class SamplingInfo
|
||||
public class SamplingInfo
|
||||
{
|
||||
[JsonProperty("BuiltData")]
|
||||
public BuiltData BuiltData { get; set; }
|
||||
}
|
||||
|
||||
public partial class BuiltData
|
||||
public class BuiltData
|
||||
{
|
||||
[JsonProperty("WholeMeshBuiltData")]
|
||||
public WholeMeshBuiltDatum[] WholeMeshBuiltData { get; set; }
|
||||
}
|
||||
|
||||
public partial class WholeMeshBuiltDatum
|
||||
public class WholeMeshBuiltDatum
|
||||
{
|
||||
[JsonProperty("prob")]
|
||||
public object[] Prob { get; set; }
|
||||
|
|
@ -437,23 +435,23 @@ namespace FModel.Parser.Meshes
|
|||
public long TotalWeight { get; set; }
|
||||
}
|
||||
|
||||
public partial struct NameToIndex
|
||||
public struct NameToIndex
|
||||
{
|
||||
public long? Integer;
|
||||
public string String;
|
||||
|
||||
public static implicit operator NameToIndex(long Integer) => new NameToIndex { Integer = Integer };
|
||||
public static implicit operator NameToIndex(long integer) => new NameToIndex { Integer = integer };
|
||||
public static implicit operator NameToIndex(string String) => new NameToIndex { String = String };
|
||||
}
|
||||
|
||||
public partial class MeshesParser
|
||||
{
|
||||
public static MeshesParser[] FromJson(string json) => JsonConvert.DeserializeObject<MeshesParser[]>(json, FModel.Parser.Meshes.Converter.Settings);
|
||||
public static MeshesParser[] FromJson(string json) => JsonConvert.DeserializeObject<MeshesParser[]>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this MeshesParser[] self) => JsonConvert.SerializeObject(self, FModel.Parser.Meshes.Converter.Settings);
|
||||
public static string ToJson(this MeshesParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
|
|
@ -466,7 +464,7 @@ namespace FModel.Parser.Meshes
|
|||
{
|
||||
NameToIndexConverter.Singleton,
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -533,7 +531,6 @@ namespace FModel.Parser.Meshes
|
|||
}
|
||||
var value = (long)untypedValue;
|
||||
serializer.Serialize(writer, value.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
public static readonly ParseStringConverter Singleton = new ParseStringConverter();
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FModel.Parser.Quest
|
||||
namespace FModel.Parser.Quests
|
||||
{
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class QuestParser
|
||||
{
|
||||
[JsonProperty("export_type")]
|
||||
|
|
@ -55,13 +49,13 @@ namespace FModel.Parser.Quest
|
|||
public LargePreviewImage LargePreviewImage { get; set; }
|
||||
}
|
||||
|
||||
public partial class GameplayTags
|
||||
public class GameplayTags
|
||||
{
|
||||
[JsonProperty("gameplay_tags")]
|
||||
public string[] GameplayTagsGameplayTags { get; set; }
|
||||
}
|
||||
|
||||
public partial class LargePreviewImage
|
||||
public class LargePreviewImage
|
||||
{
|
||||
[JsonProperty("asset_path_name")]
|
||||
public string AssetPathName { get; set; }
|
||||
|
|
@ -70,7 +64,7 @@ namespace FModel.Parser.Quest
|
|||
public string SubPathString { get; set; }
|
||||
}
|
||||
|
||||
public partial class Objective
|
||||
public class Objective
|
||||
{
|
||||
[JsonProperty("BackendName")]
|
||||
public string BackendName { get; set; }
|
||||
|
|
@ -142,7 +136,7 @@ namespace FModel.Parser.Quest
|
|||
public LargePreviewImage ScriptedAction { get; set; }
|
||||
}
|
||||
|
||||
public partial class ObjectiveStatHandle
|
||||
public class ObjectiveStatHandle
|
||||
{
|
||||
[JsonProperty("DataTable")]
|
||||
public string DataTable { get; set; }
|
||||
|
|
@ -151,7 +145,7 @@ namespace FModel.Parser.Quest
|
|||
public string RowName { get; set; }
|
||||
}
|
||||
|
||||
public partial class Reward
|
||||
public class Reward
|
||||
{
|
||||
[JsonProperty("ItemPrimaryAssetId")]
|
||||
public ItemPrimaryAssetId ItemPrimaryAssetId { get; set; }
|
||||
|
|
@ -160,7 +154,7 @@ namespace FModel.Parser.Quest
|
|||
public long Quantity { get; set; }
|
||||
}
|
||||
|
||||
public partial class HiddenRewards
|
||||
public class HiddenRewards
|
||||
{
|
||||
[JsonProperty("TemplateId")]
|
||||
public string TemplateId { get; set; }
|
||||
|
|
@ -169,7 +163,7 @@ namespace FModel.Parser.Quest
|
|||
public long Quantity { get; set; }
|
||||
}
|
||||
|
||||
public partial class ItemPrimaryAssetId
|
||||
public class ItemPrimaryAssetId
|
||||
{
|
||||
[JsonProperty("PrimaryAssetType")]
|
||||
public PrimaryAssetType PrimaryAssetType { get; set; }
|
||||
|
|
@ -178,7 +172,7 @@ namespace FModel.Parser.Quest
|
|||
public string PrimaryAssetName { get; set; }
|
||||
}
|
||||
|
||||
public partial class PrimaryAssetType
|
||||
public class PrimaryAssetType
|
||||
{
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; }
|
||||
|
|
@ -186,12 +180,12 @@ namespace FModel.Parser.Quest
|
|||
|
||||
public partial class QuestParser
|
||||
{
|
||||
public static QuestParser[] FromJson(string json) => JsonConvert.DeserializeObject<QuestParser[]>(json, FModel.Parser.Quest.Converter.Settings);
|
||||
public static QuestParser[] FromJson(string json) => JsonConvert.DeserializeObject<QuestParser[]>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this QuestParser[] self) => JsonConvert.SerializeObject(self, FModel.Parser.Quest.Converter.Settings);
|
||||
public static string ToJson(this QuestParser[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
|
|
@ -203,7 +197,7 @@ namespace FModel.Parser.Quest
|
|||
Converters =
|
||||
{
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FModel.Parser.RenderMat
|
||||
{
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
public partial class RenderSwitchMaterial
|
||||
{
|
||||
[JsonProperty("export_type")]
|
||||
|
|
@ -28,7 +22,7 @@ namespace FModel.Parser.RenderMat
|
|||
public BasePropertyOverrides BasePropertyOverrides { get; set; }
|
||||
}
|
||||
|
||||
public partial class BasePropertyOverrides
|
||||
public class BasePropertyOverrides
|
||||
{
|
||||
[JsonProperty("BlendMode")]
|
||||
public string BlendMode { get; set; }
|
||||
|
|
@ -40,7 +34,7 @@ namespace FModel.Parser.RenderMat
|
|||
public double OpacityMaskClipValue { get; set; }
|
||||
}
|
||||
|
||||
public partial class ScalarParameterValue
|
||||
public class ScalarParameterValue
|
||||
{
|
||||
[JsonProperty("ParameterInfo")]
|
||||
public ParameterInfo ParameterInfo { get; set; }
|
||||
|
|
@ -52,7 +46,7 @@ namespace FModel.Parser.RenderMat
|
|||
public string ExpressionGuid { get; set; }
|
||||
}
|
||||
|
||||
public partial class ParameterInfo
|
||||
public class ParameterInfo
|
||||
{
|
||||
[JsonProperty("Name")]
|
||||
public string Name { get; set; }
|
||||
|
|
@ -64,7 +58,7 @@ namespace FModel.Parser.RenderMat
|
|||
public long Index { get; set; }
|
||||
}
|
||||
|
||||
public partial class TextureParameterValue
|
||||
public class TextureParameterValue
|
||||
{
|
||||
[JsonProperty("ParameterInfo")]
|
||||
public ParameterInfo ParameterInfo { get; set; }
|
||||
|
|
@ -78,12 +72,12 @@ namespace FModel.Parser.RenderMat
|
|||
|
||||
public partial class RenderSwitchMaterial
|
||||
{
|
||||
public static RenderSwitchMaterial[] FromJson(string json) => JsonConvert.DeserializeObject<RenderSwitchMaterial[]>(json, FModel.Parser.RenderMat.Converter.Settings);
|
||||
public static RenderSwitchMaterial[] FromJson(string json) => JsonConvert.DeserializeObject<RenderSwitchMaterial[]>(json, Converter.Settings);
|
||||
}
|
||||
|
||||
public static class Serialize
|
||||
{
|
||||
public static string ToJson(this RenderSwitchMaterial[] self) => JsonConvert.SerializeObject(self, FModel.Parser.RenderMat.Converter.Settings);
|
||||
public static string ToJson(this RenderSwitchMaterial[] self) => JsonConvert.SerializeObject(self, Converter.Settings);
|
||||
}
|
||||
|
||||
internal static class Converter
|
||||
|
|
@ -95,7 +89,7 @@ namespace FModel.Parser.RenderMat
|
|||
Converters =
|
||||
{
|
||||
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user