This commit is contained in:
SilicaAndPina 2019-12-14 07:25:26 +13:00
parent 3e39e1e046
commit ae0bd69649
47 changed files with 123945 additions and 0 deletions

22
RMDEC.sln Normal file
View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.76
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RMDEC", "RMDEC\RMDEC.csproj", "{7B117F20-7B29-4D3F-9B60-4ABFE884DB23}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7B117F20-7B29-4D3F-9B60-4ABFE884DB23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B117F20-7B29-4D3F-9B60-4ABFE884DB23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B117F20-7B29-4D3F-9B60-4ABFE884DB23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B117F20-7B29-4D3F-9B60-4ABFE884DB23}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

6
RMDEC/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

185
RMDEC/MVProject.cs Normal file
View File

@ -0,0 +1,185 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RMDEC
{
public class MVProject
{
public MVProject() { }
//Private internal variables
private byte[] encryptionKey = new byte[0x10];
private bool encryptedImages = false;
private bool encryptedAudio = false;
private string gameTitle;
private string filePath;
//Public readable variables
public Boolean IsEncrypted
{
get
{
if (EncryptedAudio == true || EncryptedImages == true)
{
return true;
}
else
{
return false;
}
}
}
public Byte[] EncryptionKey
{
get
{
return encryptionKey;
}
}
public String GameTitle
{
get
{
return gameTitle;
}
}
public Boolean EncryptedImages
{
get
{
return encryptedImages;
}
}
public Boolean EncryptedAudio
{
get
{
return encryptedAudio;
}
}
public String FilePath
{
get
{
return filePath;
}
}
//Private functions
private static byte[] hexStr2Bytes(String HexStr)
{
if (HexStr.Length % 2 != 0)
{
throw new InvalidDataException(HexStr + " Is not divisible by 2!");
}
List<byte> byteList = new List<byte>();
for (int i = 0; i < HexStr.Length; i += 2)
{
string curHex = HexStr.Substring(i, 2);
byte hexByte = Byte.Parse(curHex, NumberStyles.HexNumber);
byteList.Add(hexByte);
}
byte[] resultingByteArray = byteList.ToArray();
return resultingByteArray;
}
private static byte[] xor(byte[] input, byte[] key)
{
long inpLen = input.LongLength;
byte[] output = new byte[inpLen];
for(long i = 0; i < input.LongLength; i++)
{
output[i] = (byte)(input[i] ^ key[i % key.LongLength]);
}
return output;
}
//Public functions
public static MVProject ParseSystemJson(string path)
{
if (File.Exists(path))
{
string jsonStr = File.ReadAllText(path, Encoding.UTF8);
dynamic systemJson = JObject.Parse(jsonStr);
//Check if valid system.json
MVProject mvp = new MVProject();
if (systemJson.gameTitle != null)
{
mvp.gameTitle = systemJson.gameTitle;
}
else
{
throw new InvalidDataException("Not a valid system.json!");
}
if (systemJson.hasEncryptedAudio != null)
{
mvp.encryptedAudio = systemJson.hasEncryptedAudio;
}
if (systemJson.hasEncryptedImages != null)
{
mvp.encryptedImages = systemJson.hasEncryptedImages;
}
if (systemJson.encryptionKey != null)
{
string encKey = systemJson.encryptionKey;
mvp.encryptionKey = hexStr2Bytes(encKey);
}
mvp.filePath = Path.GetDirectoryName(Path.GetDirectoryName(path));
return mvp;
}
else
{
throw new FileNotFoundException(path + " was not found!");
}
}
public void DecryptFile(Stream inStream, Stream outStream)
{
inStream.Seek(0x00, SeekOrigin.Begin);
byte[] magic = new byte[0x05];
inStream.Read(magic, 0x00,0x05);
string magicStr = Encoding.UTF8.GetString(magic);
if(magicStr != "RPGMV")
{
throw new InvalidDataException("Not an encrypted file!");
}
inStream.Seek(0x10, SeekOrigin.Begin);
byte[] encryptedHeader = new byte[0x10];
inStream.Read(encryptedHeader, 0x00, 0x10);
byte[] plaintextHeader = xor(encryptedHeader, encryptionKey);
outStream.Write(plaintextHeader, 0x00, plaintextHeader.Length);
inStream.CopyTo(outStream);
}
}
}

