diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f35aca9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,246 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+.DS_Store
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+[Xx]64/
+[Xx]86/
+[Bb]uild/
+bld/
+[Bb]in/
+[Oo]bj/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+
+# TODO: Un-comment the next line if you do not want to checkin
+# your web deploy settings because they may include unencrypted
+# passwords
+#*.pubxml
+*.publishproj
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Microsoft Azure ApplicationInsights config file
+ApplicationInsights.config
+
+# Windows Store app package directory
+AppPackages/
+BundleArtifacts/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# LightSwitch generated files
+GeneratedArtifacts/
+ModelManifest.xml
+
+# Paket dependency manager
+.paket/paket.exe
+
+# FAKE - F# Make
+.fake/
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a612ad9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,373 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..98d31d7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,25 @@
+# Sins Data Converter
+Sins Data Converter is a modding tool for the classic PC strategy game Sins of Solar Empire. It provides an easy-to-use, comprehensive GUI for the ConvertData command line utility provided by game developer Ironclad Games. Use of ConvertData is required to translate game files from the machine-readable binary format into an human-readable raw text format for modding. Sins Data Converter boasts a full set of impressive features that take advantage of ConvertData's flexibility to offer modders a large selection of options, none of which require any knowledge of or proficiency with the command line.
+
+This utility was abandoned in 2013 amid an ambitious code rewrite project that seemed to attract very little interest from the community. It's now being resurrected as an open-source project so that it has a better chance at usefulness, improvement, and continued maintenance moving forward. The initial GitHub version of the project throws out the abandoned rewrite and returns to the last released version, the v2.1 Beta that added basic support for the Rebellion expansion. That means, among other things, that the code is absolutely awful. But it seems to still work despite changes to SoaSE and Windows itself over the years.
+
+## Features
+- Basic Mode for conversion of individual files and folders
+- Drag-and-drop file support
+- Support for in-place conversions
+- Support for external output locations
+- Automatic ConvertData support for any non-Steam installed version of Sins
+- Ability to select custom ConvertData executable
+- Include/exclude specific subfolders at will
+- Quickly switch between BIN-to-TXT and TXT-to-BIN modes
+- Advanced Mode for conversion of multiple files and folders
+- Set modes, outputs, and ConvertData's on a per-file basis
+- Manage files and folders with the Conversion Queue
+- Create ReferenceData from any installed version of Sins
+- Change the location of the Sins mod folder
+- Easily create entity.manifest files for your mod
+
+## System Requirements
+- Windows XP or newer
+- .NET Framework 3.5
+- Sins of a Solar Empire OR a ConvertData*.exe
diff --git a/SinsDataConverter.sln b/SinsDataConverter.sln
new file mode 100644
index 0000000..242db8b
--- /dev/null
+++ b/SinsDataConverter.sln
@@ -0,0 +1,61 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25123.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SinsDataConverter", "SinsDataConverter\SinsDataConverter.vbproj", "{F2E67D99-C41B-4E11-82B3-38F162C242F6}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ CD_ROM|Any CPU = CD_ROM|Any CPU
+ CD_ROM|x64 = CD_ROM|x64
+ CD_ROM|x86 = CD_ROM|x86
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ DVD-5|Any CPU = DVD-5|Any CPU
+ DVD-5|x64 = DVD-5|x64
+ DVD-5|x86 = DVD-5|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ SingleImage|Any CPU = SingleImage|Any CPU
+ SingleImage|x64 = SingleImage|x64
+ SingleImage|x86 = SingleImage|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.CD_ROM|Any CPU.Build.0 = Release|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.CD_ROM|x64.ActiveCfg = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.CD_ROM|x64.Build.0 = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.CD_ROM|x86.ActiveCfg = Release|x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.CD_ROM|x86.Build.0 = Release|x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Debug|x64.ActiveCfg = Debug|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Debug|x64.Build.0 = Debug|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Debug|x86.ActiveCfg = Debug|x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Debug|x86.Build.0 = Debug|x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.DVD-5|x64.ActiveCfg = Debug|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.DVD-5|x64.Build.0 = Debug|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.DVD-5|x86.ActiveCfg = Debug|x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.DVD-5|x86.Build.0 = Debug|x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Release|x64.ActiveCfg = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Release|x64.Build.0 = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Release|x86.ActiveCfg = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.Release|x86.Build.0 = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.SingleImage|Any CPU.Build.0 = Release|Any CPU
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.SingleImage|x64.ActiveCfg = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.SingleImage|x64.Build.0 = Release|x64
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.SingleImage|x86.ActiveCfg = Release|x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}.SingleImage|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/SinsDataConverter/AdvancedWindow.xaml b/SinsDataConverter/AdvancedWindow.xaml
new file mode 100644
index 0000000..9e2a24b
--- /dev/null
+++ b/SinsDataConverter/AdvancedWindow.xaml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SinsDataConverter/AdvancedWindow.xaml.vb b/SinsDataConverter/AdvancedWindow.xaml.vb
new file mode 100644
index 0000000..b631a7c
--- /dev/null
+++ b/SinsDataConverter/AdvancedWindow.xaml.vb
@@ -0,0 +1,796 @@
+Public Class AdvancedWindow
+
+ Dim RegPath As Microsoft.Win32.RegistryKey
+ Dim SinsDir As String
+ Dim HasCustomEXE As Boolean = False
+ Dim CustomEXEPath As String
+ Dim SubfolderIndex As New System.Collections.ObjectModel.Collection(Of String)
+ Dim Direction As New System.Collections.ObjectModel.Collection(Of String)
+ Dim Version As New System.Collections.ObjectModel.Collection(Of String)
+ Dim Output As New System.Collections.ObjectModel.Collection(Of String)
+ Dim Validate As New System.Collections.ObjectModel.Collection(Of Boolean)
+ Dim FileType As New System.Collections.ObjectModel.Collection(Of String)
+ Dim ConfirmedSettings As Integer = 0
+ Dim RegSins As Microsoft.Win32.RegistryKey
+ Dim RegEntrench As Microsoft.Win32.RegistryKey
+ Dim RegDiplo As Microsoft.Win32.RegistryKey
+ Dim RegTrinity As Microsoft.Win32.RegistryKey
+ Dim RegRebel As Microsoft.Win32.RegistryKey
+ Dim PathToMods As String
+ Dim ModFolder As String
+ Dim NewPathToMods As String
+ Dim AppData As String = My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData
+ Dim ClearQueueWhenDone As Boolean = False
+
+ Delegate Sub cleanupthreaddataDelegate()
+
+ Private Sub SetCustomGamePath()
+ Dim ValidPath As Boolean = False
+ Do Until ValidPath = True
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ folders.Description = "Select your custom game path"
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ ValidPath = CheckForGames(True, folders.SelectedPath, My.Computer.FileSystem.GetDirectories(folders.SelectedPath, FileIO.SearchOption.SearchTopLevelOnly),
+ My.Computer.FileSystem.GetFiles(folders.SelectedPath, FileIO.SearchOption.SearchTopLevelOnly))
+ End If
+ If ValidPath = False Then
+ If MsgBox("No valid path selected! Try again?", MsgBoxStyle.YesNo, "Error") = MsgBoxResult.No Then
+ Exit Do
+ End If
+ Else
+ MsgBox("Custom game path set successfully!", MsgBoxStyle.OkOnly, "Success")
+ My.Settings.SavedInstall = folders.SelectedPath
+ End If
+ Loop
+ End Sub
+
+ Private Sub AdvancedWindow_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
+ If IntPtr.Size = 8 Then
+ RegSins = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sins", False)
+ RegEntrench = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinsentrench", False)
+ RegDiplo = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinsdiplo", False)
+ RegTrinity = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinstrinity", False)
+ RegRebel = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinsrebellion", False)
+ Else
+ RegSins = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sins", False)
+ RegEntrench = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinsentrench", False)
+ RegDiplo = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinsdiplo", False)
+ RegTrinity = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinstrinity", False)
+ RegRebel = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinsrebellion", False)
+ End If
+ If (My.Settings.SavedInstall Is Nothing Or My.Settings.SavedInstall = "") And CheckForGames() = False Then
+ If MsgBox("Sins is not properly installed on your computer. Would you like to set a custom default path for the game?", MsgBoxStyle.YesNo, "Attention") = MsgBoxResult.Yes Then
+ SetCustomGamePath()
+ End If
+ End If
+ End Sub
+
+ Private Function CheckForGames(Optional ByVal Custom As Boolean = False, Optional ByVal CustomPath As String = "",
+ Optional ByVal FoldersInPath As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = Nothing,
+ Optional ByVal FilesInPath As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = Nothing) As Boolean
+ Dim HasGame As Boolean = True
+ If Custom = False Then
+ Try
+ SinsDir = RegRebel.GetValue("Path") + "\"
+ Catch NoRebellion As NullReferenceException
+ DisableRebellionOptions()
+ Try
+ SinsDir = RegTrinity.GetValue("Path") + "\"
+ Catch NoTrinity As NullReferenceException
+ Try
+ SinsDir = RegDiplo.GetValue("Path") + "\"
+ Catch NoDiplomacy As NullReferenceException
+ DisableDiplomacyOptions()
+ Try
+ SinsDir = RegEntrench.GetValue("Path") + "\"
+ Catch NoEntrenchment As NullReferenceException
+ DisableEntrenchmentOptions()
+ Try
+ SinsDir = RegSins.GetValue("Path") + "\"
+ Catch NoSins As NullReferenceException
+ DisableSinsOptions()
+ DisableAllOptions()
+ HasGame = False
+ End Try
+ End Try
+ End Try
+ End Try
+ End Try
+ If btnRebellion.IsEnabled Then
+ DisableDiplomacyOptions()
+ DisableEntrenchmentOptions()
+ DisableSinsOptions()
+ End If
+ Else
+ If Not CustomPath.Contains("Rebellion") Then
+ DisableRebellionOptions()
+ If Not FoldersInPath.Contains("Diplomacy") Then
+ DisableDiplomacyOptions()
+ If Not FoldersInPath.Contains("Entrenchment") Then
+ DisableEntrenchmentOptions()
+ If Not FilesInPath.Contains(CustomPath + "\Sins of a Solar Empire.exe") Then
+ DisableSinsOptions()
+ DisableAllOptions()
+ HasGame = False
+ End If
+ End If
+ End If
+ Else
+ DisableDiplomacyOptions()
+ DisableEntrenchmentOptions()
+ DisableSinsOptions()
+ End If
+ End If
+ Return HasGame
+ End Function
+
+ Private Sub DisableRebellionOptions(Optional ByVal Enabled As Boolean = False)
+ btnRebellion.IsEnabled = Enabled
+ btnRDRebel.IsEnabled = Enabled
+ btnEMRebel.IsEnabled = Enabled
+ End Sub
+
+ Private Sub DisableDiplomacyOptions(Optional ByVal Enabled As Boolean = False)
+ btnDiplomacy.IsEnabled = Enabled
+ btnRDDiplo.IsEnabled = Enabled
+ btnEMDiplo.IsEnabled = Enabled
+ End Sub
+
+ Private Sub DisableEntrenchmentOptions(Optional ByVal Enabled As Boolean = False)
+ btnEntrenchment.IsEnabled = Enabled
+ btnRDEntrench.IsEnabled = Enabled
+ btnEMEntrench.IsEnabled = Enabled
+ End Sub
+
+ Private Sub DisableSinsOptions(Optional ByVal Enabled As Boolean = False)
+ btnSins.IsEnabled = Enabled
+ btnRDSins.IsEnabled = Enabled
+ End Sub
+
+ Private Sub DisableAllOptions(Optional ByVal Enabled As Boolean = False)
+ btnReferenceData.IsEnabled = Enabled
+ btnManifest.IsEnabled = Enabled
+ btnRelocateMods.IsEnabled = Enabled
+ End Sub
+
+ Private Sub CustomOn(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs, ByVal Path As String)
+ CustomEXEPath = Path
+ HasCustomEXE = True
+ Dim CustomSelected1 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected1.To = 0
+ CustomSelected1.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected1.AutoReverse = False
+ Dim CustomSelected2 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected2.To = 1
+ CustomSelected2.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected2.AutoReverse = False
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ Sequence.Children.Add(CustomSelected1)
+ Animation.Storyboard.SetTargetName(CustomSelected1, grpVersion.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected1, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Children.Add(CustomSelected2)
+ Animation.Storyboard.SetTargetName(CustomSelected2, lblCustomSelected.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected2, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Begin(Me)
+ End Sub
+
+ Private Sub CustomOff(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
+ CustomEXEPath = Nothing
+ HasCustomEXE = False
+ Dim CustomSelected1 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected1.To = 1
+ CustomSelected1.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected1.AutoReverse = False
+ Dim CustomSelected2 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected2.To = 0
+ CustomSelected2.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected2.AutoReverse = False
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ Sequence.Children.Add(CustomSelected1)
+ Animation.Storyboard.SetTargetName(CustomSelected1, grpVersion.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected1, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Children.Add(CustomSelected2)
+ Animation.Storyboard.SetTargetName(CustomSelected2, lblCustomSelected.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected2, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Begin(Me)
+ End Sub
+
+ Private Sub btnBasic_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnBasic.Click
+ Dim MainWindow As New MainWindow
+ MainWindow.Show()
+ Me.Close()
+ End Sub
+
+ Private Sub btnAddToQueue_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnAddToQueue.Click
+ AddToQueueMenu.IsOpen = True
+ End Sub
+
+ Private Sub AddFile(ByVal FileNames As String())
+ For Each file As String In FileNames
+ lstQueue.Items.Add(file)
+ Direction.Add("")
+ Version.Add("")
+ Output.Add("")
+ Validate.Add(False)
+ If file.EndsWith(".mesh") Then
+ FileType.Add(" mesh ")
+ ElseIf file.EndsWith(".particle") Then
+ FileType.Add(" particle ")
+ ElseIf file.EndsWith(".brushes") Then
+ FileType.Add(" brushes ")
+ ElseIf file.EndsWith(".entity") Then
+ FileType.Add(" entity ")
+ End If
+ Next
+ End Sub
+
+ Private Sub btnAddFile_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnAddFile.Click
+ Dim files As New System.Windows.Forms.OpenFileDialog
+ files.Filter = "Mesh|*.mesh|Particle|*.particle|Brushes|*.brushes|Entity|*.entity"
+ files.FilterIndex = 4
+ files.Title = "Select a file to convert..."
+ files.InitialDirectory = "Desktop"
+ files.Multiselect = True
+ If files.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ AddFile(files.FileNames)
+ End If
+ End Sub
+
+ Private Sub AddFolder(ByVal Folder As String)
+ Dim fileindex As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
+ If Not btnSub.IsChecked Then
+ fileindex = My.Computer.FileSystem.GetFiles(Folder, FileIO.SearchOption.SearchTopLevelOnly, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ Else
+ fileindex = My.Computer.FileSystem.GetFiles(Folder, FileIO.SearchOption.SearchAllSubDirectories, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ End If
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add(" ")
+ Version.Add(" ")
+ Output.Add(" ")
+ Validate.Add(False)
+ If Job.EndsWith(".mesh") Then
+ FileType.Add(" mesh ")
+ ElseIf Job.EndsWith(".particle") Then
+ FileType.Add(" particle ")
+ ElseIf Job.EndsWith(".brushes") Then
+ FileType.Add(" brushes ")
+ ElseIf Job.EndsWith(".entity") Then
+ FileType.Add(" entity ")
+ End If
+ Next
+ End Sub
+
+ Private Sub btnAddFolder_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnAddFolder.Click
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ AddFolder(folders.SelectedPath)
+ End If
+ End Sub
+
+ Private Sub btnRemove_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnRemove.Click
+ RemoveItems(lstQueue.SelectedItems)
+ End Sub
+
+ Private Sub RemoveItems(ByVal SourceList)
+ Dim ItemsList As New System.Collections.ObjectModel.Collection(Of String)
+ For Each Job In SourceList
+ ItemsList.Add(Job)
+ Next
+ For Each Job In ItemsList
+ Dim Index As Integer = lstQueue.Items.IndexOf(Job)
+ Direction.RemoveAt(Index)
+ Version.RemoveAt(Index)
+ Output.RemoveAt(Index)
+ Validate.RemoveAt(Index)
+ FileType.RemoveAt(Index)
+ ConfirmedSettings -= 1
+ lstQueue.Items.Remove(Job)
+ Next
+ Return
+ End Sub
+
+ Private Sub btnOutput_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnOutput.Click
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ txtOutput.Text = folders.SelectedPath
+ btnInPlace.IsChecked = False
+ End If
+ End Sub
+
+ Private Sub btnCustom_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnCustom.Click
+ If HasCustomEXE Then
+ CustomOff(sender, e)
+ btnCustom.Content = "Custom EXE..."
+ Else
+ Dim CustomLocation As New System.Windows.Forms.OpenFileDialog
+ CustomLocation.Filter = "ConvertData|*.exe"
+ CustomLocation.FilterIndex = 1
+ CustomLocation.Title = "Select a custom ConvertData executable..."
+ CustomLocation.InitialDirectory = "Desktop"
+ If CustomLocation.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ CustomOn(sender, e, CustomLocation.FileName)
+ btnCustom.Content = "Clear EXE"
+ End If
+ End If
+ End Sub
+
+ Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnUpdate.Click
+ If CheckForGames() = False And HasCustomEXE = False Then
+ MsgBox("Sins is not installed on this computer, so you must choose a custom ConvertData.exe and try again!", , "Error")
+ Return
+ End If
+ If Not lstQueue.SelectedItems.Count > 0 Then
+ If Not MsgBox("No items selected; settings will be applied to the entire queue. Continue?", MsgBoxStyle.YesNo, "No selection!") = Windows.Forms.DialogResult.Yes Then
+ Return
+ Else
+ For Each Job As Object In lstQueue.Items
+ Dim Index As Integer = lstQueue.Items.IndexOf(Job)
+ If btnToTXT.IsChecked Then
+ Direction.Item(Index) = "txt"
+ ElseIf btnToBIN.IsChecked Then
+ Direction.Item(Index) = ""
+ End If
+ If btnSins.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_OriginalSins.exe"
+ ElseIf btnEntrenchment.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_Entrenchment.exe"
+ ElseIf btnDiplomacy.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_Diplomacy.exe"
+ ElseIf btnRebellion.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_Rebellion.exe"
+ ElseIf HasCustomEXE Then
+ Version.Item(Index) = CustomEXEPath
+ End If
+ If Not txtOutput.Text = Nothing _
+ And Not txtOutput.Text = "" _
+ And Not btnInPlace.IsChecked Then
+ Output.Item(Index) = txtOutput.Text
+ ElseIf btnInPlace.IsChecked Then
+ Output.Item(Index) = Job.Remove(Job.LastIndexOf("\"))
+ End If
+ If btnValidate.IsChecked Then
+ Validate.Item(Index) = True
+ Else
+ Validate.Item(Index) = False
+ End If
+ ConfirmedSettings = ConfirmedSettings + 1
+ Next
+ MsgBox("Settings applied to all items!")
+ End If
+ Else
+ For Each Job As Object In lstQueue.SelectedItems
+ Dim Index As Integer = lstQueue.Items.IndexOf(Job)
+ If btnToTXT.IsChecked Then
+ Direction.Item(Index) = "txt"
+ ElseIf btnToBIN.IsChecked Then
+ Direction.Item(Index) = ""
+ End If
+ If btnSins.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_OriginalSins.exe"
+ ElseIf btnEntrenchment.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_Entrenchment.exe"
+ ElseIf btnDiplomacy.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_Diplomacy.exe"
+ ElseIf btnRebellion.IsChecked Then
+ Version.Item(Index) = SinsDir + "ConvertData_Rebellion.exe"
+ ElseIf HasCustomEXE Then
+ Version.Item(Index) = CustomEXEPath
+ End If
+ If Not txtOutput.Text = Nothing _
+ And Not txtOutput.Text = "" _
+ And Not btnInPlace.IsChecked Then
+ Output.Item(Index) = txtOutput.Text
+ ElseIf btnInPlace.IsChecked Then
+ Output.Item(Index) = Job.Remove(Job.LastIndexOf("\"))
+ End If
+ If btnValidate.IsChecked Then
+ Validate.Item(Index) = True
+ Else
+ Validate.Item(Index) = False
+ End If
+ ConfirmedSettings = ConfirmedSettings + 1
+ Next
+ MsgBox("Settings applied to " + lstQueue.SelectedItems.Count.ToString() + " item(s)!")
+ End If
+ ResetSettings(sender, e)
+ End Sub
+
+ Private Sub ResetSettings(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
+ CustomOff(sender, e)
+ btnToTXT.IsChecked = False
+ btnToBIN.IsChecked = False
+ btnSins.IsChecked = False
+ btnEntrenchment.IsChecked = False
+ btnDiplomacy.IsChecked = False
+ btnRebellion.IsChecked = False
+ txtOutput.Text = Nothing
+ btnValidate.IsChecked = False
+ btnInPlace.IsChecked = False
+ End Sub
+
+ Private Sub btnRelocateMods_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnRelocateMods.Click
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ folders.Description = "Select a new Sins Mods folder"
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ NewPathToMods = folders.SelectedPath
+ Dim NewestGame As String = "Rebellion "
+ Dim NewestVersion As String
+ Try
+ NewestVersion = RegRebel.GetValue("Version")
+ Catch NoRebellion As NullReferenceException
+ NewestGame = "Diplomacy "
+ Try
+ NewestVersion = RegTrinity.GetValue("Version")
+ Catch NoTrinity As NullReferenceException
+ Try
+ NewestVersion = RegDiplo.GetValue("Version")
+ Catch NoDiplo As NullReferenceException
+ NewestGame = "Entrenchment "
+ Try
+ NewestVersion = RegEntrench.GetValue("Version")
+ Catch NoEntrench As NullReferenceException
+ NewestGame = ""
+ Try
+ NewestVersion = RegSins.GetValue("Version")
+ Catch NoSins As NullReferenceException
+ MsgBox("Sins is not properly installed on this computer!", , "Error")
+ Return
+ End Try
+ End Try
+ End Try
+ End Try
+ End Try
+ If NewestGame = "Rebellion " Then
+ PathToMods = My.Computer.FileSystem.SpecialDirectories.MyDocuments + "\My Games\Ironclad Games\Sins of a Solar Empire Rebellion"
+ Else
+ If Environment.OSVersion.Version.Major > 5 Then
+ PathToMods = My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData.Replace("Roaming\Xtreme Studios\Sins Data Converter\2.0", "Local\Ironclad Games\Sins of a Solar Empire")
+ Else
+ PathToMods = My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData.Replace("Application Data\Xtreme Studios\Sins Data Converter\2.0", "Local Settings\Application Data\Ironclad Games\Sins of a Solar Empire")
+ End If
+ End If
+ NewestVersion = NewestVersion.Remove(NewestVersion.LastIndexOf("."), NewestVersion.Length)
+ ModFolder = "\Mods-" + NewestGame + NewestVersion
+ Dim writer As System.IO.StreamWriter
+ My.Computer.FileSystem.CreateDirectory(AppData)
+ writer = My.Computer.FileSystem.OpenTextFileWriter(AppData + "\movemods.bat", True)
+ writer.WriteLine("@echo off")
+ writer.WriteLine("mkdir /D """ + PathToMods + ModFolder + """ """ + NewPathToMods + ModFolder + """")
+ writer.WriteLine("del """ + AppData + "\movemods.bat""")
+ writer.Close()
+ prgsConversion.IsIndeterminate = True
+ AdvancedWindow.IsEnabled = False
+ Dim RelocationThread As New Thread(AddressOf RelocateMods)
+ RelocationThread.IsBackground = True
+ RelocationThread.Start()
+ End If
+ End Sub
+
+ Private Sub RelocateMods()
+ My.Computer.FileSystem.CreateDirectory(NewPathToMods + ModFolder)
+ My.Computer.FileSystem.CopyDirectory(PathToMods + ModFolder, NewPathToMods + ModFolder)
+ My.Computer.FileSystem.DeleteDirectory(PathToMods + ModFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)
+ Shell(AppData + "\movemods.bat", AppWinStyle.Hide, True)
+ MsgBox("Mods relocated!", , "Success")
+ Dispatcher.Invoke(New cleanupthreaddataDelegate(AddressOf EndRelocation))
+ End Sub
+
+ Private Sub EndRelocation()
+ prgsConversion.IsIndeterminate = False
+ AdvancedWindow.IsEnabled = True
+ End Sub
+
+ Private Sub Conversion()
+ Dim writer As System.IO.StreamWriter
+ Dim AppData As String = My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData
+ My.Computer.FileSystem.CreateDirectory(AppData)
+ writer = My.Computer.FileSystem.OpenTextFileWriter(AppData + "\sinsconversion.bat", True)
+ writer.WriteLine("@echo off")
+ writer.WriteLine("cd /D ""C:\""")
+ Dim Index As Integer
+ For Each Job As String In lstQueue.Items
+ Index = lstQueue.Items.IndexOf(Job)
+ writer.WriteLine("""" + Version.Item(Index) + """ " + FileType.Item(Index) + " """ + Job + """ """ + Output.Item(Index) + Job.Remove(0, Job.LastIndexOf("\")) + """ " + Direction.Item(Index))
+ Next
+ 'writer.WriteLine("del """ + AppData + "\sinsconversion.bat""")
+ writer.Close()
+ Shell(AppData + "\sinsconversion.bat", AppWinStyle.NormalFocus, True)
+ MsgBox("Conversion complete!", , "Success")
+ Dispatcher.Invoke(New cleanupthreaddataDelegate(AddressOf EndConversion))
+ End Sub
+
+ Private Sub EndConversion()
+ prgsConversion.IsIndeterminate = False
+ AdvancedWindow.IsEnabled = True
+ If ClearQueueWhenDone = True Then
+ RemoveItems(lstQueue.Items)
+ ClearQueueWhenDone = False
+ End If
+ End Sub
+
+ Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnConvert.Click
+ If Not lstQueue.Items.Count = ConfirmedSettings Then
+ MsgBox(CStr(lstQueue.Items.Count - ConfirmedSettings) + " item(s) have no settings applied to them. Conversion aborted.", , "Error")
+ Return
+ End If
+ AdvancedWindow.IsEnabled = False
+ prgsConversion.IsIndeterminate = True
+ Dim ConversionThread As New Thread(AddressOf Conversion)
+ ConversionThread.IsBackground = True
+ ConversionThread.Start()
+ End Sub
+
+ Private Sub btnReferenceData_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnReferenceData.Click
+ RDMenu.IsOpen = True
+ End Sub
+
+ Private Sub QueueReferenceData(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs, ByVal GameFolder As String, ByVal GameTitle As String, ByVal ConvertData As String)
+ Dim RDPath As String
+ If MsgBox("This will clear any items currently in the queue. Continue?", MsgBoxStyle.YesNo, "Warning") = Windows.Forms.DialogResult.Yes Then
+ RemoveItems(lstQueue.Items)
+ Else
+ Return
+ End If
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ folders.Description = "Save ReferenceData in..."
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ RDPath = CreateRDFolders(folders.SelectedPath, GameTitle)
+ If RDPath = "failed" Then
+ Return
+ End If
+ Dim fileindex As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + GameFolder + "\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\GameInfo")
+ Validate.Add(False)
+ FileType.Add(" entity ")
+ ConfirmedSettings += 1
+ Next
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + GameFolder + "\Mesh", FileIO.SearchOption.SearchTopLevelOnly, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\Mesh")
+ Validate.Add(False)
+ FileType.Add(" mesh ")
+ ConfirmedSettings += 1
+ Next
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + GameFolder + "\Particle", FileIO.SearchOption.SearchTopLevelOnly, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\Particle")
+ Validate.Add(False)
+ FileType.Add(" particle ")
+ ConfirmedSettings += 1
+ Next
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + GameFolder + "\Window", FileIO.SearchOption.SearchTopLevelOnly, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\Window")
+ Validate.Add(False)
+ FileType.Add(" brushes ")
+ ConfirmedSettings += 1
+ Next
+ ClearQueueWhenDone = True
+ btnConvert_Click(sender, e)
+ End If
+ End Sub
+
+ Private Sub QueueReferenceData(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
+ Dim GameTitle As String = "Rebellion"
+ Dim ConvertData As String = "ConvertData_Rebellion.exe"
+ Dim RDPath As String
+ If MsgBox("This will clear any items currently in the queue. Continue?", MsgBoxStyle.YesNo, "Warning") = Windows.Forms.DialogResult.Yes Then
+ lstQueue.Items.Clear()
+ Else
+ Return
+ End If
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ folders.Description = "Save ReferenceData in..."
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ RDPath = CreateRDFolders(folders.SelectedPath, GameTitle)
+ If RDPath = "failed" Then
+ Return
+ End If
+ Dim fileindex As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + "\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\GameInfo")
+ Validate.Add(False)
+ FileType.Add(" entity ")
+ ConfirmedSettings += 1
+ Next
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + "\Mesh", FileIO.SearchOption.SearchTopLevelOnly, "*.mesh")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\Mesh")
+ Validate.Add(False)
+ FileType.Add(" mesh ")
+ ConfirmedSettings += 1
+ Dim Temp As Integer = lstQueue.Items.IndexOf(Job)
+ Next
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + "\Particle", FileIO.SearchOption.SearchTopLevelOnly, "*.particle")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\Particle")
+ Validate.Add(False)
+ FileType.Add(" particle ")
+ ConfirmedSettings += 1
+ Next
+ fileindex = My.Computer.FileSystem.GetFiles(SinsDir + "\Window", FileIO.SearchOption.SearchTopLevelOnly, "*.brushes")
+ For Each Job In fileindex
+ lstQueue.Items.Add(Job)
+ Direction.Add("txt")
+ Version.Add(SinsDir + ConvertData)
+ Output.Add(RDPath + "\Window")
+ Validate.Add(False)
+ FileType.Add(" brushes ")
+ ConfirmedSettings += 1
+ Next
+ ClearQueueWhenDone = True
+ btnConvert_Click(sender, e)
+ End If
+ End Sub
+
+ Private Function CreateRDFolders(ByVal Root As String, ByVal GameTitle As String) As String
+ Dim RDPath As String = Root + "\" + GameTitle + " Reference Data"
+ Try
+ My.Computer.FileSystem.CreateDirectory(RDPath)
+ Catch ex As Exception
+ MsgBox("Failed to create ReferenceData directory!", MsgBoxStyle.OkOnly, "Error")
+ Return "failed"
+ End Try
+ Try
+ My.Computer.FileSystem.CreateDirectory(RDPath + "\GameInfo")
+ My.Computer.FileSystem.CreateDirectory(RDPath + "\Mesh")
+ My.Computer.FileSystem.CreateDirectory(RDPath + "\Particle")
+ My.Computer.FileSystem.CreateDirectory(RDPath + "\Window")
+ Catch ex As Exception
+ My.Computer.FileSystem.DeleteDirectory(RDPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
+ MsgBox("Failed to create ReferenceData directory!", MsgBoxStyle.OkOnly, "Error")
+ Return "failed"
+ End Try
+ Return RDPath
+ End Function
+
+ Private Sub btnRDSins_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnRDSins.Click
+ QueueReferenceData(sender, e, "", "Original Sins", "ConvertData_OriginalSins.exe")
+ End Sub
+
+ Private Sub btnRDEntrench_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnRDEntrench.Click
+ QueueReferenceData(sender, e, "\Entrenchment", "Entrenchment", "ConvertData_Entrenchment.exe")
+ End Sub
+
+ Private Sub btnRDDiplo_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnRDDiplo.Click
+ QueueReferenceData(sender, e, "\Diplomacy", "Diplomacy", "ConvertData_Diplomacy.exe")
+ End Sub
+
+ Private Sub btnRDRebel_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnRDRebel.Click
+ QueueReferenceData(sender, e)
+ End Sub
+
+ Private Sub btnManifest_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnManifest.Click
+ EMMenu.IsOpen = True
+ End Sub
+
+ Private Sub BuildEntityManifest(ByVal Game As String)
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ folders.Description = "Select your root mod folder (directory above GameInfo)"
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ Dim writer As System.IO.StreamWriter
+ writer = My.Computer.FileSystem.OpenTextFileWriter(folders.SelectedPath + "\entity.manifest", True)
+ writer.WriteLine("TXT")
+ Dim sinsentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ For Each Entity In My.Computer.FileSystem.GetFiles(SinsDir + "\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ sinsentityindex.Add(Entity.Remove(0, Entity.LastIndexOf("\") + 1))
+ Next
+ Dim entrenchentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ If Game = "Entrenchment" Then
+ For Each Entity In My.Computer.FileSystem.GetFiles(SinsDir + "\Entrenchment\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ If Not sinsentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) Then
+ entrenchentityindex.Add(Entity.Remove(0, Entity.LastIndexOf("\") + 1))
+ End If
+ Next
+ End If
+ Dim diploentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ If Game = "Diplomacy" Then
+ For Each Entity In My.Computer.FileSystem.GetFiles(SinsDir + "\Entrenchment\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ If Not sinsentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) Then
+ entrenchentityindex.Add(Entity.Remove(0, Entity.LastIndexOf("\") + 1))
+ End If
+ Next
+ For Each Entity In My.Computer.FileSystem.GetFiles(SinsDir + "\Diplomacy\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ If Not sinsentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) _
+ And Not entrenchentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) Then
+ diploentityindex.Add(Entity.Remove(0, Entity.LastIndexOf("\") + 1))
+ End If
+ Next
+ End If
+ Dim newentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ For Each Entity In My.Computer.FileSystem.GetFiles(folders.SelectedPath + "\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ If Not sinsentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) _
+ And Not entrenchentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) _
+ And Not diploentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) Then
+ newentityindex.Add(Entity.Remove(0, Entity.LastIndexOf("\") + 1))
+ End If
+ Next
+ Dim finalentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ For Each Entity In sinsentityindex
+ finalentityindex.Add(Entity)
+ Next
+ For Each Entity In entrenchentityindex
+ finalentityindex.Add(Entity)
+ Next
+ For Each Entity In diploentityindex
+ finalentityindex.Add(Entity)
+ Next
+ For Each Entity In newentityindex
+ finalentityindex.Add(Entity)
+ Next
+ writer.WriteLine("entityNameCount " + CStr(finalentityindex.Count))
+ For Each Entity In finalentityindex
+ writer.WriteLine("entityName """ + Entity + """")
+ Next
+ writer.Close()
+ MsgBox("Manifest created successfully!", , "Success")
+ End If
+ End Sub
+
+ Private Sub BuildEntityManifest(ByVal Game As String, ByVal Rebellion As String)
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ folders.Description = "Select your root mod folder (directory above GameInfo)"
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ Dim writer As System.IO.StreamWriter
+ writer = My.Computer.FileSystem.OpenTextFileWriter(folders.SelectedPath + "\entity.manifest", True)
+ writer.WriteLine("TXT")
+ Dim rebelentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ For Each Entity In My.Computer.FileSystem.GetFiles(SinsDir + "\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ rebelentityindex.Add(Entity.Remove(0, Entity.LastIndexOf("\") + 1))
+ Next
+ Dim newentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ For Each Entity In My.Computer.FileSystem.GetFiles(folders.SelectedPath + "\GameInfo", FileIO.SearchOption.SearchTopLevelOnly, "*.entity")
+ If Not rebelentityindex.Contains(Entity.Remove(0, Entity.LastIndexOf("\") + 1)) Then
+ newentityindex.Add(Entity.Remove(0, Entity.LastIndexOf("\") + 1))
+ End If
+ Next
+ Dim finalentityindex As New System.Collections.ObjectModel.Collection(Of String)
+ For Each Entity In newentityindex
+ finalentityindex.Add(Entity)
+ Next
+ writer.WriteLine("entityNameCount " + CStr(finalentityindex.Count))
+ For Each Entity In finalentityindex
+ writer.WriteLine("entityName """ + Entity + """")
+ Next
+ writer.Close()
+ MsgBox("Manifest created successfully!", , "Success")
+ End If
+ End Sub
+
+ Private Sub btnEMEntrench_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnEMEntrench.Click
+ BuildEntityManifest("Entrenchment")
+ End Sub
+
+ Private Sub btnEMDiplo_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnEMDiplo.Click
+ BuildEntityManifest("Diplomacy")
+ End Sub
+
+ Private Sub btnEMRebel_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnEMRebel.Click
+ BuildEntityManifest("Rebellion", "Rebellion")
+ End Sub
+End Class
diff --git a/SinsDataConverter/Application.xaml b/SinsDataConverter/Application.xaml
new file mode 100644
index 0000000..09cf9f1
--- /dev/null
+++ b/SinsDataConverter/Application.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/SinsDataConverter/Application.xaml.vb b/SinsDataConverter/Application.xaml.vb
new file mode 100644
index 0000000..084cbe9
--- /dev/null
+++ b/SinsDataConverter/Application.xaml.vb
@@ -0,0 +1,6 @@
+Class Application
+
+ ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
+ ' can be handled in this file.
+
+End Class
diff --git a/SinsDataConverter/Images/SDCv20icon.png b/SinsDataConverter/Images/SDCv20icon.png
new file mode 100644
index 0000000..01e8518
Binary files /dev/null and b/SinsDataConverter/Images/SDCv20icon.png differ
diff --git a/SinsDataConverter/Images/sins_footer_bg.jpg b/SinsDataConverter/Images/sins_footer_bg.jpg
new file mode 100644
index 0000000..d058592
Binary files /dev/null and b/SinsDataConverter/Images/sins_footer_bg.jpg differ
diff --git a/SinsDataConverter/Images/skybox02environmentcube.png b/SinsDataConverter/Images/skybox02environmentcube.png
new file mode 100644
index 0000000..b279e47
Binary files /dev/null and b/SinsDataConverter/Images/skybox02environmentcube.png differ
diff --git a/SinsDataConverter/Images/skybox03environmentcube.png b/SinsDataConverter/Images/skybox03environmentcube.png
new file mode 100644
index 0000000..02abab8
Binary files /dev/null and b/SinsDataConverter/Images/skybox03environmentcube.png differ
diff --git a/SinsDataConverter/Images/skybox04environmentcube.png b/SinsDataConverter/Images/skybox04environmentcube.png
new file mode 100644
index 0000000..ee11653
Binary files /dev/null and b/SinsDataConverter/Images/skybox04environmentcube.png differ
diff --git a/SinsDataConverter/Images/skybox05environmentcube.png b/SinsDataConverter/Images/skybox05environmentcube.png
new file mode 100644
index 0000000..e9f6508
Binary files /dev/null and b/SinsDataConverter/Images/skybox05environmentcube.png differ
diff --git a/SinsDataConverter/Images/skybox06environmentcube.png b/SinsDataConverter/Images/skybox06environmentcube.png
new file mode 100644
index 0000000..0a0057d
Binary files /dev/null and b/SinsDataConverter/Images/skybox06environmentcube.png differ
diff --git a/SinsDataConverter/Images/skybox07environmentcube.png b/SinsDataConverter/Images/skybox07environmentcube.png
new file mode 100644
index 0000000..abc00fc
Binary files /dev/null and b/SinsDataConverter/Images/skybox07environmentcube.png differ
diff --git a/SinsDataConverter/Images/skybox08environmentcube.png b/SinsDataConverter/Images/skybox08environmentcube.png
new file mode 100644
index 0000000..4923321
Binary files /dev/null and b/SinsDataConverter/Images/skybox08environmentcube.png differ
diff --git a/SinsDataConverter/Instructions.xaml b/SinsDataConverter/Instructions.xaml
new file mode 100644
index 0000000..8ba4d70
--- /dev/null
+++ b/SinsDataConverter/Instructions.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
diff --git a/SinsDataConverter/Instructions.xaml.vb b/SinsDataConverter/Instructions.xaml.vb
new file mode 100644
index 0000000..d6d501d
--- /dev/null
+++ b/SinsDataConverter/Instructions.xaml.vb
@@ -0,0 +1,22 @@
+Public Class Instructions
+
+ Private Sub Instructions_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
+ txtHelp.Text =
+ "The Sins Data Conversion Utility is an easy way to convert Sins of a Solar Empire data files back and forth between TXT and BIN format. It does this by " +
+ "using the command line converters included in Sins (which means Sins has to be installed). This is not an ""in-place"" conversion utility, and you can " +
+ "select a custom output destination for the converted files. You can select either a single file, or an entire folder, or even a folder and all of its " +
+ "subfolders, as the conversion source. You can then select any folder you like as the output folder for the converted file(s). Then you can pick whether " +
+ "you are converting from TXT to BIN, or BIN to TXT. Finally, you specify whether the files are from/for original Sins, Entrenchment, or Diplomacy. Then you " +
+ "simply click the big ""CONVERT"" button. Depending on the size of the operation you have asked the program to perform, it may take some time to complete, " +
+ "during which the program will appear to stop responding. Despite this, it will be working in the background, and it will notify you when it has finished. " +
+ "If you used this program before the release of v1.2, there are some things you should know. First, you'll have noticed that the interface is slightly different " +
+ "to make room for some new features. There is now a button (checkbox actually) that automates in-place conversions, which just means you don't have to set the " +
+ "output folder separately in those cases. You can now drag-and-drop files and folders to convert, but you have to drag them onto the relevant button. For example, " +
+ "if you have a file you want to convert, drag it onto the ""File"" button next to the Source field, not onto the Source field itself. Finally, there is now an " +
+ "exclusion list for conversions that include subfolders. You can select multiple folders to exclude by using the CTRL key while clicking items in the list."
+ End Sub
+
+ Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnBack.Click
+ Me.Hide()
+ End Sub
+End Class
diff --git a/SinsDataConverter/MainWindow.xaml b/SinsDataConverter/MainWindow.xaml
new file mode 100644
index 0000000..f90c063
--- /dev/null
+++ b/SinsDataConverter/MainWindow.xaml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SinsDataConverter/MainWindow.xaml.vb b/SinsDataConverter/MainWindow.xaml.vb
new file mode 100644
index 0000000..135f3ad
--- /dev/null
+++ b/SinsDataConverter/MainWindow.xaml.vb
@@ -0,0 +1,727 @@
+Class MainWindow
+ Dim PathType As String
+ Dim HasCustomEXE As Boolean = False
+ Dim CustomEXEPath As String
+ Dim SubfolderIndex As New System.Collections.ObjectModel.Collection(Of String)
+ Dim RegSins As Microsoft.Win32.RegistryKey
+ Dim RegEntrench As Microsoft.Win32.RegistryKey
+ Dim RegDiplo As Microsoft.Win32.RegistryKey
+ Dim RegTrinity As Microsoft.Win32.RegistryKey
+ Dim RegRebel As Microsoft.Win32.RegistryKey
+
+ Delegate Sub cleanupthreaddataDelegate()
+
+ ' Variables to support threading
+ Dim UsingSins As Boolean = False
+ Dim UsingEntrench As Boolean = False
+ Dim UsingDiplo As Boolean = False
+ Dim UsingRebel As Boolean = False
+ Dim ConversionPath As String
+ Dim OutputLocation As String
+ Dim UsingSubfolders As Boolean = False
+ Dim ExcludedSubfolders As System.Collections.IList
+ Dim ConvertToTXT As Boolean = True
+ Dim ConvertToBIN As Boolean = False
+
+ Private Sub GetRegistryPaths()
+ If IntPtr.Size = 8 Then
+ RegSins = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sins", False)
+ RegEntrench = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinsentrench", False)
+ RegDiplo = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinsdiplo", False)
+ RegTrinity = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinstrinity", False)
+ RegRebel = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinsrebellion", False)
+ Else
+ RegSins = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sins", False)
+ RegEntrench = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinsentrench", False)
+ RegDiplo = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinsdiplo", False)
+ RegTrinity = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinstrinity", False)
+ RegRebel = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinsrebellion", False)
+ End If
+ End Sub
+
+ Private Function SetCustomGamePath() As Boolean
+ Dim ValidPath As Boolean = False
+ Do Until ValidPath = True
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ folders.Description = "Select your custom game path"
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ ValidPath = CheckPathForGames(True, folders.SelectedPath, My.Computer.FileSystem.GetDirectories(folders.SelectedPath, FileIO.SearchOption.SearchTopLevelOnly),
+ My.Computer.FileSystem.GetFiles(folders.SelectedPath, FileIO.SearchOption.SearchTopLevelOnly))
+ End If
+ If ValidPath = False Then
+ If MsgBox("No valid path selected! Try again?", MsgBoxStyle.YesNo, "Error") = MsgBoxResult.No Then
+ Exit Do
+ End If
+ Else
+ MsgBox("Custom game path set successfully!", MsgBoxStyle.OkOnly, "Success")
+ My.Settings.SavedInstall = folders.SelectedPath
+ End If
+ Loop
+ Return ValidPath
+ End Function
+
+ Private Function CheckPathForGames(Optional ByVal Custom As Boolean = False, Optional ByVal CustomPath As String = "",
+ Optional ByVal FoldersInPath As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = Nothing,
+ Optional ByVal FilesInPath As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = Nothing) As Boolean
+ Dim HasGame As Boolean = True
+ Dim CheckPath As String
+ If Custom = False Then
+ Try
+ CheckPath = RegRebel.GetValue("Path") + "\"
+ Catch NoRebellion As NullReferenceException
+ btnRebellion.IsEnabled = False
+ Try
+ CheckPath = RegTrinity.GetValue("Path") + "\"
+ Catch NoTrinity As NullReferenceException
+ Try
+ CheckPath = RegDiplo.GetValue("Path") + "\"
+ Catch NoDiplomacy As NullReferenceException
+ btnDiplomacy.IsEnabled = False
+ Try
+ CheckPath = RegEntrench.GetValue("Path") + "\"
+ Catch NoEntrenchment As NullReferenceException
+ btnEntrenchment.IsEnabled = False
+ Try
+ CheckPath = RegSins.GetValue("Path") + "\"
+ Catch NoSins As NullReferenceException
+ btnSins.IsEnabled = False
+ HasGame = False
+ End Try
+ End Try
+ End Try
+ End Try
+ End Try
+ If btnRebellion.IsEnabled Then
+ btnDiplomacy.IsEnabled = False
+ btnEntrenchment.IsEnabled = False
+ btnSins.IsEnabled = False
+ End If
+ Else
+ If Not CustomPath.Contains("Rebellion") Then
+ btnRebellion.IsEnabled = False
+ If Not FoldersInPath.Contains("Diplomacy") Then
+ btnDiplomacy.IsEnabled = False
+ If Not FoldersInPath.Contains("Entrenchment") Then
+ btnEntrenchment.IsEnabled = False
+ If Not FilesInPath.Contains(CustomPath + "\Sins of a Solar Empire.exe") Then
+ btnSins.IsEnabled = False
+ HasGame = False
+ Else
+ btnSins.IsEnabled = True
+ End If
+ Else
+ btnEntrenchment.IsEnabled = True
+ End If
+ Else
+ btnDiplomacy.IsEnabled = True
+ End If
+ Else
+ btnDiplomacy.IsEnabled = False
+ btnEntrenchment.IsEnabled = False
+ btnSins.IsEnabled = False
+ End If
+ End If
+ Return HasGame
+ End Function
+
+ Private Sub btnFile_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnFile.Click
+ Dim files As New System.Windows.Forms.OpenFileDialog
+ files.Filter = "Mesh|*.mesh|Particle|*.particle|Brushes|*.brushes|Entity|*.entity"
+ files.FilterIndex = 4
+ files.Title = "Select a file to convert..."
+ files.InitialDirectory = "Desktop"
+ If files.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ AcceptSourceFile(sender, e, files.FileName)
+ End If
+ End Sub
+
+ Private Sub AcceptSourceFile(ByVal sender As Object, ByVal e As RoutedEventArgs, ByVal Path As String)
+ txtSource.Text = Path
+ PathType = "file"
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ If btnSub.IsEnabled = True Then
+ Dim NoSubfolders As New System.Windows.Media.Animation.ColorAnimation
+ NoSubfolders.To = Colors.Red
+ NoSubfolders.Duration = TimeSpan.FromSeconds(0.5)
+ NoSubfolders.AutoReverse = True
+ Dim Brush2 As New SolidColorBrush
+ Brush2.Color = Colors.White
+ btnSub.Background = Brush2
+ btnSub.Foreground = Brush2
+ Me.RegisterName("ForeColor2", Brush2)
+ Animation.Storyboard.SetTargetName(NoSubfolders, "ForeColor2")
+ Animation.Storyboard.SetTargetProperty(NoSubfolders, New PropertyPath(SolidColorBrush.ColorProperty))
+ Sequence.Children.Add(NoSubfolders)
+ End If
+ btnSub.IsEnabled = False
+ btnSub.IsChecked = False
+ Dim SourceSelected As New System.Windows.Media.Animation.ColorAnimation
+ SourceSelected.To = Colors.LimeGreen
+ SourceSelected.Duration = TimeSpan.FromSeconds(0.5)
+ SourceSelected.AutoReverse = True
+ Dim Brush As New SolidColorBrush
+ Brush.Color = Colors.White
+ lblConvert.Foreground = Brush
+ txtSource.Foreground = Brush
+ Me.RegisterName("ForeColor", Brush)
+ Animation.Storyboard.SetTargetName(SourceSelected, "ForeColor")
+ Animation.Storyboard.SetTargetProperty(SourceSelected, New PropertyPath(SolidColorBrush.ColorProperty))
+ Sequence.Children.Add(SourceSelected)
+ Sequence.Begin(Me)
+ Me.UnregisterName("ForeColor")
+ Try
+ Me.UnregisterName("ForeColor2")
+ Catch ex As ArgumentException
+
+ End Try
+ End Sub
+
+ Private Sub btnFolder_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnFolder.Click
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ AcceptSourceFolder(sender, e, folders.SelectedPath)
+ End If
+ End Sub
+
+ Private Sub AcceptSourceFolder(ByVal sender As Object, ByVal e As RoutedEventArgs, ByVal Path As String)
+ txtSource.Text = Path
+ PathType = "folder"
+ btnSub.IsEnabled = True
+ ClearSubfolders(sender, e)
+ If btnSub.IsChecked Then
+ RetrieveSubfolders(sender, e)
+ End If
+ Dim SourceSelected As New System.Windows.Media.Animation.ColorAnimation
+ SourceSelected.To = Colors.LimeGreen
+ SourceSelected.Duration = TimeSpan.FromSeconds(0.5)
+ SourceSelected.AutoReverse = True
+ Dim Brush As New SolidColorBrush
+ Brush.Color = Colors.White
+ lblConvert.Foreground = Brush
+ txtSource.Foreground = Brush
+ btnSub.Background = Brush
+ btnSub.Foreground = Brush
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ Me.RegisterName("ForeColor", Brush)
+ Animation.Storyboard.SetTargetName(SourceSelected, "ForeColor")
+ Animation.Storyboard.SetTargetProperty(SourceSelected, New PropertyPath(SolidColorBrush.ColorProperty))
+ Sequence.Children.Add(SourceSelected)
+ Sequence.Begin(Me)
+ Me.UnregisterName("ForeColor")
+ End Sub
+
+ Private Sub RetrieveSubfolders(ByVal sender As Object, ByVal e As RoutedEventArgs)
+ For Each Subfolder In My.Computer.FileSystem.GetDirectories(txtSource.Text, FileIO.SearchOption.SearchAllSubDirectories)
+ SubfolderIndex.Add(Subfolder)
+ Next
+ For Each Subfolder In SubfolderIndex
+ Dim SubfolderName As String = Subfolder.Replace(txtSource.Text + "\", "")
+ lstSubfolders.Items.Add(SubfolderName)
+ Next
+ End Sub
+
+ Private Sub ClearSubfolders(ByVal sender As Object, ByVal e As RoutedEventArgs)
+ SubfolderIndex.Clear()
+ lstSubfolders.Items.Clear()
+ End Sub
+
+ Private Sub btnOutput_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnOutput.Click
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ txtOutput.Text = folders.SelectedPath
+ btnInPlace.IsChecked = False
+ OutputSelectedAnimation(sender, e)
+ End If
+ End Sub
+
+ Private Sub OutputSelectedAnimation(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
+ Dim OutputSelected As New System.Windows.Media.Animation.ColorAnimation
+ OutputSelected.To = Colors.LimeGreen
+ OutputSelected.Duration = TimeSpan.FromSeconds(0.5)
+ OutputSelected.AutoReverse = True
+ Dim Brush As New SolidColorBrush
+ Brush.Color = Colors.White
+ lblOutput.Foreground = Brush
+ txtOutput.Foreground = Brush
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ Me.RegisterName("ForeColor", Brush)
+ Animation.Storyboard.SetTargetName(OutputSelected, "ForeColor")
+ Animation.Storyboard.SetTargetProperty(OutputSelected, New PropertyPath(SolidColorBrush.ColorProperty))
+ Sequence.Children.Add(OutputSelected)
+ Sequence.Begin(Me)
+ Me.UnregisterName("ForeColor")
+ End Sub
+
+ Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnReset.Click
+ txtSource.Text = Nothing
+ txtOutput.Text = Nothing
+ PathType = Nothing
+ btnSins.IsChecked = False
+ btnEntrenchment.IsChecked = False
+ btnDiplomacy.IsChecked = False
+ btnRebellion.IsChecked = False
+ btnInPlace.IsChecked = False
+ CustomOff(sender, e)
+ End Sub
+
+ Private Sub CustomOn(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs, ByVal Path As String)
+ CustomEXEPath = Path
+ HasCustomEXE = True
+ My.Settings.SavedEXE = CustomEXEPath
+ Dim CustomSelected1 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected1.To = 0
+ CustomSelected1.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected1.AutoReverse = False
+ Dim CustomSelected2 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected2.To = 1
+ CustomSelected2.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected2.AutoReverse = False
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ Sequence.Children.Add(CustomSelected1)
+ Animation.Storyboard.SetTargetName(CustomSelected1, grpVersion.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected1, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Children.Add(CustomSelected2)
+ Animation.Storyboard.SetTargetName(CustomSelected2, lblCustomSelected.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected2, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Begin(Me)
+ End Sub
+
+ Private Sub CustomOff(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
+ CustomEXEPath = Nothing
+ HasCustomEXE = False
+ My.Settings.SavedEXE = ""
+ Dim CustomSelected1 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected1.To = 1
+ CustomSelected1.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected1.AutoReverse = False
+ Dim CustomSelected2 As New System.Windows.Media.Animation.DoubleAnimation
+ CustomSelected2.To = 0
+ CustomSelected2.Duration = New Duration(TimeSpan.FromSeconds(1))
+ CustomSelected2.AutoReverse = False
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ Sequence.Children.Add(CustomSelected1)
+ Animation.Storyboard.SetTargetName(CustomSelected1, grpVersion.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected1, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Children.Add(CustomSelected2)
+ Animation.Storyboard.SetTargetName(CustomSelected2, lblCustomSelected.Name)
+ Animation.Storyboard.SetTargetProperty(CustomSelected2, New PropertyPath(StackPanel.OpacityProperty))
+ Sequence.Begin(Me)
+ End Sub
+
+ Private Sub Conversion()
+ If ConversionPath = "" _
+ Or OutputLocation = "" Then
+ MsgBox("You must select both a source file or folder, and an output folder!", , "Error")
+ Return
+ End If
+ If UsingSins = False _
+ And UsingEntrench = False _
+ And UsingDiplo = False _
+ And UsingRebel = False _
+ And HasCustomEXE = False Then
+ MsgBox("You must select a either an installed version of Sins, or a custom version!", , "Error")
+ Return
+ End If
+ Dim RegPath As Microsoft.Win32.RegistryKey
+ Dim SinsDir As String
+ If Not My.Settings.SavedInstall = "" And Not My.Settings.SavedInstall = Nothing Then
+ SinsDir = My.Settings.SavedInstall
+ ElseIf HasCustomEXE = False Then
+ If IntPtr.Size = 8 Then
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinsrebellion", False)
+ Try
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex3 As NullReferenceException
+ Try
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sins", False)
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex As NullReferenceException
+ Try
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinstrinity", False)
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex2 As NullReferenceException
+ If MsgBox("Sins is not properly installed on your computer. Would you like to set a custom default path for the game?", MsgBoxStyle.YesNo, "Attention") = MsgBoxResult.Yes Then
+ If SetCustomGamePath() = True Then
+ SinsDir = My.Settings.SavedInstall
+ Else
+ MsgBox("Conversion failed!", MsgBoxStyle.OkOnly, "Error")
+ Return
+ End If
+ Else
+ MsgBox("Conversion failed!", MsgBoxStyle.OkOnly, "Error")
+ Return
+ End If
+ End Try
+ End Try
+ End Try
+ Else
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinsrebellion", False)
+ Try
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex3 As NullReferenceException
+ Try
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sins", False)
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex As NullReferenceException
+ Try
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinstrinity", False)
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex2 As NullReferenceException
+ If MsgBox("Sins is not properly installed on your computer. Would you like to set a custom default path for the game?", MsgBoxStyle.YesNo, "Attention") = MsgBoxResult.Yes Then
+ If SetCustomGamePath() = True Then
+ SinsDir = My.Settings.SavedInstall
+ Else
+ MsgBox("Conversion failed!", MsgBoxStyle.OkOnly, "Error")
+ Return
+ End If
+ Else
+ MsgBox("Conversion failed!", MsgBoxStyle.OkOnly, "Error")
+ Return
+ End If
+ End Try
+ End Try
+ End Try
+ End If
+ End If
+ Dim writer As System.IO.StreamWriter
+ Dim AppData As String = My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData
+ My.Computer.FileSystem.CreateDirectory(AppData)
+ writer = My.Computer.FileSystem.OpenTextFileWriter(AppData + "\sinsconversion.bat", True)
+ writer.WriteLine("@echo off")
+ If HasCustomEXE = True Then
+ If PathType = "file" Then
+ Dim FileType As String = " entity "
+ If ConversionPath.EndsWith(".mesh") Then
+ FileType = " mesh "
+ ElseIf ConversionPath.EndsWith(".particle") Then
+ FileType = " particle "
+ ElseIf ConversionPath.EndsWith(".brushes") Then
+ FileType = " brushes "
+ ElseIf ConversionPath.EndsWith(".entity") Then
+ FileType = " entity "
+ End If
+ Dim Format As String
+ If ConvertToTXT Then
+ Format = " txt"
+ Else
+ Format = ""
+ End If
+ writer.WriteLine("""" + CustomEXEPath + """" + FileType + """" + ConversionPath + """ """ + OutputLocation +
+ ConversionPath.Remove(0, ConversionPath.LastIndexOf("\")) + """" + Format)
+ ElseIf PathType = "folder" Then
+ Dim fileindex As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
+ If Not UsingSubfolders Then
+ fileindex = My.Computer.FileSystem.GetFiles(ConversionPath, FileIO.SearchOption.SearchTopLevelOnly, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ Else
+ fileindex = My.Computer.FileSystem.GetFiles(ConversionPath, FileIO.SearchOption.SearchAllSubDirectories, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ Dim subfolderindex As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetDirectories(ConversionPath)
+ For Each subfolder In subfolderindex
+ Dim SubfolderName As String = subfolder.Replace(ConversionPath + "\", "")
+ If Not ExcludedSubfolders.Contains(SubfolderName) Then
+ My.Computer.FileSystem.CreateDirectory(OutputLocation + "\" + SubfolderName)
+ End If
+ Next
+ End If
+ For Each file In fileindex
+ Dim FileType As String = " entity "
+ If file.EndsWith(".mesh") Then
+ FileType = " mesh "
+ ElseIf file.EndsWith(".particle") Then
+ FileType = " particle "
+ ElseIf file.EndsWith(".brushes") Then
+ FileType = " brushes "
+ ElseIf file.EndsWith(".entity") Then
+ FileType = " entity "
+ End If
+ Dim Format As String
+ If ConvertToTXT Then
+ Format = " txt"
+ Else
+ Format = ""
+ End If
+ If Not UsingSubfolders Then
+ writer.WriteLine("""" + CustomEXEPath + """" + FileType + """" + file + """ """ + OutputLocation + file.Remove(0, file.LastIndexOf("\")) + """" + Format)
+ Else
+ writer.WriteLine("""" + CustomEXEPath + """" + FileType + """" + file + """ """ + OutputLocation + file.Replace(ConversionPath, "") + """" + Format)
+ End If
+ Next
+ End If
+ ElseIf HasCustomEXE = False Then
+ writer.WriteLine("cd /D """ + SinsDir + """")
+ If PathType = "file" Then
+ Dim FileType As String = " entity "
+ If ConversionPath.EndsWith(".mesh") Then
+ FileType = " mesh "
+ ElseIf ConversionPath.EndsWith(".particle") Then
+ FileType = " particle "
+ ElseIf ConversionPath.EndsWith(".brushes") Then
+ FileType = " brushes "
+ ElseIf ConversionPath.EndsWith(".entity") Then
+ FileType = " entity "
+ End If
+ Dim Converter As String = "ConvertData_OriginalSins.exe"
+ If UsingSins Then
+ Converter = "ConvertData_OriginalSins.exe"
+ ElseIf UsingEntrench Then
+ Converter = "ConvertData_Entrenchment.exe"
+ ElseIf UsingDiplo Then
+ Converter = "ConvertData_Diplomacy.exe"
+ ElseIf UsingRebel Then
+ Converter = "ConvertData_Rebellion.exe"
+ End If
+ Dim Format As String
+ If ConvertToTXT Then
+ Format = " txt"
+ Else
+ Format = ""
+ End If
+ writer.WriteLine(Converter + FileType + """" + ConversionPath + """ """ + OutputLocation + ConversionPath.Remove(0, ConversionPath.LastIndexOf("\")) + """" + Format)
+ ElseIf PathType = "folder" Then
+ Dim fileindex As System.Collections.ObjectModel.ReadOnlyCollection(Of String)
+ If Not UsingSubfolders Then
+ fileindex = My.Computer.FileSystem.GetFiles(ConversionPath, FileIO.SearchOption.SearchTopLevelOnly, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ Else
+ fileindex = My.Computer.FileSystem.GetFiles(ConversionPath, FileIO.SearchOption.SearchAllSubDirectories, "*.mesh", "*.particle", "*.brushes", "*.entity")
+ Dim subfolderindex As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetDirectories(ConversionPath)
+ For Each subfolder In subfolderindex
+ Dim SubfolderName As String = subfolder.Replace(ConversionPath + "\", "")
+ If Not ExcludedSubfolders.Contains(SubfolderName) Then
+ My.Computer.FileSystem.CreateDirectory(OutputLocation + "\" + SubfolderName)
+ End If
+ Next
+ End If
+ For Each file In fileindex
+ Dim FileType As String = " entity "
+ If file.EndsWith(".mesh") Then
+ FileType = " mesh "
+ ElseIf file.EndsWith(".particle") Then
+ FileType = " particle "
+ ElseIf file.EndsWith(".brushes") Then
+ FileType = " brushes "
+ ElseIf file.EndsWith(".entity") Then
+ FileType = " entity "
+ End If
+ Dim Converter As String = "ConvertData_OriginalSins.exe"
+ If UsingSins Then
+ Converter = "ConvertData_OriginalSins.exe"
+ ElseIf UsingEntrench Then
+ Converter = "ConvertData_Entrenchment.exe"
+ ElseIf UsingDiplo Then
+ Converter = "ConvertData_Diplomacy.exe"
+ ElseIf UsingRebel Then
+ Converter = "ConvertData_Rebellion.exe"
+ End If
+ Dim Format As String
+ If ConvertToTXT Then
+ Format = " txt"
+ Else
+ Format = ""
+ End If
+ If Not UsingSubfolders Then
+ writer.WriteLine(Converter + FileType + """" + file + """ """ + OutputLocation + file.Remove(0, file.LastIndexOf("\")) + """" + Format)
+ Else
+ writer.WriteLine(Converter + FileType + """" + file + """ """ + OutputLocation + file.Replace(ConversionPath, "") + """" + Format)
+ End If
+ Next
+ End If
+ End If
+ If My.Settings.Logging Then
+ writer.WriteLine("copy """ + AppData + "\sinsconversion.bat"" " + My.Computer.FileSystem.SpecialDirectories.Desktop)
+ End If
+ writer.WriteLine("del """ + AppData + "\sinsconversion.bat""")
+ writer.Close()
+ Shell(AppData + "\sinsconversion.bat", AppWinStyle.Hide, True)
+ MsgBox("Conversion complete!", , "Success")
+ Dispatcher.Invoke(New cleanupthreaddataDelegate(AddressOf EndConversion))
+ End Sub
+
+ Private Sub btnHelp_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnHelp.Click
+ My.Windows.Instructions.ShowDialog()
+ End Sub
+
+ Private Sub btnCustom_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnCustom.Click
+ Dim CustomLocation As New System.Windows.Forms.OpenFileDialog
+ CustomLocation.Filter = "ConvertData|*.exe"
+ CustomLocation.FilterIndex = 1
+ CustomLocation.Title = "Select a custom ConvertData executable..."
+ CustomLocation.InitialDirectory = "Desktop"
+ If CustomLocation.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ CustomOn(sender, e, CustomLocation.FileName)
+ End If
+ End Sub
+
+ Private Sub btnTheme_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
+ Me.Height = 457
+ End Sub
+
+ Private Sub LoadTheme(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
+ Dim NewBG As New ImageBrush
+ Dim BGSource As System.Windows.Media.ImageSource
+ If My.Settings.Theme = 2 Then
+ BGSource = New BitmapImage(New Uri("/Images/skybox02environmentcube.png", UriKind.Relative))
+ NewBG.ImageSource = BGSource
+ Me.Background = NewBG
+ End If
+ End Sub
+
+ Private Sub MainWindow_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
+ GetRegistryPaths()
+ If CheckPathForGames(False) = False Then
+ If MsgBox("Sins is not properly installed on your computer. Would you like to set a custom default path for the game?", MsgBoxStyle.YesNo, "Attention") = MsgBoxResult.Yes Then
+ SetCustomGamePath()
+ End If
+ End If
+ If Not My.Settings.SavedEXE = "" Then
+ CustomOn(sender, e, My.Settings.SavedEXE)
+ End If
+ If My.Settings.Logging = True Then
+ btnLog.IsChecked = True
+ End If
+ End Sub
+
+ Private Sub btnInPlace_Checked(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnInPlace.Checked
+ If Not txtSource.Text Is Nothing _
+ And Not txtSource.Text = "" Then
+ If PathType = "file" Then
+ txtOutput.Text = txtSource.Text.Remove(txtSource.Text.LastIndexOf("\"))
+ ElseIf PathType = "folder" Then
+ txtOutput.Text = txtSource.Text
+ End If
+ OutputSelectedAnimation(sender, e)
+ Else
+ btnInPlace.IsChecked = False
+ Dim Sequence As New System.Windows.Media.Animation.Storyboard
+ Dim SourceSelected1 As New System.Windows.Media.Animation.ColorAnimation
+ SourceSelected1.To = Colors.Red
+ SourceSelected1.Duration = TimeSpan.FromSeconds(0.5)
+ SourceSelected1.AutoReverse = True
+ Dim Brush As New SolidColorBrush
+ Brush.Color = Colors.White
+ lblConvert.Foreground = Brush
+ Me.RegisterName("ForeColor", Brush)
+ Animation.Storyboard.SetTargetName(SourceSelected1, "ForeColor")
+ Animation.Storyboard.SetTargetProperty(SourceSelected1, New PropertyPath(SolidColorBrush.ColorProperty))
+ Sequence.Children.Add(SourceSelected1)
+ Sequence.Begin(Me)
+ Me.UnregisterName("ForeColor")
+ End If
+ End Sub
+
+ Private Sub btnFile_Drop(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles btnFile.Drop
+ If e.Data.GetDataPresent("FileNameW", False) Then
+ Dim names As System.Array = CType(e.Data.GetData("FileNameW", False), System.Array)
+ Dim Path As String = CStr(names.GetValue(0))
+ If Path.EndsWith(".entity") _
+ Or Path.EndsWith(".mesh") _
+ Or Path.EndsWith(".particle") _
+ Or Path.EndsWith(".brushes") Then
+ AcceptSourceFile(sender, e, CStr(names.GetValue(0)))
+ Else
+ MsgBox("Invalid file type", , "Error")
+ End If
+ End If
+ End Sub
+
+ Private Sub btnFile_DragOver(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles btnFile.DragOver
+ If e.Data.GetDataPresent("FileNameW", False) Then
+ e.Effects = DragDropEffects.Copy
+ Else
+ e.Effects = DragDropEffects.None
+ End If
+ End Sub
+
+ Private Sub btnFolder_Drop(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles btnFolder.Drop
+ If e.Data.GetDataPresent("FileNameW", False) Then
+ Dim names As System.Array = CType(e.Data.GetData("FileNameW", False), System.Array)
+ AcceptSourceFolder(sender, e, CStr(names.GetValue(0)))
+ End If
+ End Sub
+
+ Private Sub btnFolder_DragOver(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles btnFolder.DragOver
+ If e.Data.GetDataPresent("FileNameW", False) Then
+ e.Effects = DragDropEffects.Copy
+ Else
+ e.Effects = DragDropEffects.None
+ End If
+ End Sub
+
+ Private Sub btnOutput_Drop(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles btnOutput.Drop
+ If e.Data.GetDataPresent("FileNameW", False) Then
+ Dim names As System.Array = CType(e.Data.GetData("FileNameW", False), System.Array)
+ txtOutput.Text = CStr(names.GetValue(0))
+ OutputSelectedAnimation(sender, e)
+ End If
+ End Sub
+
+ Private Sub btnOutput_DragOver(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles btnOutput.DragOver
+ If e.Data.GetDataPresent("FileNameW", False) Then
+ e.Effects = DragDropEffects.Copy
+ Else
+ e.Effects = DragDropEffects.None
+ End If
+ End Sub
+
+ Private Sub btnSourcePasteFolder_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSourcePasteFolder.Click
+ Dim iData As IDataObject = Clipboard.GetDataObject()
+ If iData.GetDataPresent(DataFormats.Text) Then
+ AcceptSourceFolder(sender, e, iData.GetData(DataFormats.Text))
+ End If
+ End Sub
+
+ Private Sub btnOutputPasteFolder_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnOutputPasteFolder.Click
+ Dim iData As IDataObject = Clipboard.GetDataObject()
+ If iData.GetDataPresent(DataFormats.Text) Then
+ txtOutput.Text = iData.GetData(DataFormats.Text)
+ OutputSelectedAnimation(sender, e)
+ End If
+ End Sub
+
+ Private Sub btnSub_Checked(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSub.Checked
+ Me.Width = 729
+ RetrieveSubfolders(sender, e)
+ End Sub
+
+ Private Sub btnSub_Unchecked(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSub.Unchecked
+ Me.Width = 497
+ ClearSubfolders(sender, e)
+ End Sub
+
+ Private Sub btnConvert_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnConvert.Click
+ UsingSins = btnSins.IsChecked
+ UsingEntrench = btnEntrenchment.IsChecked
+ UsingDiplo = btnDiplomacy.IsChecked
+ UsingRebel = btnRebellion.IsChecked
+ ConversionPath = txtSource.Text
+ OutputLocation = txtOutput.Text
+ UsingSubfolders = btnSub.IsChecked
+ If UsingSubfolders Then
+ ExcludedSubfolders = lstSubfolders.SelectedItems
+ End If
+ ConvertToTXT = btnToTXT.IsChecked
+ ConvertToBIN = btnToBIN.IsChecked
+ MainWindow.IsEnabled = False
+ prgsConversion.IsIndeterminate = True
+ Dim ConversionThread As New Thread(AddressOf Conversion)
+ ConversionThread.IsBackground = True
+ ConversionThread.Start()
+ End Sub
+
+ Private Sub EndConversion()
+ prgsConversion.IsIndeterminate = False
+ MainWindow.IsEnabled = True
+ End Sub
+
+ Private Sub btnAdvanced_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnAdvanced.Click
+ Dim AdvancedWindow As New AdvancedWindow
+ AdvancedWindow.Show()
+ Me.Close()
+ End Sub
+
+ Private Sub btnLog_Checked(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnLog.Checked
+ My.Settings.Logging = True
+ End Sub
+
+ Private Sub btnLog_Unchecked(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnLog.Unchecked
+ My.Settings.Logging = False
+ End Sub
+End Class
\ No newline at end of file
diff --git a/SinsDataConverter/My Project/AssemblyInfo.vb b/SinsDataConverter/My Project/AssemblyInfo.vb
new file mode 100644
index 0000000..77709d3
--- /dev/null
+++ b/SinsDataConverter/My Project/AssemblyInfo.vb
@@ -0,0 +1,59 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+Imports System.Globalization
+Imports System.Resources
+Imports System.Windows
+
+' 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.
+
+' Review the values of the assembly attributes
+
+
+
+
+
+
+
+
+
+'In order to begin building localizable applications, set
+'CultureYouAreCodingWith in your .vbproj file
+'inside a . For example, if you are using US english
+'in your source files, set the to "en-US". Then uncomment the
+'NeutralResourceLanguage attribute below. Update the "en-US" in the line
+'below to match the UICulture setting in the project file.
+
+'
+
+
+'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
+'1st parameter: where theme specific resource dictionaries are located
+'(used if a resource is not found in the page,
+' or application resource dictionaries)
+
+'2nd parameter: where the generic resource dictionary is located
+'(used if a resource is not found in the page,
+'app, and any theme specific resource dictionaries)
+
+
+
+
+'The following GUID is for the ID of the typelib if this project is exposed to COM
+
+
+' 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:
+'
+
+
+
diff --git a/SinsDataConverter/My Project/MyExtensions/MyWpfExtension.vb b/SinsDataConverter/My Project/MyExtensions/MyWpfExtension.vb
new file mode 100644
index 0000000..22f84b7
--- /dev/null
+++ b/SinsDataConverter/My Project/MyExtensions/MyWpfExtension.vb
@@ -0,0 +1,121 @@
+#If _MyType <> "Empty" Then
+
+Namespace My
+ '''
+ ''' Module used to define the properties that are available in the My Namespace for WPF
+ '''
+ '''
+ _
+ Module MyWpfExtension
+ Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer)
+ Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User)
+ Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows)
+ Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log)
+ '''
+ ''' Returns the application object for the running application
+ '''
+ _
+ Friend ReadOnly Property Application() As Application
+ Get
+ Return CType(Global.System.Windows.Application.Current, Application)
+ End Get
+ End Property
+ '''
+ ''' Returns information about the host computer.
+ '''
+ _
+ Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer
+ Get
+ Return s_Computer.GetInstance()
+ End Get
+ End Property
+ '''
+ ''' Returns information for the current user. If you wish to run the application with the current
+ ''' Windows user credentials, call My.User.InitializeWithWindowsUser().
+ '''
+ _
+ Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User
+ Get
+ Return s_User.GetInstance()
+ End Get
+ End Property
+ '''
+ ''' Returns the application log. The listeners can be configured by the application's configuration file.
+ '''
+ _
+ Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log
+ Get
+ Return s_Log.GetInstance()
+ End Get
+ End Property
+
+ '''
+ ''' Returns the collection of Windows defined in the project.
+ '''
+ _
+ Friend ReadOnly Property Windows() As MyWindows
+ _
+ Get
+ Return s_Windows.GetInstance()
+ End Get
+ End Property
+ _
+ _
+ Friend NotInheritable Class MyWindows
+ _
+ Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T
+ If Instance Is Nothing Then
+ If s_WindowBeingCreated IsNot Nothing Then
+ If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then
+ Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.")
+ End If
+ Else
+ s_WindowBeingCreated = New Global.System.Collections.Hashtable()
+ End If
+ s_WindowBeingCreated.Add(GetType(T), Nothing)
+ Return New T()
+ s_WindowBeingCreated.Remove(GetType(T))
+ Else
+ Return Instance
+ End If
+ End Function
+ _
+ _
+ Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T)
+ instance = Nothing
+ End Sub
+ _
+ _
+ Public Sub New()
+ MyBase.New()
+ End Sub
+ Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable
+ Public Overrides Function Equals(ByVal o As Object) As Boolean
+ Return MyBase.Equals(o)
+ End Function
+ Public Overrides Function GetHashCode() As Integer
+ Return MyBase.GetHashCode
+ End Function
+ _
+ _
+ Friend Overloads Function [GetType]() As Global.System.Type
+ Return GetType(MyWindows)
+ End Function
+ Public Overrides Function ToString() As String
+ Return MyBase.ToString
+ End Function
+ End Class
+ End Module
+End Namespace
+Partial Class Application
+ Inherits Global.System.Windows.Application
+ _
+ _
+ Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo
+ _
+ Get
+ Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly())
+ End Get
+ End Property
+End Class
+#End If
\ No newline at end of file
diff --git a/SinsDataConverter/My Project/Resources.Designer.vb b/SinsDataConverter/My Project/Resources.Designer.vb
new file mode 100644
index 0000000..e7ecddc
--- /dev/null
+++ b/SinsDataConverter/My Project/Resources.Designer.vb
@@ -0,0 +1,62 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:$clrversion$
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My.Resources
+
+ '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.
+ '''
+ ''' A strongly-typed resource class, for looking up localized strings, etc.
+ '''
+ _
+ Friend Module Resources
+
+ Private resourceMan As Global.System.Resources.ResourceManager
+
+ Private resourceCulture As Global.System.Globalization.CultureInfo
+
+ '''
+ ''' Returns the cached ResourceManager instance used by this class.
+ '''
+ _
+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+ Get
+ If Object.ReferenceEquals(resourceMan, Nothing) Then
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$safeprojectname$.Resources", GetType(Resources).Assembly)
+ resourceMan = temp
+ End If
+ Return resourceMan
+ End Get
+ End Property
+
+ '''
+ ''' Overrides the current thread's CurrentUICulture property for all
+ ''' resource lookups using this strongly typed resource class.
+ '''
+ _
+ Friend Property Culture() As Global.System.Globalization.CultureInfo
+ Get
+ Return resourceCulture
+ End Get
+ Set(ByVal value As Global.System.Globalization.CultureInfo)
+ resourceCulture = value
+ End Set
+ End Property
+ End Module
+End Namespace
diff --git a/SinsDataConverter/My Project/Resources.resx b/SinsDataConverter/My Project/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/SinsDataConverter/My Project/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/SinsDataConverter/My Project/Settings.Designer.vb b/SinsDataConverter/My Project/Settings.Designer.vb
new file mode 100644
index 0000000..b0e8e98
--- /dev/null
+++ b/SinsDataConverter/My Project/Settings.Designer.vb
@@ -0,0 +1,119 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.237
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+
+ _
+Partial Friend NotInheritable Class MySettings
+ Inherits Global.System.Configuration.ApplicationSettingsBase
+
+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+
+#Region "My.Settings Auto-Save Functionality"
+#If _MyType = "WindowsForms" Then
+ Private Shared addedHandler As Boolean
+
+ Private Shared addedHandlerLockObject As New Object
+
+ _
+ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
+ If My.Application.SaveMySettingsOnExit Then
+ My.Settings.Save()
+ End If
+ End Sub
+#End If
+#End Region
+
+ Public Shared ReadOnly Property [Default]() As MySettings
+ Get
+
+#If _MyType = "WindowsForms" Then
+ If Not addedHandler Then
+ SyncLock addedHandlerLockObject
+ If Not addedHandler Then
+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+ addedHandler = True
+ End If
+ End SyncLock
+ End If
+#End If
+ Return defaultInstance
+ End Get
+ End Property
+
+ _
+ Public Property Theme() As Integer
+ Get
+ Return CType(Me("Theme"),Integer)
+ End Get
+ Set
+ Me("Theme") = value
+ End Set
+ End Property
+
+ _
+ Public Property SavedEXE() As String
+ Get
+ Return CType(Me("SavedEXE"),String)
+ End Get
+ Set
+ Me("SavedEXE") = value
+ End Set
+ End Property
+
+ _
+ Public Property SavedInstall() As String
+ Get
+ Return CType(Me("SavedInstall"),String)
+ End Get
+ Set
+ Me("SavedInstall") = value
+ End Set
+ End Property
+
+ _
+ Public Property Logging() As Boolean
+ Get
+ Return CType(Me("Logging"),Boolean)
+ End Get
+ Set
+ Me("Logging") = value
+ End Set
+ End Property
+End Class
+
+Namespace My
+
+ _
+ Friend Module MySettingsProperty
+
+ _
+ Friend ReadOnly Property Settings() As Global.SinsDataConverter.MySettings
+ Get
+ Return Global.SinsDataConverter.MySettings.Default
+ End Get
+ End Property
+ End Module
+End Namespace
diff --git a/SinsDataConverter/My Project/Settings.settings b/SinsDataConverter/My Project/Settings.settings
new file mode 100644
index 0000000..ccdd03e
--- /dev/null
+++ b/SinsDataConverter/My Project/Settings.settings
@@ -0,0 +1,18 @@
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+ False
+
+
+
\ No newline at end of file
diff --git a/SinsDataConverter/ReferenceData.xaml b/SinsDataConverter/ReferenceData.xaml
new file mode 100644
index 0000000..ecc07f2
--- /dev/null
+++ b/SinsDataConverter/ReferenceData.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SinsDataConverter/ReferenceData.xaml.vb b/SinsDataConverter/ReferenceData.xaml.vb
new file mode 100644
index 0000000..2ef585a
--- /dev/null
+++ b/SinsDataConverter/ReferenceData.xaml.vb
@@ -0,0 +1,40 @@
+Public Class ReferenceData
+
+ Dim folders As New System.Windows.Forms.FolderBrowserDialog
+ Dim RegPath As Microsoft.Win32.RegistryKey
+ Dim SinsDir As String
+
+ Private Sub btnSins_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSins.Click
+ folders.Description = "Select a location to save ReferenceData"
+ If folders.ShowDialog() = Windows.Forms.DialogResult.OK Then
+ Dim RDOutput As String = folders.SelectedPath
+ If IntPtr.Size = 8 Then
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sins", False)
+ Try
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex As NullReferenceException
+ Try
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Stardock\Drengin.net\sinstrinity", False)
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex2 As NullReferenceException
+ MsgBox("Sins is not properly installed on this computer!", , "Error")
+ Return
+ End Try
+ End Try
+ Else
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sins", False)
+ Try
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex As NullReferenceException
+ Try
+ RegPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Stardock\Drengin.net\sinstrinity", False)
+ SinsDir = RegPath.GetValue("Path")
+ Catch ex2 As NullReferenceException
+ MsgBox("Sins is not properly installed on this computer!", , "Error")
+ Return
+ End Try
+ End Try
+ End If
+ End If
+ End Sub
+End Class
diff --git a/SinsDataConverter/SDCv20icon.ico b/SinsDataConverter/SDCv20icon.ico
new file mode 100644
index 0000000..43b7bf8
Binary files /dev/null and b/SinsDataConverter/SDCv20icon.ico differ
diff --git a/SinsDataConverter/Settings.vb b/SinsDataConverter/Settings.vb
new file mode 100644
index 0000000..2761a7f
--- /dev/null
+++ b/SinsDataConverter/Settings.vb
@@ -0,0 +1,7 @@
+'This class allows you to handle specific events on the settings class:
+' The SettingChanging event is raised before a setting's value is changed.
+' The PropertyChanged event is raised after a setting's value is changed.
+' The SettingsLoaded event is raised after the setting values are loaded.
+' The SettingsSaving event is raised before the setting values are saved.
+Partial Friend NotInheritable Class MySettings
+End Class
diff --git a/SinsDataConverter/SinsDataConverter.snk b/SinsDataConverter/SinsDataConverter.snk
new file mode 100644
index 0000000..e64a6d5
Binary files /dev/null and b/SinsDataConverter/SinsDataConverter.snk differ
diff --git a/SinsDataConverter/SinsDataConverter.vbproj b/SinsDataConverter/SinsDataConverter.vbproj
new file mode 100644
index 0000000..f48fbd8
--- /dev/null
+++ b/SinsDataConverter/SinsDataConverter.vbproj
@@ -0,0 +1,293 @@
+
+
+
+ Debug
+ x86
+ {F2E67D99-C41B-4E11-82B3-38F162C242F6}
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
+ WinExe
+ SinsDataConverter
+ SinsDataConverter
+ v3.0
+ Custom
+ false
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ true
+
+
+ x86
+ true
+ full
+ true
+ true
+ true
+ bin\Debug\
+ SinsDataConverter.xml
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+
+
+ x86
+ pdbonly
+ false
+ false
+ true
+ false
+ true
+ bin\Release\
+ SinsDataConverter.xml
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+
+
+ On
+
+
+ Binary
+
+
+ Off
+
+
+ On
+
+
+ SDCv20icon.ico
+
+
+ true
+
+
+ SinsDataConverter.snk
+
+
+ true
+ true
+ true
+ bin\x64\Debug\
+ SinsDataConverter.xml
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+ full
+ x64
+ false
+ false
+
+
+ true
+ bin\x64\Release\
+ SinsDataConverter.xml
+ true
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+ pdbonly
+ x64
+
+
+ true
+ true
+ true
+ bin\Debug\
+ SinsDataConverter.xml
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+ full
+ AnyCPU
+ false
+ false
+
+
+ true
+ bin\Release\
+ SinsDataConverter.xml
+ true
+ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314
+ pdbonly
+ AnyCPU
+
+
+
+ ..\..\LetterRenameUtility_WPF\LetterRenameUtility_WPF\bin\Release\LetterRenameUtility_WPF.exe
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ AdvancedWindow.xaml
+
+
+ ReferenceData.xaml
+
+
+
+ Subfolders.xaml
+
+
+ Themes.xaml
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Application.xaml
+ Code
+
+
+ Instructions.xaml
+
+
+ MainWindow.xaml
+ Code
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Microsoft.VisualBasic.WPF.MyExtension
+ 1.0.0.0
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ VbMyResourcesResXFileCodeGenerator
+ Resources.Designer.vb
+ My.Resources
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.vb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+ Exclude
+ True
+ Assembly
+
+
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ true
+
+
+ False
+ Windows Installer 3.1
+ true
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SinsDataConverter/Subfolders.xaml b/SinsDataConverter/Subfolders.xaml
new file mode 100644
index 0000000..a99f49a
--- /dev/null
+++ b/SinsDataConverter/Subfolders.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
diff --git a/SinsDataConverter/Subfolders.xaml.vb b/SinsDataConverter/Subfolders.xaml.vb
new file mode 100644
index 0000000..08b2898
--- /dev/null
+++ b/SinsDataConverter/Subfolders.xaml.vb
@@ -0,0 +1,6 @@
+Public Class Subfolders
+
+ Public Shared Sub AddSubfolders(ByVal sender As Object, ByVal e As RoutedEventArgs, ByVal Item As String)
+
+ End Sub
+End Class
diff --git a/SinsDataConverter/Themes.xaml b/SinsDataConverter/Themes.xaml
new file mode 100644
index 0000000..93cfb0c
--- /dev/null
+++ b/SinsDataConverter/Themes.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SinsDataConverter/Themes.xaml.vb b/SinsDataConverter/Themes.xaml.vb
new file mode 100644
index 0000000..688bce2
--- /dev/null
+++ b/SinsDataConverter/Themes.xaml.vb
@@ -0,0 +1,10 @@
+Public Class Themes
+
+ Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnBack.Click
+ Me.Hide()
+ End Sub
+
+ Private Sub imgTheme2_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles imgTheme2.MouseDown
+ My.Settings.Theme = 2
+ End Sub
+End Class
diff --git a/SinsDataConverter/app.config b/SinsDataConverter/app.config
new file mode 100644
index 0000000..b4d3135
--- /dev/null
+++ b/SinsDataConverter/app.config
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+ False
+
+
+
+
diff --git a/SinsDataConverter/sdc.ico b/SinsDataConverter/sdc.ico
new file mode 100644
index 0000000..4d72684
Binary files /dev/null and b/SinsDataConverter/sdc.ico differ