Add tags to settings and export them

pull/70/head
Brian Lima 3 years ago
parent 3144d2e63b
commit 7783a815a3

@ -83,6 +83,9 @@
<setting name="OfferedSteamGridDB" serializeAs="String">
<value>False</value>
</setting>
<setting name="Tags" serializeAs="String">
<value>READY TO PLAY,XBOX</value>
</setting>
</UWPHook.Properties.Settings>
</userSettings>
<runtime>

@ -156,8 +156,6 @@ namespace UWPHook
stream.Close();
client.Dispose();
}
});
}
@ -261,7 +259,9 @@ namespace UWPHook
private async Task ExportGames()
{
string[] tags = Settings.Default.Tags.Split(',');
string steam_folder = SteamManager.GetSteamFolder();
if (Directory.Exists(steam_folder))
{
var users = SteamManager.GetUsers(steam_folder);
@ -319,7 +319,7 @@ namespace UWPHook
IsHidden = 0,
OpenVR = 0,
ShortcutPath = "",
Tags = new string[2] {"XBOX", "READY TO PLAY" },
Tags = tags,
Devkit = 0,
DevkitGameID = "",
LastPlayTime = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds(),

@ -207,5 +207,17 @@ namespace UWPHook.Properties {
this["OfferedSteamGridDB"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("READY TO PLAY,XBOX")]
public string Tags {
get {
return ((string)(this["Tags"]));
}
set {
this["Tags"] = value;
}
}
}
}

@ -67,5 +67,8 @@
<Setting Name="OfferedSteamGridDB" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Tags" Type="System.String" Scope="User">
<Value Profile="(Default)">READY TO PLAY,XBOX</Value>
</Setting>
</Settings>
</SettingsFile>

@ -11,7 +11,7 @@
TextElement.FontWeight="Medium"
TextElement.FontSize="14"
FontFamily="Segoe UI Light"
Title="Settings" Height="600" Width="800" Icon="Resources/hook2.ico">
Title="Settings" Height="638" Width="800" Icon="Resources/hook2.ico">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="27*"/>
@ -28,10 +28,10 @@
<Grid.RowDefinitions>
<RowDefinition Height="62"/>
<RowDefinition Height="40"/>
<RowDefinition Height="28*"/>
<RowDefinition Height="229*"/>
<RowDefinition Height="40*"/>
<RowDefinition Height="44*"/>
<RowDefinition Height="68*"/>
<RowDefinition Height="213*"/>
<RowDefinition Height="43*"/>
<RowDefinition Height="48*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="62*"/>
@ -45,19 +45,19 @@
<ToggleButton x:Name="language_toggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Top" Margin="0,36,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"/>
<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"/>
<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" />
<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" Grid.RowSpan="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="2" Height="29" Margin="5,39,10,0" Grid.Row="3" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
<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 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,161" Grid.Row="3" Height="Auto" Click="key_Button_Click" />
<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="2" HorizontalAlignment="Right" Width="222" Grid.Row="3" Grid.ColumnSpan="2">
<ComboBoxItem Content="Any"/>
@ -85,19 +85,21 @@
<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="2" Height="29" Margin="5,35,10,0" Grid.Row="2" TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
</Grid>
<Grid Margin="9.8,9.6,9.6,0.4" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2">
<Grid Margin="10,9,9,1" Grid.Column="1" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="63*"/>
<ColumnDefinition Width="164*"/>
<ColumnDefinition Width="59*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="278*"/>
<RowDefinition Height="47*"/>
<RowDefinition Height="49*"/>
<RowDefinition Height="47*"/>
<RowDefinition Height="59*"/>
<RowDefinition Height="266*"/>
<RowDefinition Height="48*"/>
<RowDefinition Height="48*"/>
<RowDefinition Height="48*"/>
<RowDefinition Height="58*"/>
</Grid.RowDefinitions>
<materialDesign:Chip Content="Projects @ GitHub"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
@ -123,7 +125,7 @@
<materialDesign:PackIcon Kind="Twitter" />
</materialDesign:Chip.Icon>
</materialDesign:Chip>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock" Margin="0,185,0,0" Text="Developed by Brian Lima, @brianostorm, if you like my work cheer me up at my Twitter or pay me a coffee via Paypal, this way i can keep building amazing open-source tools for you!" TextAlignment="Justify" Height="91" VerticalAlignment="Top" Grid.ColumnSpan="3"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock" Margin="0,185,0,0" Text="Developed by Brian Lima, @brianostorm, if you like my work cheer me up at my Twitter or pay me a coffee via Paypal, this way i can keep building amazing open-source tools for you!" TextAlignment="Justify" Height="91" VerticalAlignment="Top" Grid.ColumnSpan="3" Grid.RowSpan="2"/>
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" Mode="PrimaryMid" VerticalAlignment="Top" Height="27" Grid.ColumnSpan="3">
<Label Content="About" HorizontalAlignment="Left" Margin="-10,-15,0,-17" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="14" Height="32" Foreground="#DDFFFFFF"/>
</materialDesign:ColorZone>

@ -37,6 +37,7 @@ namespace UWPHook
type_comboBox.SelectedIndex = Properties.Settings.Default.SelectedSteamGridDB_Type;
nfsw_comboBox.SelectedIndex = Properties.Settings.Default.SelectedSteamGridDB_nfsw;
humor_comboBox.SelectedIndex = Properties.Settings.Default.SelectedSteamGridDB_Humor;
tags_textBox.Text = Properties.Settings.Default.Tags;
}
private void saveButton_Click(object sender, RoutedEventArgs e)
@ -50,6 +51,7 @@ namespace UWPHook
Properties.Settings.Default.SelectedSteamGridDB_Type = type_comboBox.SelectedIndex;
Properties.Settings.Default.SelectedSteamGridDB_nfsw = nfsw_comboBox.SelectedIndex;
Properties.Settings.Default.SelectedSteamGridDB_Humor = humor_comboBox.SelectedIndex;
Properties.Settings.Default.Tags = tags_textBox.Text;
Properties.Settings.Default.Save();
this.Close();
}

Loading…
Cancel
Save