226
RMDEC/MVProjectToolset.Designer.cs generated Normal file
View File

@ -0,0 +1,226 @@
namespace RMDEC
{
partial class MVProjectToolset
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.encryptedFileList = new System.Windows.Forms.ListBox();
this.decryptSelected = new System.Windows.Forms.Button();
this.decryptedFileList = new System.Windows.Forms.ListBox();
this.encryptSelected = new System.Windows.Forms.Button();
this.processingBar = new System.Windows.Forms.ProgressBar();
this.processingText = new System.Windows.Forms.Label();
this.makeMV = new System.Windows.Forms.Button();
this.unmakeMV = new System.Windows.Forms.Button();
this.layout1 = new System.Windows.Forms.TableLayoutPanel();
this.layout2 = new System.Windows.Forms.TableLayoutPanel();
this.layout1.SuspendLayout();
this.layout2.SuspendLayout();
this.SuspendLayout();
//
// encryptedFileList
//
this.encryptedFileList.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.encryptedFileList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.encryptedFileList.Dock = System.Windows.Forms.DockStyle.Fill;
this.encryptedFileList.FormattingEnabled = true;
this.encryptedFileList.HorizontalScrollbar = true;
this.encryptedFileList.Location = new System.Drawing.Point(3, 3);
this.encryptedFileList.Name = "encryptedFileList";
this.layout1.SetRowSpan(this.encryptedFileList, 4);
this.encryptedFileList.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.encryptedFileList.Size = new System.Drawing.Size(266, 327);
this.encryptedFileList.TabIndex = 3;
//
// decryptSelected
//
this.decryptSelected.Anchor = System.Windows.Forms.AnchorStyles.None;
this.decryptSelected.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.decryptSelected.Enabled = false;
this.decryptSelected.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.decryptSelected.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.decryptSelected.Location = new System.Drawing.Point(310, 106);
this.decryptSelected.Name = "decryptSelected";
this.decryptSelected.Size = new System.Drawing.Size(48, 48);
this.decryptSelected.TabIndex = 4;
this.decryptSelected.Text = "-->";
this.decryptSelected.UseVisualStyleBackColor = false;
this.decryptSelected.Click += new System.EventHandler(this.decryptSelected_Click);
//
// decryptedFileList
//
this.decryptedFileList.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.decryptedFileList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.decryptedFileList.Dock = System.Windows.Forms.DockStyle.Fill;
this.decryptedFileList.FormattingEnabled = true;
this.decryptedFileList.HorizontalScrollbar = true;
this.decryptedFileList.Location = new System.Drawing.Point(400, 3);
this.decryptedFileList.Name = "decryptedFileList";
this.layout1.SetRowSpan(this.decryptedFileList, 4);
this.decryptedFileList.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.decryptedFileList.Size = new System.Drawing.Size(269, 327);
this.decryptedFileList.TabIndex = 5;
//
// encryptSelected
//
this.encryptSelected.Anchor = System.Windows.Forms.AnchorStyles.None;
this.encryptSelected.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.encryptSelected.Enabled = false;
this.encryptSelected.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.encryptSelected.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.encryptSelected.Location = new System.Drawing.Point(310, 193);
this.encryptSelected.Name = "encryptSelected";
this.encryptSelected.Size = new System.Drawing.Size(48, 48);
this.encryptSelected.TabIndex = 6;
this.encryptSelected.Text = "<--";
this.encryptSelected.UseVisualStyleBackColor = false;
this.encryptSelected.Click += new System.EventHandler(this.encryptSelected_Click);
//
// processingBar
//
this.processingBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.processingBar.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.processingBar.Location = new System.Drawing.Point(154, 385);
this.processingBar.Name = "processingBar";
this.processingBar.Size = new System.Drawing.Size(530, 22);
this.processingBar.TabIndex = 7;
//
// processingText
//
this.processingText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.processingText.BackColor = System.Drawing.Color.Red;
this.processingText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.processingText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.processingText.Location = new System.Drawing.Point(12, 385);
this.processingText.Name = "processingText";
this.processingText.Size = new System.Drawing.Size(136, 22);
this.processingText.TabIndex = 8;
this.processingText.Text = "Waiting";
this.processingText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// makeMV
//
this.makeMV.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.makeMV.Dock = System.Windows.Forms.DockStyle.Fill;
this.makeMV.Enabled = false;
this.makeMV.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.makeMV.Location = new System.Drawing.Point(3, 3);
this.makeMV.Name = "makeMV";
this.makeMV.Size = new System.Drawing.Size(331, 24);
this.makeMV.TabIndex = 9;
this.makeMV.Text = "Make MV Project";
this.makeMV.UseVisualStyleBackColor = false;
//
// unmakeMV
//
this.unmakeMV.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.unmakeMV.Dock = System.Windows.Forms.DockStyle.Fill;
this.unmakeMV.Enabled = false;
this.unmakeMV.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.unmakeMV.ForeColor = System.Drawing.SystemColors.InactiveCaptionText;
this.unmakeMV.Location = new System.Drawing.Point(340, 3);
this.unmakeMV.Name = "unmakeMV";
this.unmakeMV.Size = new System.Drawing.Size(332, 24);
this.unmakeMV.TabIndex = 10;
this.unmakeMV.Text = "Unmake MV Project";
this.unmakeMV.UseVisualStyleBackColor = false;
//
// layout1
//
this.layout1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.layout1.ColumnCount = 5;
this.layout1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 44.17065F));
this.layout1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 5.829354F));
this.layout1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 55F));
this.layout1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 5.829354F));
this.layout1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 44.17064F));
this.layout1.Controls.Add(this.encryptSelected, 2, 2);
this.layout1.Controls.Add(this.encryptedFileList, 0, 0);
this.layout1.Controls.Add(this.decryptedFileList, 4, 0);
this.layout1.Controls.Add(this.decryptSelected, 2, 1);
this.layout1.Location = new System.Drawing.Point(15, 12);
this.layout1.Name = "layout1";
this.layout1.RowCount = 4;
this.layout1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.layout1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.layout1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.layout1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.layout1.Size = new System.Drawing.Size(672, 333);
this.layout1.TabIndex = 7;
//
// layout2
//
this.layout2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.layout2.ColumnCount = 2;
this.layout2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.layout2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.layout2.Controls.Add(this.unmakeMV, 1, 0);
this.layout2.Controls.Add(this.makeMV, 0, 0);
this.layout2.Location = new System.Drawing.Point(12, 350);
this.layout2.Name = "layout2";
this.layout2.RowCount = 1;
this.layout2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.layout2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.layout2.Size = new System.Drawing.Size(675, 30);
this.layout2.TabIndex = 11;
//
// MVProjectToolset
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.ClientSize = new System.Drawing.Size(699, 412);
this.Controls.Add(this.processingText);
this.Controls.Add(this.processingBar);
this.Controls.Add(this.layout1);
this.Controls.Add(this.layout2);
this.Name = "MVProjectToolset";
this.Text = "RMDec - RPG Maker MV";
this.Load += new System.EventHandler(this.MVProjectToolset_Load);
this.layout1.ResumeLayout(false);
this.layout2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListBox encryptedFileList;
private System.Windows.Forms.Button decryptSelected;
private System.Windows.Forms.ListBox decryptedFileList;
private System.Windows.Forms.Button encryptSelected;
private System.Windows.Forms.ProgressBar processingBar;
private System.Windows.Forms.Label processingText;
private System.Windows.Forms.Button makeMV;
private System.Windows.Forms.Button unmakeMV;
private System.Windows.Forms.TableLayoutPanel layout1;
private System.Windows.Forms.TableLayoutPanel layout2;
}
}

