More UI tweaks

This commit is contained in:
Brian Lima 2016-10-05 14:18:55 -03:00
parent bd390bdb82
commit 06850ca413
3 changed files with 38 additions and 18 deletions

View File

@ -38,5 +38,6 @@
<Label x:Name="label" Content="Press 'Load installed apps' to get a list of installed apps on your system." HorizontalAlignment="Left" Margin="0,-10,0,0" VerticalAlignment="Top"/>
</Grid>
<Button Content="Export selected Apps to Steam" Click="ExportButton_Click" HorizontalAlignment="Right" Margin="0,0,10,10" Grid.Row="2" VerticalAlignment="Bottom" Width="227"/>
<ProgressBar Visibility="Collapsed" x:Name="progressBar" Margin="10,215,10,174" Grid.Row="1" IsIndeterminate="True" />
</Grid>
</Window>

View File

@ -1,5 +1,6 @@
using SharpSteam;
using System;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
@ -16,6 +17,7 @@ namespace UWPHook
public partial class GamesWindow : Window
{
AppEntryModel Apps;
BackgroundWorker bwr;
public GamesWindow()
{
@ -112,6 +114,25 @@ private void ExportButton_Click(object sender, RoutedEventArgs e)
}
private void LoadButton_Click(object sender, RoutedEventArgs e)
{
bwr = new BackgroundWorker();
bwr.DoWork += Bwr_DoWork;
bwr.RunWorkerCompleted += Bwr_RunWorkerCompleted;
grid.IsEnabled = false;
progressBar.Visibility = Visibility.Visible;
}
private void Bwr_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
grid.IsEnabled = true;
listGames.Columns[2].IsReadOnly = true;
progressBar.Visibility = Visibility.Collapsed;
label.Content = "Installed Apps";
}
private void Bwr_DoWork(object sender, DoWorkEventArgs e)
{
var installedApps = AppManager.GetInstalledApps();
@ -124,9 +145,6 @@ private void LoadButton_Click(object sender, RoutedEventArgs e)
Apps.Entries.Add(new AppEntry() { Name = valor[0], Aumid = valor[1], Selected = false });
}
}
listGames.Columns[2].IsReadOnly = true;
label.Content = "Installed Apps";
}
private void HelpButton_Click(object sender, RoutedEventArgs e)

View File

