Merge branch 'BrianLima:master' into master

pull/87/head
Jon Philpot 2 years ago committed by GitHub
commit 8118695a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -41,16 +41,13 @@ Special thanks to @FusRoDah061 for implementing the base feature!
# Troubleshooting #
- **Steam's Overlay isn't working!**
- Unfortunately, it's a Steam limitation, Valve has to update it in order to work properly with UWP, DXTory is a recommended overlay for UWP games.
- Unfortunately, it's a Steam limitation, Valve has to update it in order to work properly with UWP, DXTory is a recommended overlay for UWP games.
- **Steam Link launches the game but input doesn't work!**
- Unfortunately, another limitation by Steam, i have some ideas as to why it isn't working, but i can't give an ETA for when i can fix this, or even if it's fixable on my end, since Valve didn't released the Link in Brazil and i can't get one to test.
- Unfortunately, another limitation by Steam, i have some ideas as to why it isn't working, but i can't give an ETA for when i can fix this, or even if it's fixable on my end, since Valve didn't released the Link in Brazil and i can't get one to test.
- **Steam Controller isn't working**
- Another limitation by Steam, some people reported it works with "Desktop Mode" configuration, but i can't verify this.
- Another limitation by Steam, some people reported it works with "Desktop Mode" configuration, but i can't verify this.
- **My question isn't listed here!**
- Drop by our subreddit and ask a question over there, maybe someone will help you, i surely will as soon as i can
- Drop by our subreddit and ask a question over there, maybe someone will help you, i surely will as soon as i can
**[https://www.reddit.com/r/uwphook](https://www.reddit.com/r/uwphook)**
----------

@ -36,11 +36,12 @@ namespace UWPHook
Apps = new AppEntryModel();
var args = Environment.GetCommandLineArgs();
//If null or 1, the app was launched normally
// If null or 1, the app was launched normally
if (args?.Length > 1)
{
//When length is 1, the only argument is the path where the app is installed
_ = LauncherAsync(args);
// When length is 1, the only argument is the path where the app is installed
_ = LauncherAsync(args); // Launches the requested game
}
else
{
@ -58,6 +59,12 @@ namespace UWPHook
await Task.Delay(10000);
}
/// <summary>
/// Main task that launches a game
/// Usually invoked by steam
/// </summary>
/// <param name="args">launch args received from the program execution</param>
/// <returns></returns>
private async Task LauncherAsync(string[] args)
{
FullScreenLauncher launcher = null;
@ -116,6 +123,13 @@ namespace UWPHook
}
}
/// <summary>
/// Generates a CRC32 hash expected by Steam to link an image with a game in the library
/// See https://blog.yo1.dog/calculate-id-for-non-steam-games-js/ for an example
/// </summary>
/// <param name="appName">The name of the executable to be displayed</param>
/// <param name="appTarget">The executable target path</param>
/// <returns></returns>
private UInt64 GenerateSteamGridAppId(string appName, string appTarget)
{
byte[] nameTargetBytes = Encoding.UTF8.GetBytes(appTarget + appName + "");
@ -125,30 +139,53 @@ namespace UWPHook
return gameId;
}
/// <summary>
/// Task responsible for triggering the export, blocks the UI, and shows a message
/// once the task is finished, unlocking the UI
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void ExportButton_Click(object sender, RoutedEventArgs e)
{
grid.IsEnabled = false;
progressBar.Visibility = Visibility.Visible;
bool restartSteam = true;
var result = await ExportGames(restartSteam);
grid.IsEnabled = true;
progressBar.Visibility = Visibility.Collapsed;
bool result = false, restartSteam = true;
string msg = String.Empty;
string msg = "Your apps were successfuly exported!";
if(!restartSteam)
try
{
msg += " Please restart Steam in order to see them.";
await ExportGames(restartSteam);
msg = "Your apps were successfuly exported!";
if(!restartSteam)
{
msg += " Please restart Steam in order to see them.";
}
else if(result)
{
msg += " Steam has been restarted.";
}
}
else if(result)
catch (TaskCanceledException exception)
{
msg += " Steam has been restarted.";
msg = exception.Message;
}
grid.IsEnabled = true;
progressBar.Visibility = Visibility.Collapsed;
MessageBox.Show(msg, "UWPHook", MessageBoxButton.OK, MessageBoxImage.Information);
}
/// <summary>
/// Downloads the given image in the url to a given path in a given format
/// </summary>
/// <param name="imageUrl">The url for the image</param>
/// <param name="destinationFilename">Path to store the image</param>
/// <param name="format"></param>
/// <returns></returns>
private async Task SaveImage(string imageUrl, string destinationFilename, ImageFormat format)
{
await Task.Run(() =>
@ -176,6 +213,10 @@ namespace UWPHook
});
}
/// <summary>
/// Copies all temporary images to the given user
/// </summary>
/// <param name="user">The user path to copy images to</param>
private void CopyTempGridImagesToSteamUser(string user)
{
string tmpGridDirectory = Path.GetTempPath() + "UWPHook\\tmp_grid\\";
@ -210,12 +251,28 @@ namespace UWPHook
}
}
/// <summary>
/// Task responsible for downloading grid images to a temporary location,
/// generates the steam ID for the game based in the receiving parameters,
/// Throws TaskCanceledException if cannot communicate with SteamGridDB properly
/// </summary>
/// <param name="appName">The name of the app</param>
/// <param name="appTarget">The target path of the executable</param>
/// <returns></returns>
private async Task DownloadTempGridImages(string appName, string appTarget)
{
SteamGridDbApi api = new SteamGridDbApi(Properties.Settings.Default.SteamGridDbApiKey);
string tmpGridDirectory = Path.GetTempPath() + "UWPHook\\tmp_grid\\";
GameResponse[] games;
var games = await api.SearchGame(appName);
try
{
games = await api.SearchGame(appName);
}
catch (TaskCanceledException exception)
{
throw;
}
if (games != null)
{
@ -277,6 +334,11 @@ namespace UWPHook
}
}
/// <summary>
/// Main Task to export the selected games to steam
/// </summary>
/// <param name="restartSteam"></param>
/// <returns></returns>
private async Task<bool> ExportGames(bool restartSteam)
{
string[] tags = Settings.Default.Tags.Split(',');
@ -301,10 +363,13 @@ namespace UWPHook
if (downloadGridImages)
{
Debug.WriteLine("Downloading grid images for app " + app.Name);
gridImagesDownloadTasks.Add(DownloadTempGridImages(app.Name, exePath));
}
}
// Export the selected apps and the downloaded images to each user
// in the steam folder by modifying it's VDF file
foreach (var user in users)
{
try
@ -493,6 +558,11 @@ namespace UWPHook
}
}
/// <summary>
/// Fires the Bwr_DoWork, to load the apps installed at the machine
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void LoadButton_Click(object sender, RoutedEventArgs e)
{
bwrLoad = new BackgroundWorker();
@ -500,12 +570,19 @@ namespace UWPHook
bwrLoad.RunWorkerCompleted += Bwr_RunWorkerCompleted;
grid.IsEnabled = false;
label.Content = "Loading your installed apps";
progressBar.Visibility = Visibility.Visible;
Apps.Entries = new System.Collections.ObjectModel.ObservableCollection<AppEntry>();
bwrLoad.RunWorkerAsync();
}
/// <summary>
/// Callback for restoring the grid list interactivity
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Bwr_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
listGames.ItemsSource = Apps.Entries;
@ -518,6 +595,11 @@ namespace UWPHook
label.Content = "Installed Apps";
}
/// <summary>
/// Worker responsible for loading the apps installed in the machine
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Bwr_DoWork(object sender, DoWorkEventArgs e)
{
try
@ -592,6 +674,13 @@ namespace UWPHook
window.ShowDialog();
}
/// <summary>
/// Function that executes when the Games Window is loaded
/// Will inform the user of the possibility of using the SteamGridDB API
/// redirecting him to the settings page if he wishes to use the functionality
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Window_Loaded(object sender, RoutedEventArgs e)
{
if (String.IsNullOrEmpty(Settings.Default.SteamGridDbApiKey) && !Settings.Default.OfferedSteamGridDB)

@ -11,7 +11,7 @@
TextElement.FontWeight="Medium"
TextElement.FontSize="14"
FontFamily="Segoe UI Light"
Title="Settings" Height="638" Width="800" Icon="Resources/hook2.ico">
Title="Settings" Height="750" Width="800" Icon="Resources/hook2.ico">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="27*"/>
@ -28,10 +28,12 @@
<Grid.RowDefinitions>
<RowDefinition Height="62"/>
<RowDefinition Height="40"/>
<RowDefinition Height="68*"/>
<RowDefinition Height="213*"/>
<RowDefinition Height="43*"/>
<RowDefinition Height="48*"/>
<RowDefinition Height="40*"/>
<RowDefinition Height="40*"/>
<RowDefinition Height="66*"/>
<RowDefinition Height="223*"/>
<RowDefinition Height="56*"/>
<RowDefinition Height="62*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="62*"/>
@ -45,21 +47,21 @@
<ToggleButton x:Name="language_toggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Top" Margin="6,34,0,0" ToolTip="MaterialDesignSwitchToggleButton" IsChecked="False" Height="18" HorizontalAlignment="Left" Width="46" RenderTransformOrigin="0.304,0.444" />
<Label ToolTip="Some apps use the system language to choose what language to display, this setting will store your current language, change it so you can play in another language and then revert your system back to your default display language." x:Name="label1" Content="Set system language when launching an app*" Margin="5,31,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.ColumnSpan="2"/>
<ComboBox ToolTip="Some apps use the system language to choose what language to display, this setting will store your current language, change it so you can play in another language and then revert your system back to your default display language." x:Name="cultures_comboBox" Margin="0,29,10,0" VerticalAlignment="Top" Height="31" Grid.Column="3" HorizontalAlignment="Right" Width="93"/>
<Button x:Name="save_button" Content="Save" HorizontalAlignment="Right" VerticalAlignment="Top" Width="93" Click="saveButton_Click" Grid.Column="3" Grid.Row="4" Margin="0,2,0,0"/>
<Label x:Name="label3" Content="Check if the launched app is running every" Margin="5,7,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2"/>
<Button x:Name="save_button" Content="Save" HorizontalAlignment="Right" VerticalAlignment="Top" Width="93" Click="saveButton_Click" Grid.Column="3" Grid.Row="6" Margin="0,2,0,0"/>
<Label x:Name="label3" ToolTip="If 0, UWPHook will not run in the background and will not update the in-game status" Content="Check if the launched app is running every" Margin="5,7,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2"/>
<ComboBox x:Name="seconds_comboBox" Margin="0,7,10,0" VerticalAlignment="Top" Height="31" Grid.Column="3" HorizontalAlignment="Right" Width="93" Grid.Row="1"/>
<Button x:Name="update_button" Click="update_button_Click" Content="Check for updates" Margin="0,0,8,9" Grid.Row="5" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="162" Grid.ColumnSpan="2"/>
<Button x:Name="help_button" Click="help_button_Click" Content="Get help at our Reddit" Grid.Column="2" Margin="0,0,0,9" Grid.Row="5" VerticalAlignment="Bottom" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="163"/>
<ToggleButton x:Name="streaming_toggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Top" Margin="6,6,0,0" ToolTip="MaterialDesignSwitchToggleButton" IsChecked="False" Height="18" HorizontalAlignment="Left" Width="46" Grid.Row="2" />
<Button x:Name="update_button" Click="update_button_Click" Content="Check for updates" Margin="0,0,8,9" Grid.Row="7" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="162" Grid.ColumnSpan="2"/>
<Button x:Name="help_button" Click="help_button_Click" Content="Get help at our Reddit" Grid.Column="2" Margin="0,0,0,9" Grid.Row="7" VerticalAlignment="Bottom" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="163"/>
<ToggleButton x:Name="streaming_toggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Top" Margin="0,6,0,0" ToolTip="MaterialDesignSwitchToggleButton" IsChecked="False" Height="18" Grid.Row="2" />
<Label ToolTip="This fixes Steam in-home Streaming, set this in the host computer." x:Name="label1_Copy" Content="Enable streaming mode" Margin="5,1,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2"/>
<Label ToolTip="SteamGridDB API key used to download Steam's library artwork. Leave it blank if you don't want to download artwork." x:Name="label1_Copy1" Content="Api Key" Margin="5,39,0,0" VerticalAlignment="Top" Height="29" Grid.Row="3" Grid.Column="1"/>
<TextBox x:Name="steamgriddb_api_key" Grid.Column="1" Height="29" Margin="150,39,10,0" Grid.Row="3" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3"/>
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" Mode="PrimaryMid" VerticalAlignment="Top" Height="27" Grid.ColumnSpan="4" Margin="0,7,0,0" Grid.Row="3">
<Label ToolTip="SteamGridDB API key used to download Steam's library artwork. Leave it blank if you don't want to download artwork." x:Name="label1_Copy1" Content="Api Key" Margin="5,39,0,0" VerticalAlignment="Top" Height="29" Grid.Row="5" Grid.Column="1"/>
<TextBox x:Name="steamgriddb_api_key" Grid.Column="1" Height="29" Margin="150,39,10,0" Grid.Row="5" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3"/>
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" Mode="PrimaryMid" VerticalAlignment="Top" Height="27" Grid.ColumnSpan="4" Margin="0,7,0,0" Grid.Row="5">
<Label Content="SteamGrid" HorizontalAlignment="Left" Margin="-10,-15,0,-17" FontFamily="Segoe UI Semibold" FontSize="14" Foreground="#DDFFFFFF"/>
</materialDesign:ColorZone>
<Button x:Name="key_Button" Content="{materialDesign:PackIcon Key}" ToolTip="Get a new API Key" Margin="6,39,7,147" Grid.Row="3" Height="Auto" Click="key_Button_Click" />
<Label ToolTip="The main style of the artwork." x:Name="label1_Copy2" Content="Artwork Style" Margin="5,73,0,0" VerticalAlignment="Top" Height="29" Grid.Row="3" Grid.Column="1"/>
<ComboBox x:Name="style_comboBox" Margin="0,73,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="3" Grid.ColumnSpan="3">
<Button x:Name="key_Button" Content="{materialDesign:PackIcon Key}" ToolTip="Go to SteamGridDB.com to generate a new key" Margin="6,39,7,155" Grid.Row="5" Height="Auto" Click="key_Button_Click" />
<Label ToolTip="The main style of the artwork." x:Name="label1_Copy2" Content="Artwork Style" Margin="5,73,0,0" VerticalAlignment="Top" Height="29" Grid.Row="5" Grid.Column="1"/>
<ComboBox x:Name="style_comboBox" Margin="0,73,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="5" Grid.ColumnSpan="3">
<ComboBoxItem Content="Any"/>
<ComboBoxItem Content="Alternate"/>
<ComboBoxItem Content="Blurred"/>
@ -67,26 +69,30 @@
<ComboBoxItem Content="Material"/>
<ComboBoxItem Content="No Logo"/>
</ComboBox>
<Label ToolTip="Type of the artwork, animated, static or both." x:Name="label1_Copy3" Content="Artwork Type" Margin="5,109,0,0" VerticalAlignment="Top" Height="29" Grid.Row="3" Grid.Column="1"/>
<ComboBox x:Name="type_comboBox" Margin="0,109,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="3" Grid.ColumnSpan="3">
<Label ToolTip="Type of the artwork, animated, static or both." x:Name="label1_Copy3" Content="Artwork Type" Margin="5,109,0,0" VerticalAlignment="Top" Height="29" Grid.Row="5" Grid.Column="1"/>
<ComboBox x:Name="type_comboBox" Margin="0,109,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="5" Grid.ColumnSpan="3">
<ComboBoxItem Content="Any"/>
<ComboBoxItem Content="Static"/>
<ComboBoxItem Content="Animated"/>
</ComboBox>
<Label ToolTip="Consider NSFW artwork?" x:Name="label1_Copy4" Content="Artwork nsfw" Margin="5,142,0,0" VerticalAlignment="Top" Height="29" Grid.Row="3" Grid.Column="1"/>
<ComboBox x:Name="nfsw_comboBox" Margin="0,145,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="3" Grid.ColumnSpan="3">
<Label ToolTip="Consider NSFW artwork?" x:Name="label1_Copy4" Content="Artwork nsfw" Margin="5,142,0,0" VerticalAlignment="Top" Height="29" Grid.Row="5" Grid.Column="1"/>
<ComboBox x:Name="nfsw_comboBox" Margin="0,145,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="5" Grid.ColumnSpan="3">
<ComboBoxItem Content="No"/>
<ComboBoxItem Content="Any"/>
<ComboBoxItem Content="Yes"/>
</ComboBox>
<Label ToolTip="Consider meme and humorous artwork?" x:Name="label1_Copy5" Content="Artwork humorous" Margin="5,176,0,0" VerticalAlignment="Top" Height="29" Grid.Row="3" Grid.Column="1"/>
<ComboBox x:Name="humor_comboBox" Margin="0,181,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="3" Grid.ColumnSpan="3">
<Label ToolTip="Consider meme and humorous artwork?" x:Name="label1_Copy5" Content="Artwork humorous" Margin="5,176,0,0" VerticalAlignment="Top" Height="29" Grid.Row="5" Grid.Column="1"/>
<ComboBox x:Name="humor_comboBox" Margin="0,181,10,0" VerticalAlignment="Top" Height="31" Grid.Column="1" HorizontalAlignment="Right" Width="244" Grid.Row="5" Grid.ColumnSpan="3">
<ComboBoxItem Content="No"/>
<ComboBoxItem Content="Any"/>
<ComboBoxItem Content="Yes"/>
</ComboBox>
<Label ToolTip="Add these tags to exported games, use comma separated values" x:Name="label1_Copy6" Content="Export with these tags" Margin="5,35,8,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.Row="2"/>
<TextBox x:Name="tags_textBox" Grid.Column="1" Height="29" Margin="150,35,10,0" Grid.Row="2" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="3"/>
<Label ToolTip="Add these tags to exported games, use comma separated values" x:Name="label1_Copy6" Content="Export with these tags:" Margin="5,2,8,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.Row="4"/>
<TextBox x:Name="tags_textBox" Grid.Column="2" Height="29" Margin="10,2,10,0" Grid.Row="4" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
<ToggleButton x:Name="change_resolution_toggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Top" Margin="0,9,0,0" ToolTip="MaterialDesignSwitchToggleButton" IsChecked="False" Height="18" Grid.Row="3" />
<Label ToolTip="Change the host computer resolution on launch, return to previous after." x:Name="label1_Copy8" Content="Change host resolution to:" Margin="5,3,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.Row="3"/>
<ComboBox x:Name="seconds_comboBox_Copy" Margin="0,3,10,0" VerticalAlignment="Top" Height="31" Grid.Column="2" HorizontalAlignment="Right" Width="217" Grid.Row="3" Grid.ColumnSpan="2"/>
<Button x:Name="test2" Content="Save" HorizontalAlignment="Right" VerticalAlignment="Top" Width="93" Click="test_Click" Grid.Column="1" Grid.Row="6" Margin="0,10,10,0"/>
</Grid>
<Grid Margin="10,88,9,35" Grid.Column="1" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
@ -95,11 +101,11 @@
<ColumnDefinition Width="59*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="266*"/>
<RowDefinition Height="48*"/>
<RowDefinition Height="48*"/>
<RowDefinition Height="48*"/>
<RowDefinition Height="58*"/>
<RowDefinition Height="259*"/>
<RowDefinition Height="42*"/>
<RowDefinition Height="42*"/>
<RowDefinition Height="42*"/>
<RowDefinition Height="190*"/>
</Grid.RowDefinitions>
<materialDesign:Chip Content="Projects @ GitHub"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
@ -130,7 +136,7 @@
<Label Content="About" HorizontalAlignment="Left" Margin="-10,-15,0,-17" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="14" Height="32" Foreground="#DDFFFFFF"/>
</materialDesign:ColorZone>
<Image x:Name="image2" Height="150" VerticalAlignment="Top" Source="Resources/briano.png" Stretch="UniformToFill" Margin="8,32,0,0" HorizontalAlignment="Left" Width="150" Grid.Column="1"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock_Copy" VerticalAlignment="Top" Height="59" TextAlignment="Justify" Grid.Row="3" Grid.ColumnSpan="3" Margin="0,44,0,0" Grid.RowSpan="2"><Run Text="Special thanks to /r/Forza and /r/Steam communities at Reddit"/><Run Text=", and to all the "/><Hyperlink NavigateUri="https://github.com/BrianLima/UWPHook/graphs/contributors"> contributors </Hyperlink><Run Text=" who have dealt with my bad code"/><Run Text="."/><Run Text=" "/><Run Text=":)"/></TextBlock>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock_Copy" VerticalAlignment="Top" Height="59" TextAlignment="Justify" Grid.Row="4" Grid.ColumnSpan="3" Margin="0,1,0,0"><Run Text="Special thanks to /r/Forza and /r/Steam communities at Reddit"/><Run Text=", and to all the "/><Hyperlink NavigateUri="https://github.com/BrianLima/UWPHook/graphs/contributors"> contributors </Hyperlink><Run Text=" who have dealt with my bad code"/><Run Text="."/><Run Text=" "/><Run Text=":)"/></TextBlock>
</Grid>
<Grid Margin="10,9.8,10.2,0.4" Grid.Row="2" Visibility="Hidden">
<Image HorizontalAlignment="Left" Height="111" VerticalAlignment="Top" Width="111" Source="Resources/square.png"/>

@ -1,6 +1,9 @@
using System;
using System.Globalization;
using System.Windows;
using System.Linq;
using System.Runtime.InteropServices;
//using System.Windows.Forms;
namespace UWPHook
{
@ -20,7 +23,9 @@ namespace UWPHook
cultures_comboBox.Items.Add(culture.TextInfo.CultureName);
}
for (int i = 1; i < 10; i++)
for (int i = 0; i < 10; i++)
{
seconds_comboBox.Items.Add(i + " seconds");
if (i == Properties.Settings.Default.Seconds)
@ -92,5 +97,14 @@ namespace UWPHook
"Log-in, or create your account, go to your profile preferences and click 'Generate API Key', then paste the key back on UWPHook.", "Attention!", MessageBoxButton.OK, MessageBoxImage.Information );
System.Diagnostics.Process.Start("https://www.steamgriddb.com/profile/preferences/api");
}
private void test()
{
FixHeight = 1280;
FixWidth = 1024;
Resolution.CResolution ChangeRes1024 = new Resolution.CResolution(FixHeight, FixWidth);
}
}
}