318
RMDEC/MVProjectToolset.cs Normal file
View File

@ -0,0 +1,318 @@
using System;
using System.Collections;
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;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.ListBox;
namespace RMDEC
{
public partial class MVProjectToolset : Form
{
public MVProject mvProject;
public MVProjectToolset(MVProject proj)
{
mvProject = proj;
InitializeComponent();
}
private List<string> encFileList = new List<string>();
private List<string> decFileList = new List<string>();
private bool encryptedIndexingComplete = false;
private bool unencryptedIndexingComplete = false;
private void onIndexThreadComplete()
{
if(encryptedIndexingComplete && unencryptedIndexingComplete)
{
processingText.Text = "Waiting";
processingText.BackColor = Color.Red;
decryptSelected.Enabled = true;
encryptSelected.Enabled = true;
makeMV.Enabled = true;
unmakeMV.Enabled = true;
processingBar.Style = ProgressBarStyle.Continuous;
this.Cursor = Cursors.Arrow;
}
}
private void indexFiles()
{
processingText.Text = "Indexing";
processingText.BackColor = Color.Yellow;
processingBar.Style = ProgressBarStyle.Marquee;
this.Cursor = Cursors.WaitCursor;
//Index Encrypted Files
Thread indexEncryptedFilesThread = new Thread(() =>
{
List<string> pngList = new List<string>();
List<string> oggList = new List<string>();
List<string> M4AList = new List<string>();
foreach (string file in Directory.EnumerateFiles(mvProject.FilePath, "*", SearchOption.AllDirectories))
{
string fileExtension = Path.GetExtension(file);
switch (fileExtension)
{
case ".rpgmvp":
pngList.Add(file);
break;
case ".rpgmvo":
oggList.Add(file);
break;
case ".rpgmvm":
M4AList.Add(file);
break;
}
}
//add PNG
foreach (string png in pngList)
{
string relativeName = png.Remove(0, mvProject.FilePath.Length+1);
Invoke((Action)delegate
{
encryptedFileList.Items.Add("[PNG] " + relativeName);
});
encFileList.Add(png);
}
//add OGG
foreach (string ogg in oggList)
{
string relativeName = ogg.Remove(0, mvProject.FilePath.Length+1);
Invoke((Action)delegate
{
encryptedFileList.Items.Add("[OGG] " + relativeName);
});
encFileList.Add(ogg);
}
//add M4A
foreach (string M4A in M4AList)
{
string relativeName = M4A.Remove(0, mvProject.FilePath.Length+1);
Invoke((Action)delegate
{
encryptedFileList.Items.Add("[M4A] " + relativeName);
});
encFileList.Add(M4A);
}
Invoke((Action)delegate
{
encryptedIndexingComplete = true;
onIndexThreadComplete();
});
});
indexEncryptedFilesThread.Start();
//Index Unencrypted Files
Thread indexUnencryptedFilesThread = new Thread(() =>
{
List<string> pngList = new List<string>();
List<string> oggList = new List<string>();
List<string> M4AList = new List<string>();
foreach (string file in Directory.EnumerateFiles(mvProject.FilePath, "*", SearchOption.AllDirectories))
{
string fileExtension = Path.GetExtension(file);
switch (fileExtension)
{
case ".png":
pngList.Add(file);
break;
case ".ogg":
oggList.Add(file);
break;
case ".M4A":
M4AList.Add(file);
break;
}
}
//add PNG
foreach (string png in pngList)
{
string relativeName = png.Remove(0, mvProject.FilePath.Length+1);
Invoke((Action)delegate
{
decryptedFileList.Items.Add("[PNG] " + relativeName);
});
decFileList.Add(png);
}
//add OGG
foreach (string ogg in oggList)
{
string relativeName = ogg.Remove(0, mvProject.FilePath.Length+1);
Invoke((Action)delegate
{
decryptedFileList.Items.Add("[OGG] " + relativeName);
});
decFileList.Add(ogg);
}
//add M4A
foreach (string M4A in M4AList)
{
string relativeName = M4A.Remove(0, mvProject.FilePath.Length+1);
Invoke((Action)delegate
{
decryptedFileList.Items.Add("[M4A] " + relativeName);
});
decFileList.Add(M4A);
}
Invoke((Action)delegate
{
unencryptedIndexingComplete = true;
onIndexThreadComplete();
});
});
indexUnencryptedFilesThread.Start();
}
private void MVProjectToolset_Load(object sender, EventArgs e)
{
this.Text = "RMDec - RPG Maker MV - " + mvProject.GameTitle + " - " + mvProject.FilePath;
indexFiles();
}
private void encryptSelected_Click(object sender, EventArgs e)
{
}
private void decryptSelected_Click(object sender, EventArgs e)
{
SelectedIndexCollection itemList = encryptedFileList.SelectedIndices;
int itemCount = itemList.Count;
if (itemCount < 1)
{
return;
}
int[] selectedIndexes = new int[itemCount];
int item = 0;
itemList.CopyTo(selectedIndexes, 0);
processingBar.Style = ProgressBarStyle.Continuous;
processingBar.Maximum = itemCount;
processingText.BackColor = Color.Yellow;
encryptSelected.Enabled = false;
decryptSelected.Enabled = false;
Thread decryptFilesThread = new Thread(() =>
{
int i = 1;
int total = itemCount;
do
{
Invoke((Action)delegate
{
itemCount = itemList.Count;
item = itemList[0];
processingText.Text = "Decrypting " + i.ToString() + "/" + total.ToString();
});
string encryptedFile = encFileList[item];
string extension = Path.GetExtension(encryptedFile);
string newExtension = "";
switch (extension)
{
case ".rpgmvp":
newExtension = ".png";
break;
case ".rpgmvo":
newExtension = "ogg";
break;
case ".rpgmvm":
newExtension = ".m4a";
break;
}
string decryptedFile = Path.ChangeExtension(encryptedFile, newExtension);
FileStream Encrypted = File.OpenRead(encryptedFile);
FileStream Decrypted = File.OpenWrite(decryptedFile);
mvProject.DecryptFile(Encrypted, Decrypted);
Encrypted.Close();
Decrypted.Close();
File.Delete(encryptedFile);
Invoke((Action)delegate
{
string entry = encryptedFileList.Items[item].ToString();
string decryptedEntry = Path.ChangeExtension(entry, newExtension);
decryptedFileList.Items.Add(decryptedEntry);
decFileList.Add(decryptedFile);
encryptedFileList.Items.Remove(entry);
encFileList.RemoveAt(item);
processingBar.Value = i;
});
i++;
} while (itemCount > 1);
Invoke((Action)delegate
{
encryptSelected.Enabled = true;
decryptSelected.Enabled = true;
processingText.BackColor = Color.Green;
processingText.Text = "Decrypted " + total.ToString() + " files!";
});
});
decryptFilesThread.Start();
}
}
}

