diff --git a/Heroesprofile.Uploader.Windows/App.config b/Heroesprofile.Uploader.Windows/App.config
index ef73bca..29d01a2 100644
--- a/Heroesprofile.Uploader.Windows/App.config
+++ b/Heroesprofile.Uploader.Windows/App.config
@@ -35,9 +35,6 @@
700
-
- False
-
None
@@ -56,21 +53,6 @@
False
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- False
-
diff --git a/Heroesprofile.Uploader.Windows/App.xaml.cs b/Heroesprofile.Uploader.Windows/App.xaml.cs
index 05fc873..a6a376d 100644
--- a/Heroesprofile.Uploader.Windows/App.xaml.cs
+++ b/Heroesprofile.Uploader.Windows/App.xaml.cs
@@ -135,11 +135,8 @@ private void Application_Startup(object sender, StartupEventArgs e)
Manager.PostMatchPage = Settings.PostMatchPage;
}
- if (ev.PropertyName == nameof(Settings.HPTwitchExtension)) {
- }
};
- Settings.HPTwitchValidated = TwitchSettingsValidator.Validate();
if (e.Args.Contains("--autorun") && Settings.MinimizeToTray) {
TrayIcon.Visible = true;
diff --git a/Heroesprofile.Uploader.Windows/Heroesprofile.Uploader.Windows.csproj b/Heroesprofile.Uploader.Windows/Heroesprofile.Uploader.Windows.csproj
index ef05891..1ce06a2 100644
--- a/Heroesprofile.Uploader.Windows/Heroesprofile.Uploader.Windows.csproj
+++ b/Heroesprofile.Uploader.Windows/Heroesprofile.Uploader.Windows.csproj
@@ -114,13 +114,9 @@
Designer
-
- TwitchExtensionValidationWindow.xaml
-
SettingsWindow.xaml
-
@@ -140,10 +136,6 @@
MainWindow.xaml
Code
-
- MSBuild:Compile
- Designer
-
Designer
MSBuild:Compile
diff --git a/Heroesprofile.Uploader.Windows/Properties/AssemblyInfo.cs b/Heroesprofile.Uploader.Windows/Properties/AssemblyInfo.cs
index db50207..70bfdee 100644
--- a/Heroesprofile.Uploader.Windows/Properties/AssemblyInfo.cs
+++ b/Heroesprofile.Uploader.Windows/Properties/AssemblyInfo.cs
@@ -52,6 +52,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.1.0")]
-[assembly: AssemblyFileVersion("2.1.0")]
+[assembly: AssemblyVersion("2.1.1")]
+[assembly: AssemblyFileVersion("2.1.1")]
[assembly: AssemblyInformationalVersion("1.0.0")]
diff --git a/Heroesprofile.Uploader.Windows/Properties/Settings.Designer.cs b/Heroesprofile.Uploader.Windows/Properties/Settings.Designer.cs
index 219e504..186a032 100644
--- a/Heroesprofile.Uploader.Windows/Properties/Settings.Designer.cs
+++ b/Heroesprofile.Uploader.Windows/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace Heroesprofile.Uploader.Windows.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -119,18 +119,6 @@ public int WindowWidth {
}
}
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool UploadToHotslogs {
- get {
- return ((bool)(this["UploadToHotslogs"]));
- }
- set {
- this["UploadToHotslogs"] = value;
- }
- }
-
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("None")]
@@ -202,79 +190,5 @@ public bool PostMatchPage {
this["PostMatchPage"] = value;
}
}
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string HPAPIEmail {
- get {
- return ((string)(this["HPAPIEmail"]));
- }
- set {
- this["HPAPIEmail"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string TwitchNickname {
- get {
- return ((string)(this["TwitchNickname"]));
- }
- set {
- this["TwitchNickname"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string HPKey {
- get {
- return ((string)(this["HPKey"]));
- }
- set {
- this["HPKey"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public int HPAPIUserID {
- get {
- return ((int)(this["HPAPIUserID"]));
- }
- set {
- this["HPAPIUserID"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool HPTwitchExtension {
- get {
- return ((bool)(this["HPTwitchExtension"]));
- }
- set {
- this["HPTwitchExtension"] = value;
- }
- }
-
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool HPTwitchValidated
- {
- get {
- return ((bool)(this["HPTwitchValidated"]));
- }
- set {
- this["HPTwitchValidated"] = value;
- }
- }
}
}
diff --git a/Heroesprofile.Uploader.Windows/Properties/Settings.settings b/Heroesprofile.Uploader.Windows/Properties/Settings.settings
index 5e6e42f..3e56066 100644
--- a/Heroesprofile.Uploader.Windows/Properties/Settings.settings
+++ b/Heroesprofile.Uploader.Windows/Properties/Settings.settings
@@ -26,9 +26,6 @@
700
-
- False
-
None
@@ -47,20 +44,5 @@
False
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- False
-
\ No newline at end of file
diff --git a/Heroesprofile.Uploader.Windows/SquirrelRelease.txt b/Heroesprofile.Uploader.Windows/SquirrelRelease.txt
index 8337100..63f086b 100644
--- a/Heroesprofile.Uploader.Windows/SquirrelRelease.txt
+++ b/Heroesprofile.Uploader.Windows/SquirrelRelease.txt
@@ -8,4 +8,4 @@
5: CD to Installer directory
-6: Squirrel --releasify=Heroesprofile.Uploader.2.1.0.nupkg --no-msi --setupIcon=uploader_icon_light.ico
\ No newline at end of file
+6: Squirrel --releasify=Heroesprofile.Uploader.2.1.1.nupkg --no-msi --setupIcon=uploader_icon_light.ico
\ No newline at end of file
diff --git a/Heroesprofile.Uploader.Windows/Themes/MetroDark/MetroDark.Heroesprofile.Implicit.xaml b/Heroesprofile.Uploader.Windows/Themes/MetroDark/MetroDark.Heroesprofile.Implicit.xaml
index 6b633ec..7eb2724 100644
--- a/Heroesprofile.Uploader.Windows/Themes/MetroDark/MetroDark.Heroesprofile.Implicit.xaml
+++ b/Heroesprofile.Uploader.Windows/Themes/MetroDark/MetroDark.Heroesprofile.Implicit.xaml
@@ -9,7 +9,6 @@
-
diff --git a/Heroesprofile.Uploader.Windows/TwitchExtensionValidationWindow.xaml b/Heroesprofile.Uploader.Windows/TwitchExtensionValidationWindow.xaml
deleted file mode 100644
index d3d51e9..0000000
--- a/Heroesprofile.Uploader.Windows/TwitchExtensionValidationWindow.xaml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Heroesprofile.Uploader.Windows/TwitchExtensionValidationWindow.xaml.cs b/Heroesprofile.Uploader.Windows/TwitchExtensionValidationWindow.xaml.cs
deleted file mode 100644
index 632db5e..0000000
--- a/Heroesprofile.Uploader.Windows/TwitchExtensionValidationWindow.xaml.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-
-using Heroesprofile.Uploader.Windows.Properties;
-
-namespace Heroesprofile.Uploader.Windows
-{
-
- ///
- /// Interaction logic for TwitchExtensionValidationWindow.xaml
- ///
- public partial class TwitchExtensionValidationWindow : Window
- {
- public string email { get; set; }
- public string twitch_nickname { get; set; }
- public string hp_key { get; set; }
-
- public TwitchExtensionValidationWindow()
- {
- InitializeComponent();
- this.DataContext = this;
-
- this.twitch_nickname = Settings.Default.TwitchNickname;
- this.hp_key = Settings.Default.HPKey;
- this.email = Settings.Default.HPAPIEmail;
- }
-
- private void validate_button_Click(object sender, RoutedEventArgs e)
- {
- Settings.Default.HPAPIEmail = email;
- Settings.Default.TwitchNickname = twitch_nickname;
- Settings.Default.HPKey = hp_key;
-
- // Always reset validation and disable the extension
- Settings.Default.HPTwitchValidated = false;
- Settings.Default.HPTwitchExtension = false;
-
- Settings.Default.HPTwitchValidated = TwitchSettingsValidator.Validate();
-
- validation_successful_label.Visibility = Settings.Default.HPTwitchValidated ? Visibility.Visible : Visibility.Hidden;
-
- validate_button.Content = Settings.Default.HPTwitchValidated ? "Validate" : "Validate (Try again)";
- validate_button.Visibility = Settings.Default.HPTwitchValidated ? Visibility.Hidden : Visibility.Visible;
-
- if (Settings.Default.HPTwitchValidated) {
- Settings.Default.Save();
- }
- }
- }
-}
diff --git a/Heroesprofile.Uploader.Windows/TwitchSettingsValidator.cs b/Heroesprofile.Uploader.Windows/TwitchSettingsValidator.cs
deleted file mode 100644
index 16a1772..0000000
--- a/Heroesprofile.Uploader.Windows/TwitchSettingsValidator.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-
-using System.Net;
-using System.Net.Http;
-using System.Net.Http.Headers;
-using NLog;
-using Heroesprofile.Uploader.Windows.Properties;
-using System.Diagnostics;
-
-namespace Heroesprofile.Uploader.Windows
-{
- public static class TwitchSettingsValidator
- {
- private static Logger _log = LogManager.GetCurrentClassLogger();
- private static readonly string validationUrl = @"twitch/validate/heroesprofile/token";
-
- public static bool Validate()
- {
- if (string.IsNullOrWhiteSpace(Settings.Default.HPAPIEmail) || string.IsNullOrWhiteSpace(Settings.Default.HPKey) || string.IsNullOrWhiteSpace(Settings.Default.HPAPIEmail)) {
- return false;
- }
-
-
- try {
- using (HttpClient client = new HttpClient() { BaseAddress = new Uri("https://api.heroesprofile.com/") }) {
-
- client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
-
- HttpResponseMessage response = client.GetAsync($"{validationUrl}?email={Settings.Default.HPAPIEmail}&twitch_nickname={Settings.Default.TwitchNickname}&hp_twitch_key={Settings.Default.HPKey}").Result;
-
- if (response.IsSuccessStatusCode) {
- if (int.TryParse(response.Content.ReadAsStringAsync().Result, out int value)) {
- _log.Info("Heroes Profile Twitch Extension Validation Successfull");
- Settings.Default.HPAPIUserID = value;
- return true;
- } else {
- Settings.Default.HPAPIUserID = 0;
- }
- } else {
- _log.Warn("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
- }
- }
-
- }
- catch (WebException ex) {
- _log.Warn("Twitch validation failure: " + ex.ToString());
- }
-
- return false;
- }
- }
-}