diff --git a/README.md b/README.md
index 1cb3f8a..741d636 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# GW2-UOAOU [![Current Version](https://img.shields.io/badge/version-0.2.1-blue)](https://github.com/fmmmlee/GW2-Addon-Updater/releases)
+# GW2-UOAOU [![Current Version](https://img.shields.io/badge/version-0.2.3-blue)](https://github.com/fmmmlee/GW2-Addon-Updater/releases)
##### Guild Wars 2 Unofficial Add-On Updater
A tool to update some Guild Wars 2 add-ons without having to manually go to each website, check version numbers, download and rename dlls, etc.
diff --git a/application/source/Add-On_Selector.xaml b/application/source/Add-On_Selector.xaml
index 5ffc900..515b138 100644
--- a/application/source/Add-On_Selector.xaml
+++ b/application/source/Add-On_Selector.xaml
@@ -64,6 +64,43 @@
+
@@ -79,13 +116,47 @@
+
Guild Wars 2 - Unofficial Add-On Updater
-
+
+ Game Path
+
+
+
+
+
@@ -110,7 +181,8 @@
FontFamily="Footlight MT Light"
FontSize="16"
BorderThickness="1"
- BorderBrush="#ff8787"
+ BorderBrush="#ff8787" Style="{DynamicResource BigContentButtons}"
+
>
diff --git a/application/source/Add-On_Selector.xaml.cs b/application/source/Add-On_Selector.xaml.cs
index d82119f..cf40686 100644
--- a/application/source/Add-On_Selector.xaml.cs
+++ b/application/source/Add-On_Selector.xaml.cs
@@ -1,6 +1,8 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -21,6 +23,8 @@ namespace GW2_Addon_Updater
///
public partial class Add_On_Selector : Page
{
+ static string working_directory = Directory.GetCurrentDirectory();
+ static string config_file_path = working_directory + "\\config.ini";
string no_d912pxy_and_gw2hook_msg = "d912pxy and Gw2 Hook are currently not compatible. " +
"Using this configuration will most likely result in the game crashing on launch. Are you sure you want to continue?";
@@ -30,10 +34,9 @@ public partial class Add_On_Selector : Page
public Add_On_Selector()
{
InitializeComponent();
+ game_path.Text = get_default_gamepath();
}
-
-
private void Box_Checked(object sender, RoutedEventArgs e)
{
@@ -118,5 +121,22 @@ private void update_button_clicked(object sender, RoutedEventArgs e)
this.NavigationService.Navigate(new Uri("Updating.xaml", UriKind.Relative));
}
+
+ private void Set_gamepath_Click(object sender, RoutedEventArgs e)
+ {
+ Application.Current.Properties["game_path"] = game_path.Text.Replace("\\", "\\\\");
+ string config_file = File.ReadAllText(config_file_path);
+ dynamic config_obj = JsonConvert.DeserializeObject(config_file);
+ config_obj.game_path = Application.Current.Properties["game_path"].ToString().Replace("\\\\","\\");
+ string edited_config_file = JsonConvert.SerializeObject(config_obj);
+ File.WriteAllText(config_file_path, edited_config_file);
+ }
+
+ private string get_default_gamepath()
+ {
+ string config_file = File.ReadAllText(config_file_path);
+ dynamic config_obj = JsonConvert.DeserializeObject(config_file);
+ return config_obj.game_path;
+ }
}
}
diff --git a/application/source/Updating.xaml b/application/source/Updating.xaml
index 11989e4..3b980a4 100644
--- a/application/source/Updating.xaml
+++ b/application/source/Updating.xaml
@@ -28,6 +28,7 @@
+