120
RMDEC/MVProjectToolset.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

22
RMDEC/Program.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RMDEC
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new projectSelector());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RMDEC")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RMDEC")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7b117f20-7b29-4d3f-9b60-4abfe884db23")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

71
RMDEC/Properties/Resources.Designer.cs generated Normal file
View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RMDEC.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RMDEC.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

30
RMDEC/Properties/Settings.Designer.cs generated Normal file
View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RMDEC.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

102
RMDEC/RMDEC.csproj Normal file
View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7B117F20-7B29-4D3F-9B60-4ABFE884DB23}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>RMDEC</RootNamespace>
<AssemblyName>RMDEC</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MVProject.cs" />
<Compile Include="MVProjectToolset.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MVProjectToolset.Designer.cs">
<DependentUpon>MVProjectToolset.cs</DependentUpon>
</Compile>
<Compile Include="projectSelector.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="projectSelector.Designer.cs">
<DependentUpon>projectSelector.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MVProjectToolset.resx">
<DependentUpon>MVProjectToolset.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="projectSelector.resx">
<DependentUpon>projectSelector.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

6
RMDEC/packages.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net452" />
<package id="WindowsAPICodePack-Core" version="1.1.2" targetFramework="net452" />
<package id="WindowsAPICodePack-Shell" version="1.1.1" targetFramework="net452" />
</packages>

