├── .gitignore
├── LICENSE
├── README.md
├── TelltaleModLauncher.sln
├── TelltaleModLauncher
├── App.config
├── App.xaml
├── App.xaml.cs
├── AppSettings.cs
├── Files
│ ├── AppSettingsFile.cs
│ ├── GameVersionSettings.cs
│ └── Mod.cs
├── GameVersion.cs
├── IconExtractor.dll
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── ModManager.cs
├── ModManager_ViewMod.xaml
├── ModManager_ViewMod.xaml.cs
├── ModManager_ViewMod_ViewText.xaml
├── ModManager_ViewMod_ViewText.xaml.cs
├── Mod_ResdescEdit.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── SetupWizard_Window.xaml
├── SetupWizard_Window.xaml.cs
├── TelltaleModLauncher.csproj
├── Utillities
│ ├── IOManagement.cs
│ └── MessageBoxes.cs
├── icon.ico
└── packages.config
├── changes.txt
└── screenshots
├── mod-install-tut
├── 1-download.png
├── 1_1archive.png
├── 1_2archive.png
├── 2-open.png
├── 3-locateandadd.png
└── 4-done.png
├── shot1.png
└── shot2.png
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Aa][Rr][Mm]/
27 | [Aa][Rr][Mm]64/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Ll]og/
32 | [Ll]ogs/
33 |
34 | # Visual Studio 2015/2017 cache/options directory
35 | .vs/
36 | # Uncomment if you have tasks that create the project's static files in wwwroot
37 | #wwwroot/
38 |
39 | # Visual Studio 2017 auto generated files
40 | Generated\ Files/
41 |
42 | # MSTest test Results
43 | [Tt]est[Rr]esult*/
44 | [Bb]uild[Ll]og.*
45 |
46 | # NUnit
47 | *.VisualState.xml
48 | TestResult.xml
49 | nunit-*.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # Benchmark Results
57 | BenchmarkDotNet.Artifacts/
58 |
59 | # .NET Core
60 | project.lock.json
61 | project.fragment.lock.json
62 | artifacts/
63 |
64 | # StyleCop
65 | StyleCopReport.xml
66 |
67 | # Files built by Visual Studio
68 | *_i.c
69 | *_p.c
70 | *_h.h
71 | *.ilk
72 | *.meta
73 | *.obj
74 | *.iobj
75 | *.pch
76 | *.pdb
77 | *.ipdb
78 | *.pgc
79 | *.pgd
80 | *.rsp
81 | *.sbr
82 | *.tlb
83 | *.tli
84 | *.tlh
85 | *.tmp
86 | *.tmp_proj
87 | *_wpftmp.csproj
88 | *.log
89 | *.vspscc
90 | *.vssscc
91 | .builds
92 | *.pidb
93 | *.svclog
94 | *.scc
95 |
96 | # Chutzpah Test files
97 | _Chutzpah*
98 |
99 | # Visual C++ cache files
100 | ipch/
101 | *.aps
102 | *.ncb
103 | *.opendb
104 | *.opensdf
105 | *.sdf
106 | *.cachefile
107 | *.VC.db
108 | *.VC.VC.opendb
109 |
110 | # Visual Studio profiler
111 | *.psess
112 | *.vsp
113 | *.vspx
114 | *.sap
115 |
116 | # Visual Studio Trace Files
117 | *.e2e
118 |
119 | # TFS 2012 Local Workspace
120 | $tf/
121 |
122 | # Guidance Automation Toolkit
123 | *.gpState
124 |
125 | # ReSharper is a .NET coding add-in
126 | _ReSharper*/
127 | *.[Rr]e[Ss]harper
128 | *.DotSettings.user
129 |
130 | # TeamCity is a build add-in
131 | _TeamCity*
132 |
133 | # DotCover is a Code Coverage Tool
134 | *.dotCover
135 |
136 | # AxoCover is a Code Coverage Tool
137 | .axoCover/*
138 | !.axoCover/settings.json
139 |
140 | # Visual Studio code coverage results
141 | *.coverage
142 | *.coveragexml
143 |
144 | # NCrunch
145 | _NCrunch_*
146 | .*crunch*.local.xml
147 | nCrunchTemp_*
148 |
149 | # MightyMoose
150 | *.mm.*
151 | AutoTest.Net/
152 |
153 | # Web workbench (sass)
154 | .sass-cache/
155 |
156 | # Installshield output folder
157 | [Ee]xpress/
158 |
159 | # DocProject is a documentation generator add-in
160 | DocProject/buildhelp/
161 | DocProject/Help/*.HxT
162 | DocProject/Help/*.HxC
163 | DocProject/Help/*.hhc
164 | DocProject/Help/*.hhk
165 | DocProject/Help/*.hhp
166 | DocProject/Help/Html2
167 | DocProject/Help/html
168 |
169 | # Click-Once directory
170 | publish/
171 |
172 | # Publish Web Output
173 | *.[Pp]ublish.xml
174 | *.azurePubxml
175 | # Note: Comment the next line if you want to checkin your web deploy settings,
176 | # but database connection strings (with potential passwords) will be unencrypted
177 | *.pubxml
178 | *.publishproj
179 |
180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
181 | # checkin your Azure Web App publish settings, but sensitive information contained
182 | # in these scripts will be unencrypted
183 | PublishScripts/
184 |
185 | # NuGet Packages
186 | *.nupkg
187 | # NuGet Symbol Packages
188 | *.snupkg
189 | # The packages folder can be ignored because of Package Restore
190 | **/[Pp]ackages/*
191 | # except build/, which is used as an MSBuild target.
192 | !**/[Pp]ackages/build/
193 | # Uncomment if necessary however generally it will be regenerated when needed
194 | #!**/[Pp]ackages/repositories.config
195 | # NuGet v3's project.json files produces more ignorable files
196 | *.nuget.props
197 | *.nuget.targets
198 |
199 | # Microsoft Azure Build Output
200 | csx/
201 | *.build.csdef
202 |
203 | # Microsoft Azure Emulator
204 | ecf/
205 | rcf/
206 |
207 | # Windows Store app package directories and files
208 | AppPackages/
209 | BundleArtifacts/
210 | Package.StoreAssociation.xml
211 | _pkginfo.txt
212 | *.appx
213 | *.appxbundle
214 | *.appxupload
215 |
216 | # Visual Studio cache files
217 | # files ending in .cache can be ignored
218 | *.[Cc]ache
219 | # but keep track of directories ending in .cache
220 | !?*.[Cc]ache/
221 |
222 | # Others
223 | ClientBin/
224 | ~$*
225 | *~
226 | *.dbmdl
227 | *.dbproj.schemaview
228 | *.jfm
229 | *.pfx
230 | *.publishsettings
231 | orleans.codegen.cs
232 |
233 | # Including strong name files can present a security risk
234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
235 | #*.snk
236 |
237 | # Since there are multiple workflows, uncomment next line to ignore bower_components
238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
239 | #bower_components/
240 |
241 | # RIA/Silverlight projects
242 | Generated_Code/
243 |
244 | # Backup & report files from converting an old project file
245 | # to a newer Visual Studio version. Backup files are not needed,
246 | # because we have git ;-)
247 | _UpgradeReport_Files/
248 | Backup*/
249 | UpgradeLog*.XML
250 | UpgradeLog*.htm
251 | ServiceFabricBackup/
252 | *.rptproj.bak
253 |
254 | # SQL Server files
255 | *.mdf
256 | *.ldf
257 | *.ndf
258 |
259 | # Business Intelligence projects
260 | *.rdl.data
261 | *.bim.layout
262 | *.bim_*.settings
263 | *.rptproj.rsuser
264 | *- [Bb]ackup.rdl
265 | *- [Bb]ackup ([0-9]).rdl
266 | *- [Bb]ackup ([0-9][0-9]).rdl
267 |
268 | # Microsoft Fakes
269 | FakesAssemblies/
270 |
271 | # GhostDoc plugin setting file
272 | *.GhostDoc.xml
273 |
274 | # Node.js Tools for Visual Studio
275 | .ntvs_analysis.dat
276 | node_modules/
277 |
278 | # Visual Studio 6 build log
279 | *.plg
280 |
281 | # Visual Studio 6 workspace options file
282 | *.opt
283 |
284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
285 | *.vbw
286 |
287 | # Visual Studio LightSwitch build output
288 | **/*.HTMLClient/GeneratedArtifacts
289 | **/*.DesktopClient/GeneratedArtifacts
290 | **/*.DesktopClient/ModelManifest.xml
291 | **/*.Server/GeneratedArtifacts
292 | **/*.Server/ModelManifest.xml
293 | _Pvt_Extensions
294 |
295 | # Paket dependency manager
296 | .paket/paket.exe
297 | paket-files/
298 |
299 | # FAKE - F# Make
300 | .fake/
301 |
302 | # CodeRush personal settings
303 | .cr/personal
304 |
305 | # Python Tools for Visual Studio (PTVS)
306 | __pycache__/
307 | *.pyc
308 |
309 | # Cake - Uncomment if you are using it
310 | # tools/**
311 | # !tools/packages.config
312 |
313 | # Tabs Studio
314 | *.tss
315 |
316 | # Telerik's JustMock configuration file
317 | *.jmconfig
318 |
319 | # BizTalk build output
320 | *.btp.cs
321 | *.btm.cs
322 | *.odx.cs
323 | *.xsd.cs
324 |
325 | # OpenCover UI analysis results
326 | OpenCover/
327 |
328 | # Azure Stream Analytics local run output
329 | ASALocalRun/
330 |
331 | # MSBuild Binary and Structured Log
332 | *.binlog
333 |
334 | # NVidia Nsight GPU debugger configuration file
335 | *.nvuser
336 |
337 | # MFractors (Xamarin productivity tool) working folder
338 | .mfractor/
339 |
340 | # Local History for Visual Studio
341 | .localhistory/
342 |
343 | # BeatPulse healthcheck temp database
344 | healthchecksdb
345 |
346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
347 | MigrationBackup/
348 |
349 | # Ionide (cross platform F# VS Code tools) working folder
350 | .ionide/
351 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Telltale Modding Group
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Telltale Mod Launcher
2 |
3 | [](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/releases)
4 | [](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/releases)
5 |
6 | # [DOWNLOAD HERE](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/releases)!
7 |
8 | **Releases are now being put out! You can get them [HERE](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/releases)!**
9 | **If you need help or have questions about the application, click [HERE](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/wiki/%5BHelp%5D-Application-Setup)!**
10 | **If your looking for Mods to get, supported mods can be found [HERE](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/wiki/Supported-Mods)!** **[Discord Server](https://discord.gg/rn8HvqZjZZ)**
11 |
12 | ## DISCLAIMER
13 | ***NOTE: This project is a work in progress. Some features have not been implemented just yet and there could be issues/bugs that you might encounter. If you do please follow [this](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/wiki/%5BHelp%5D---Reporting-an-Issue-or-Bug) to submit an issue.***
14 |
15 | ***NOTE (3/16/21): Creator functionality is being stripped and moved to the [Telltale Script Editor](https://github.com/Telltale-Modding-Group/Telltale-Script-Editor) as of the next release V0.7.0 which will be coming soon [(biggest update yet)](https://github.com/Telltale-Modding-Group/TelltaleModLauncher/blob/main/changes.txt).***
16 |
17 | ***NOTE (9/6/21): Apologies for the very very late update. I cannot predict when V0.7.0 will finally come but in the meantime I've updated the launcher to 0.6.5 which is mostly a quality-of-life update which makes the setup of the Launcher alot more simpler and less confusing (despite making a tutorial that is linked on this page that guides you how to set it up properly...)***
18 |
19 | ## Supported Games
20 | The launcher currently supports the following games.
21 | - **The Walking Dead Definitive Edition**
22 |
23 | NOTE: The installer has not been tested with any other Telltale game besides 'The Walking Dead Definitive Edition' though future support is planned.
24 |
25 | ## About
26 | This launcher is designed to make installing and managing mods for Telltale Games much easier through a very user friendly interface.
27 |
28 | **If you wish to make mods, we have the following tools avaliable.**
29 | - **[Texture Mods](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter)** **[(Tutorial)](https://github.com/Telltale-Modding-Group/DDS-D3DTX-Converter/wiki/%5BTutorial%5D--How-to-make-a-Texture-Mod-(Part-1))**
30 | - **[Scripting Mods](https://github.com/Telltale-Modding-Group/Telltale-Script-Editor)**
31 |
32 | Additional info can be found and asked in our **[Discord Server](https://discord.gg/rn8HvqZjZZ)**.
33 |
34 | 
35 |
--------------------------------------------------------------------------------
/TelltaleModLauncher.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30320.27
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelltaleModLauncher", "TelltaleModLauncher\TelltaleModLauncher.csproj", "{863D1CA8-665D-471B-850D-1926A7CB9227}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {863D1CA8-665D-471B-850D-1926A7CB9227}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {863D1CA8-665D-471B-850D-1926A7CB9227}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {863D1CA8-665D-471B-850D-1926A7CB9227}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {863D1CA8-665D-471B-850D-1926A7CB9227}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {6D15BB1E-53C0-4605-8315-AAA9CD858512}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/TelltaleModLauncher/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TelltaleModLauncher/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/TelltaleModLauncher/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace TelltaleModLauncher
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/TelltaleModLauncher/AppSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Threading;
7 | using System.Diagnostics;
8 | using System.IO;
9 | using System.Windows.Forms;
10 | using Newtonsoft;
11 | using Newtonsoft.Json;
12 | using Newtonsoft.Json.Linq;
13 | using Newtonsoft.Json.Serialization;
14 | using TelltaleModLauncher.Utillities;
15 | using TelltaleModLauncher.Files;
16 |
17 | namespace TelltaleModLauncher
18 | {
19 | ///
20 | /// Main class pertaining to the application settings.
21 | ///
22 | public class AppSettings
23 | {
24 | //public
25 | public string appVersionString = "v0.7.0";
26 |
27 | public AppSettingsFile appSettingsFile;
28 | public List GameVersionSettings { get; set; }
29 | public GameVersionSettings current_GameVersionSettings;
30 |
31 | //private
32 | private static string systemDocumentsPath = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
33 | private static string configFile_filename = "TelltaleModLauncher_Config.json";
34 | private static string configFile_directory_location = systemDocumentsPath + "/TelltaleModLauncher/";
35 | private static string configFile_file_location = configFile_directory_location + configFile_filename;
36 | private static string launcherHelpLink = "https://github.com/Telltale-Modding-Group/TelltaleModLauncher/wiki/%5BHelp%5D";
37 | private static string launcherHelpSetupLink = "https://github.com/Telltale-Modding-Group/TelltaleModLauncher/wiki/%5BHelp%5D-Application-Setup";
38 |
39 | ///
40 | /// Application Settings Class, creates an AppSettings object. This is called on application startup.
41 | /// If there is an existing config file, it will parse the data from it.
42 | /// If there is not an existing config file, or a TelltaleModLauncher directory, create a new one.
43 | ///
44 | public AppSettings()
45 | {
46 | if (File.Exists(configFile_file_location))
47 | {
48 | ReadConfigFile();
49 | }
50 | else
51 | {
52 | appSettingsFile = new AppSettingsFile();
53 | New_GameVersionSettingsList();
54 |
55 | if (!Directory.Exists(configFile_directory_location))
56 | IOManagement.CreateDirectory(configFile_directory_location);
57 |
58 | WriteToFile();
59 | }
60 | }
61 |
62 | ///
63 | /// Launches the exe that is found in the current selected game version exe location.
64 | ///
65 | public void LaunchGame()
66 | {
67 | ProcessStartInfo processStartInfo = new ProcessStartInfo();
68 | processStartInfo.FileName = current_GameVersionSettings.Game_LocationExe;
69 | processStartInfo.WorkingDirectory = current_GameVersionSettings.Game_Location;
70 |
71 | Process.Start(processStartInfo);
72 | }
73 |
74 | ///
75 | /// Changes the current game version to the desired game version.
76 | ///
77 | ///
78 | public void ChangeGameVersion(GameVersion newVersion)
79 | {
80 | foreach(GameVersionSettings gameVersionSetting in GameVersionSettings)
81 | {
82 | if(newVersion.Equals(gameVersionSetting.Game_Version))
83 | {
84 | current_GameVersionSettings = gameVersionSetting;
85 | return;
86 | }
87 | }
88 | }
89 |
90 | ///
91 | /// Creates a new game version settings list.
92 | ///
93 | private void New_GameVersionSettingsList()
94 | {
95 | GameVersionSettings = new List();
96 |
97 | var enumListString = Enum.GetNames(typeof(GameVersion));
98 |
99 | for (int i = 0; i < enumListString.Length; i++)
100 | {
101 | GameVersionSettings new_gameVersionSettings = new GameVersionSettings();
102 | new_gameVersionSettings.Game_Version = (GameVersion)Enum.Parse(typeof(GameVersion), enumListString[i]);
103 |
104 | GameVersionSettings.Add(new_gameVersionSettings);
105 | }
106 | }
107 |
108 | ///
109 | /// Reads and parses the data from the app config file.
110 | ///
111 | public void ReadConfigFile()
112 | {
113 | appSettingsFile = new AppSettingsFile();
114 | GameVersionSettings = new List();
115 |
116 | //read the data from the config file
117 | string jsonText = File.ReadAllText(configFile_file_location);
118 |
119 | //parse the data into a json array
120 | JArray array;
121 |
122 | try
123 | {
124 | array = JArray.Parse(jsonText);
125 | }
126 | catch(Exception e)
127 | {
128 | MessageBox.Show(e.ToString(), e.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
129 | return;
130 | }
131 |
132 | JObject AppSettingsFile_fromJson = array[0] as JObject;
133 | JArray GameVersionSettings_fromJson = array[1] as JArray;
134 |
135 | //loop through each property to get the data
136 | foreach (JProperty property in AppSettingsFile_fromJson.Properties())
137 | {
138 | string name = property.Name;
139 |
140 | if (name.Equals(nameof(appSettingsFile.Default_Game_Version)))
141 | appSettingsFile.Default_Game_Version = (GameVersion)(int)property.Value;
142 |
143 | if (name.Equals(nameof(appSettingsFile.UI_LightMode)))
144 | appSettingsFile.UI_LightMode = (bool)property.Value;
145 |
146 | if (name.Equals(nameof(appSettingsFile.UI_WindowDefocusing)))
147 | appSettingsFile.UI_WindowDefocusing = (bool)property.Value;
148 | }
149 |
150 | //loop through each property to get the data
151 | foreach (JObject obj in GameVersionSettings_fromJson.Children())
152 | {
153 | GameVersionSettings new_gameVersionSettings = new GameVersionSettings();
154 |
155 | //loop through each property to get the data
156 | foreach (JProperty property in obj.Properties())
157 | {
158 | string name = property.Name;
159 |
160 | if (name.Equals(nameof(current_GameVersionSettings.Game_Location)))
161 | new_gameVersionSettings.Game_Location = (string)property.Value;
162 |
163 | if (name.Equals(nameof(current_GameVersionSettings.Game_LocationExe)))
164 | new_gameVersionSettings.Game_LocationExe = (string)property.Value;
165 |
166 | if (name.Equals(nameof(current_GameVersionSettings.Game_Version)))
167 | new_gameVersionSettings.Game_Version = (GameVersion)(int)property.Value;
168 | }
169 |
170 | GameVersionSettings.Add(new_gameVersionSettings);
171 | }
172 |
173 | foreach(GameVersionSettings version in GameVersionSettings)
174 | {
175 | if (appSettingsFile.Default_Game_Version.Equals(version.Game_Version))
176 | current_GameVersionSettings = version;
177 | }
178 | }
179 |
180 | ///
181 | /// Writes existing values of the App Settings objects into the config file.
182 | ///
183 | public void WriteToFile()
184 | {
185 | if(File.Exists(configFile_file_location))
186 | IOManagement.DeleteFile(configFile_file_location);
187 |
188 | //open a stream writer to create the text file and write to it
189 | using (StreamWriter file = File.CreateText(configFile_file_location))
190 | {
191 | //get our json seralizer
192 | JsonSerializer serializer = new JsonSerializer();
193 |
194 | List