@ -45,16 +45,14 @@ namespace UWPHook.SteamGridDb
}
else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized)
{
System.Windows.MessageBox.Show("Warning: SteamGrid API Key Invalid. Please generate a new key and add it to settings.");
Debug.WriteLine("ERROR RESPONSE: " + response.ToString());
settings.SteamGridDbApiKey = String.Empty;
settings.Save();
System.Windows.Application.Current.Shutdown();
throw new TaskCanceledException("Warning: SteamGrid API Key Invalid. Please generate a new key and add it to settings.");
}
return games;
}

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@ -61,27 +61,35 @@
<ItemGroup>
<Reference Include="Crc32.NET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99, processorArchitecture=MSIL">
<HintPath>..\packages\Crc32.NET.1.2.0\lib\net20\Crc32.NET.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MaterialDesignColors, Version=2.0.1.2556, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignColors.2.0.1\lib\net452\MaterialDesignColors.dll</HintPath>
<Reference Include="MaterialDesignColors, Version=2.0.4.3, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignColors.2.0.4\lib\net452\MaterialDesignColors.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MaterialDesignThemes.Wpf, Version=4.1.0.2556, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignThemes.4.1.0\lib\net452\MaterialDesignThemes.Wpf.dll</HintPath>
<Reference Include="MaterialDesignThemes.Wpf, Version=4.3.0.3, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignThemes.4.3.0\lib\net452\MaterialDesignThemes.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SharpSteam">
<HintPath>..\..\SharpSteam\SharpSteam\bin\Release\SharpSteam.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.PowerShell.5.ReferenceAssemblies.1.1.0\lib\net4\System.Management.Automation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
@ -215,7 +223,9 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MaterialDesignThemes.4.1.0\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MaterialDesignThemes.4.1.0\build\MaterialDesignThemes.targets'))" />
<Error Condition="!Exists('..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets'))" />
</Target>
<Import Project="..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Crc32.NET" version="1.2.0" targetFramework="net461" />
<package id="MaterialDesignColors" version="2.0.1" targetFramework="net462" />
<package id="MaterialDesignThemes" version="4.1.0" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net461" />
<package id="Microsoft.PowerShell.5.ReferenceAssemblies" version="1.1.0" targetFramework="net461" />
<package id="Crc32.NET" version="1.2.0" targetFramework="net462" />
<package id="MaterialDesignColors" version="2.0.4" targetFramework="net462" />
<package id="MaterialDesignThemes" version="4.3.0" targetFramework="net462" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net462" />
<package id="Microsoft.PowerShell.5.ReferenceAssemblies" version="1.1.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
<package id="System.Management.Automation" version="7.1.4" targetFramework="net462" />
<package id="System.Management.Automation" version="7.2.0" targetFramework="net462" />
</packages>
Loading…
Cancel
Save