Skip to content

Commit

Permalink
cleanup, added drag&drop
Browse files Browse the repository at this point in the history
  • Loading branch information
GoneUp committed Jun 27, 2016
1 parent 01f78bc commit ff295c8
Show file tree
Hide file tree
Showing 44 changed files with 87 additions and 191 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
*.gpk
*.ogg

GPK_RePack/bin/
GPK_RePack/obj/

#################
## Eclipse
#################
Expand Down Expand Up @@ -188,7 +191,6 @@ $RECYCLE.BIN/
# Mac crap
.DS_Store


#############
## Python
#############
Expand Down Expand Up @@ -220,3 +222,4 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
*.log

2 changes: 2 additions & 0 deletions GPK_RePack.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GPK_RePack", "GPK_RePack\GPK_RePack.csproj", "{242D4D28-DE0E-4238-85A4-9B1AE6AD6410}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{A2551F8E-23C9-44DF-BBE3-B3AC95D9E226}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
10 changes: 0 additions & 10 deletions GPK_RePack.sln.DotSettings.user

This file was deleted.

Binary file removed GPK_RePack.v11.suo
Binary file not shown.
2 changes: 0 additions & 2 deletions GPK_RePack/.gitignore

This file was deleted.

22 changes: 13 additions & 9 deletions GPK_RePack/Forms/GUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion GPK_RePack/Forms/GUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,16 @@ private void GUI_FormClosing(object sender, FormClosingEventArgs e)
#region load/save
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
String[] files = MiscFuncs.GenerateOpenDialog();
String[] files;
if (sender is String[])
{
files = (String[]) sender;
}
else
{
files = MiscFuncs.GenerateOpenDialog();
}

if (files.Length == 0) return;

DateTime start = DateTime.Now;
Expand Down Expand Up @@ -327,6 +336,23 @@ private void DisplayStatus(List<IProgress> list, string tag, DateTime start)
lblStatus.Text = "Ready";
}
}

private void treeMain_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
}

private void treeMain_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[]) e.Data.GetData(DataFormats.FileDrop);
foreach (string file in files)
{
logger.Debug("Drop input: " + file);
}

openToolStripMenuItem_Click(files, null);
}

#endregion

#region diplaygpk
Expand Down Expand Up @@ -1349,6 +1375,8 @@ private GpkArrayProperty checkArrayRow()

#endregion






Expand Down
18 changes: 18 additions & 0 deletions GPK_RePack/Forms/GUI.resx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,24 @@ Have Fun &amp; Always Backup
<metadata name="value.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="type.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="size.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="aIndex.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="iType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="value.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
Expand Down
6 changes: 6 additions & 0 deletions GPK_RePack/GPK_RePack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="CSharpImageLibrary, Version=3.1.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\CSharpImageLibrary.3.1.6.0\lib\net45\CSharpImageLibrary.exe</HintPath>
Expand Down Expand Up @@ -148,6 +151,9 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>PublicSettingsSingleFileGenerator</Generator>
Expand Down
14 changes: 0 additions & 14 deletions GPK_RePack/GPK_RePack.csproj.user

This file was deleted.

16 changes: 15 additions & 1 deletion GPK_RePack/IO/Reader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public GpkPackage ReadGpk(string path)
logger = LogManager.GetLogger("[Reader:" + package.Filename + "]");
logger.Info("Reading Start");



using (BinaryReader reader = new BinaryReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
{
package.OrginalSize = reader.BaseStream.Length;
Expand All @@ -46,6 +48,8 @@ public GpkPackage ReadGpk(string path)
ReadExports(reader, package);
ReadExportData(reader, package);

logger.Info(String.Format("Remaining {0}b", reader.BaseStream.Length - reader.BaseStream.Position));

reader.Close();
reader.Dispose();
}
Expand Down Expand Up @@ -263,7 +267,8 @@ private void ReadExportData(BinaryReader reader, GpkPackage package)
{
logger.Debug("Reading ExportsData....");


long maxValue = 0;
GpkExport maxExp = null;
foreach (GpkExport export in package.ExportList.Values)
{
try
Expand Down Expand Up @@ -348,6 +353,12 @@ private void ReadExportData(BinaryReader reader, GpkPackage package)
logger.Debug(String.Format("totalRead {0} GetDataSize {1} shouldBe {2}", totalRead, oursize, shouldBe));
}

if (reader.BaseStream.Position > maxValue)
{
maxValue = reader.BaseStream.Position;
maxExp = export;
}

}
catch (Exception ex)
{
Expand All @@ -356,6 +367,9 @@ private void ReadExportData(BinaryReader reader, GpkPackage package)
//data
stat.progress++;
}

logger.Debug("MAX VALUE " + maxValue);
logger.Debug("MAX EXPORT " + maxExp.ObjectName);
}

public static void ParsePayload(GpkPackage package, GpkExport export)
Expand Down
6 changes: 0 additions & 6 deletions GPK_RePack/bin/Debug/GPK_RePack.exe.config

This file was deleted.

6 changes: 0 additions & 6 deletions GPK_RePack/bin/Debug/GPK_RePack.vshost.exe.config

This file was deleted.

11 changes: 0 additions & 11 deletions GPK_RePack/bin/Debug/GPK_RePack.vshost.exe.manifest

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file removed GPK_RePack/obj/Debug/GPK_RePack.Forms.Options.resources
Binary file not shown.
Binary file not shown.
11 changes: 0 additions & 11 deletions GPK_RePack/obj/Debug/GPK_RePack.csproj.FileListAbsolute.txt

This file was deleted.

Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Empty file.
Binary file removed GPK_RePack/obj/Debug/Terahelper.exe
Binary file not shown.
Binary file removed GPK_RePack/obj/Debug/Terahelper.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 0 additions & 9 deletions GPK_RePack/obj/Release/GPK_RePack.csproj.FileListAbsolute.txt

This file was deleted.

Binary file not shown.
Empty file.
Empty file.
Empty file.
Binary file removed GPK_RePack/obj/Release/Terahelper.exe
Binary file not shown.
Binary file removed GPK_RePack/obj/Release/Terahelper.pdb
Binary file not shown.
Binary file removed build/PCFemale_Voice03.gpk
Binary file not shown.
Binary file removed build/PCFemale_Voice03_JP.gpk
Binary file not shown.
Binary file removed build/Terahelper.exe
Binary file not shown.
54 changes: 0 additions & 54 deletions build/Terahelper.exe.config

This file was deleted.

2 changes: 0 additions & 2 deletions build/Terahelper.log

This file was deleted.

Binary file removed build/Terahelper.pdb
Binary file not shown.
Binary file removed build/Terahelper.vshost.exe
Binary file not shown.
Loading

0 comments on commit ff295c8

Please sign in to comment.