@ -30,26 +30,27 @@
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="52*"/>
<ColumnDefinition Width="301*"/>
<ColumnDefinition Width="177*"/>
<ColumnDefinition Width="124*"/>
<ColumnDefinition Width="113*"/>
</Grid.ColumnDefinitions>
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" Mode="PrimaryMid" VerticalAlignment="Top" Height="27" Grid.ColumnSpan="3">
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" Mode="PrimaryMid" VerticalAlignment="Top" Height="27" Grid.ColumnSpan="4">
<Label Content="Settings" HorizontalAlignment="Left" Margin="-10,-15,0,-17" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="14" Height="32" Foreground="#DDFFFFFF"/>
</materialDesign:ColorZone>
<ToggleButton x:Name="language_toggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Top" Margin="4,56,0,0" ToolTip="MaterialDesignSwitchToggleButton" IsChecked="False" Height="18" HorizontalAlignment="Left" Width="46" />
<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,48,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1"/>
<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,48,10,0" VerticalAlignment="Top" Height="31" Grid.Column="2" HorizontalAlignment="Right" Width="93"/>
<Button x:Name="save_button" Content="Save" HorizontalAlignment="Right" Margin="0,95,10,0" VerticalAlignment="Top" Width="93" Click="saveButton_Click" Grid.Column="2" Grid.Row="1"/>
<Label x:Name="label3" Content="Check if the launched app is running every" Margin="5,0,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.Row="1"/>
<ComboBox x:Name="seconds_comboBox" Margin="0,10,10,0" VerticalAlignment="Top" Height="31" Grid.Column="2" HorizontalAlignment="Right" Width="93" Grid.Row="1"/>
<Button x:Name="update_button" Click="update_button_Click" Content="Check for updates" Grid.Column="1" Margin="10,0,131,10" Grid.Row="1" VerticalAlignment="Bottom"/>
<Button x:Name="help_button" Click="help_button_Click" Content="Get help at our Reddit" Grid.Column="1" Margin="175,0,74,10" Grid.Row="1" VerticalAlignment="Bottom" Grid.ColumnSpan="2"/>
<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,48,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,48,10,0" VerticalAlignment="Top" Height="31" Grid.Column="3" HorizontalAlignment="Right" Width="93"/>
<Button x:Name="save_button" Content="Save" HorizontalAlignment="Right" Margin="0,95,10,0" VerticalAlignment="Top" Width="93" Click="saveButton_Click" Grid.Column="3" Grid.Row="1"/>
<Label x:Name="label3" Content="Check if the launched app is running every" Margin="5,0,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2"/>
<ComboBox x:Name="seconds_comboBox" Margin="0,10,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" Grid.Column="1" Margin="0,0,5,10" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="162"/>
<Button x:Name="help_button" Click="help_button_Click" Content="Get help at our Reddit" Grid.Column="2" Margin="8,0,0,10" Grid.Row="1" VerticalAlignment="Bottom" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="163"/>
</Grid>
<Grid Margin="10,10,10,0" Grid.Column="1" Grid.Row="1">
<materialDesign:Chip Content="Projects @ GitHub"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Margin="71,266,51,174" Click="Chip1_Click" HorizontalAlignment="Stretch" Height="Auto">
Margin="71,281,51,159" Click="Chip1_Click" HorizontalAlignment="Stretch" Height="Auto">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="GithubCircle"></materialDesign:PackIcon>
</materialDesign:Chip.Icon>
@ -57,7 +58,7 @@
<materialDesign:Chip Content="Paypal donate"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Margin="71,311,51,129" Click="Chip2_Click" HorizontalAlignment="Stretch" Height="Auto">
Margin="71,329,51,111" Click="Chip2_Click" HorizontalAlignment="Stretch" Height="Auto">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="Coffee"></materialDesign:PackIcon>
</materialDesign:Chip.Icon>
@ -65,17 +66,17 @@
<materialDesign:Chip Content="@brianostorm"
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}"
Margin="71,356,51,84" Click="Chip_Click" HorizontalAlignment="Stretch" Height="Auto">
Margin="71,378,51,62" Click="Chip_Click" HorizontalAlignment="Stretch" Height="Auto">
<materialDesign:Chip.Icon>
<materialDesign:PackIcon Kind="Twitter" />
</materialDesign:Chip.Icon>
</materialDesign:Chip>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock" Margin="0,185,0,0" VerticalAlignment="Top" Height="76" 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!" HorizontalAlignment="Left" Width="286" TextAlignment="Justify"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock" Margin="0,185,0,0" VerticalAlignment="Top" Height="91" 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!" HorizontalAlignment="Left" Width="286" TextAlignment="Justify"/>
<materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" Mode="PrimaryMid" VerticalAlignment="Top" Height="27">
<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="71,32,65,0"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock_Copy" Margin="0,401,0,0" VerticalAlignment="Top" Height="79" Text="This project uses the MaterialDesignXAMLToolkit. Special thanks to /r/Forza community at Reddit" HorizontalAlignment="Left" Width="286" TextAlignment="Justify"/>
<Image x:Name="image2" Height="150" VerticalAlignment="Top" Source="Resources/briano.png" Stretch="UniformToFill" Margin="71,32,0,0" HorizontalAlignment="Left" Width="150"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock_Copy" Margin="0,421,0,0" VerticalAlignment="Top" Height="59" Text="This project uses the MaterialDesignXAMLToolkit. Special thanks to /r/Forza community at Reddit" HorizontalAlignment="Left" Width="286" TextAlignment="Justify"/>
</Grid>
</Grid>
</Window>