130
RMDEC/projectSelector.Designer.cs generated Normal file
View File

@ -0,0 +1,130 @@
namespace RMDEC
{
partial class projectSelector
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.projectList = new System.Windows.Forms.ListBox();
this.label1 = new System.Windows.Forms.Label();
this.projectDir = new System.Windows.Forms.TextBox();
this.browseButton = new System.Windows.Forms.Button();
this.selectButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// projectList
//
this.projectList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.projectList.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.projectList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.projectList.FormattingEnabled = true;
this.projectList.Location = new System.Drawing.Point(12, 34);
this.projectList.Name = "projectList";
this.projectList.Size = new System.Drawing.Size(487, 262);
this.projectList.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.label1.Location = new System.Drawing.Point(9, 11);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Project Directory:";
//
// projectDir
//
this.projectDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.projectDir.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.projectDir.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.projectDir.ForeColor = System.Drawing.SystemColors.InactiveCaptionText;
this.projectDir.Location = new System.Drawing.Point(98, 8);
this.projectDir.Name = "projectDir";
this.projectDir.Size = new System.Drawing.Size(314, 20);
this.projectDir.TabIndex = 2;
this.projectDir.TextChanged += new System.EventHandler(this.projectDir_TextChanged);
//
// browseButton
//
this.browseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.browseButton.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.browseButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.browseButton.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.browseButton.Location = new System.Drawing.Point(418, 8);
this.browseButton.Name = "browseButton";
this.browseButton.Size = new System.Drawing.Size(81, 20);
this.browseButton.TabIndex = 3;
this.browseButton.Text = "Browse";
this.browseButton.UseVisualStyleBackColor = false;
this.browseButton.Click += new System.EventHandler(this.browseButton_Click);
//
// selectButton
//
this.selectButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.selectButton.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.selectButton.Enabled = false;
this.selectButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.selectButton.Location = new System.Drawing.Point(12, 302);
this.selectButton.Name = "selectButton";
this.selectButton.Size = new System.Drawing.Size(487, 23);
this.selectButton.TabIndex = 4;
this.selectButton.Text = "Select RPG Maker Project";
this.selectButton.UseVisualStyleBackColor = false;
this.selectButton.Click += new System.EventHandler(this.selectButton_Click);
//
// projectSelector
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.ClientSize = new System.Drawing.Size(511, 332);
this.Controls.Add(this.projectList);
this.Controls.Add(this.selectButton);
this.Controls.Add(this.browseButton);
this.Controls.Add(this.projectDir);
this.Controls.Add(this.label1);
this.Name = "projectSelector";
this.Text = "RMDec - Project Selection";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListBox projectList;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox projectDir;
private System.Windows.Forms.Button browseButton;
private System.Windows.Forms.Button selectButton;
}
}

