refactor(desktop): clean up unused code/fix warnings

This commit is contained in:
Anna 2020-11-27 19:37:34 -05:00
parent f18f959b51
commit 0082e157d7
8 changed files with 7 additions and 40 deletions

View File

@ -1,10 +0,0 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@ -41,12 +41,8 @@ namespace XIVChat_Desktop {
new ManageServer(this, server).ShowDialog(); new ManageServer(this, server).ShowDialog();
} }
private void ConfigWindow_OnContentRendered(object? sender, EventArgs e) {
this.InvalidateVisual();
}
private void NumericInputFilter(object sender, TextCompositionEventArgs e) { private void NumericInputFilter(object sender, TextCompositionEventArgs e) {
var allDigits = e.Text.All(c => char.IsDigit(c)); var allDigits = e.Text.All(char.IsDigit);
e.Handled = !allDigits; e.Handled = !allDigits;
} }

View File

@ -1,5 +1,4 @@
using System; using System.Windows;
using System.Windows;
namespace XIVChat_Desktop { namespace XIVChat_Desktop {
/// <summary> /// <summary>
@ -36,9 +35,5 @@ namespace XIVChat_Desktop {
this.Close(); this.Close();
} }
private void ConnectDialog_OnContentRendered(object? sender, EventArgs e) {
this.InvalidateVisual();
}
} }
} }

View File

@ -69,7 +69,7 @@ namespace XIVChat_Desktop {
return s.ToString(); return s.ToString();
} }
public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }

View File

@ -71,7 +71,7 @@ namespace XIVChat_Desktop {
this.Close(); this.Close();
} }
private static async Task<LicenceResponse> LicenceInfo(string key, bool increment = false) { internal static async Task<LicenceResponse> LicenceInfo(string key, bool increment = false) {
var uri = new Uri("https://api.gumroad.com/v2/licenses/verify"); var uri = new Uri("https://api.gumroad.com/v2/licenses/verify");
var data = new Dictionary<string, string> { var data = new Dictionary<string, string> {
["product_permalink"] = "kvQIw", ["product_permalink"] = "kvQIw",
@ -85,10 +85,6 @@ namespace XIVChat_Desktop {
return response; return response;
} }
private void LicenceWindow_OnContentRendered(object? sender, EventArgs e) {
this.InvalidateVisual();
}
} }
[JsonObject(NamingStrategyType = typeof(SnakeCaseNamingStrategy))] [JsonObject(NamingStrategyType = typeof(SnakeCaseNamingStrategy))]

View File

@ -1,5 +1,4 @@
using System; using System.Windows;
using System.Windows;
namespace XIVChat_Desktop { namespace XIVChat_Desktop {
/// <summary> /// <summary>
@ -73,9 +72,5 @@ namespace XIVChat_Desktop {
private void Cancel_Click(object sender, RoutedEventArgs e) { private void Cancel_Click(object sender, RoutedEventArgs e) {
this.Close(); this.Close();
} }
private void ManageServer_OnContentRendered(object? sender, EventArgs e) {
this.InvalidateVisual();
}
} }
} }

View File

@ -2,7 +2,7 @@
using Microsoft.Toolkit.Uwp.Notifications; using Microsoft.Toolkit.Uwp.Notifications;
namespace XIVChat_Desktop { namespace XIVChat_Desktop {
public class Notifications { public static class Notifications {
public static void Initialise() { public static void Initialise() {
DesktopNotificationManagerCompat.RegisterAumidAndComServer<XivChatNotificationActivator>("XIVChat.XIVChat_Desktop"); DesktopNotificationManagerCompat.RegisterAumidAndComServer<XivChatNotificationActivator>("XIVChat.XIVChat_Desktop");
DesktopNotificationManagerCompat.RegisterActivator<XivChatNotificationActivator>(); DesktopNotificationManagerCompat.RegisterActivator<XivChatNotificationActivator>();

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Channels; using System.Threading.Channels;
using System.Windows; using System.Windows;
@ -75,9 +74,5 @@ namespace XIVChat_Desktop {
await this.trustChannel.WriteAsync(false); await this.trustChannel.WriteAsync(false);
this.Close(); this.Close();
} }
private void TrustDialog_OnContentRendered(object? sender, EventArgs e) {
this.InvalidateVisual();
}
} }
} }