106
RMDEC/projectSelector.cs Normal file
View File

@ -0,0 +1,106 @@
using Microsoft.WindowsAPICodePack.Dialogs;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Windows.Forms;
namespace RMDEC
{
public partial class projectSelector : Form
{
private List<MVProject> mvProjectList = new List<MVProject>();
public projectSelector()
{
InitializeComponent();
}
private void onIndexingComplete()
{
selectButton.Enabled = true;
this.Cursor = Cursors.Arrow;
}
private void tryAddProject(string projectFile)
{
string relativeName = projectFile.Remove(0,projectDir.Text.Length + 1);
//Try MV
try
{
MVProject proj = MVProject.ParseSystemJson(projectFile);
mvProjectList.Add(proj);
projectList.Items.Add("[RMMV] - "+ proj.GameTitle + " - " + relativeName);
}
finally { }
}
private void updateProjectList(string projectDir)
{
if (Directory.Exists(projectDir))
{
this.Cursor = Cursors.WaitCursor;
Thread indexProjects = new Thread(() =>
{
IEnumerable fileList = Directory.EnumerateFiles(projectDir, "*", SearchOption.AllDirectories);
foreach (string fileEntry in fileList)
{
if (Path.GetFileName(fileEntry) == "System.json")
{
Invoke((Action)delegate
{
tryAddProject(fileEntry);
});
}
}
Invoke((Action)delegate
{
onIndexingComplete();
});
});
indexProjects.Start();
}
}
private void clearProjectList()
{
mvProjectList.Clear();
projectList.Items.Clear();
selectButton.Enabled = false;
}
private void projectDir_TextChanged(object sender, EventArgs e)
{
clearProjectList();
string newDir = projectDir.Text;
updateProjectList(newDir);
}
private void browseButton_Click(object sender, EventArgs e)
{
CommonOpenFileDialog folderDialog = new CommonOpenFileDialog();
folderDialog.IsFolderPicker = true;
if (folderDialog.ShowDialog() == CommonFileDialogResult.Ok)
{
projectDir.Text = folderDialog.FileName;
}
}
private void selectButton_Click(object sender, EventArgs e)
{
int index = projectList.SelectedIndex;
if(index >= 0)
{
MVProjectToolset mvProjectToolset = new MVProjectToolset(mvProjectList[index]);
mvProjectToolset.ShowDialog();
}
}
}
}

120
RMDEC/projectSelector.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Binary file not shown.

View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2007 James Newton-King
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff