Added about page, fix button taps
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Style="{StaticResource GameInfoPanel}" HorizontalAlignment="Stretch">
|
||||
<Button Content="Back to Game" Tapped="BackToGame_Tapped" Style="{StaticResource Green}"/>
|
||||
<Button Content="Back to Game" Click="BackToGame_Click" Style="{StaticResource Green}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace YJMPD_UWP
|
||||
NavView.IsPaneOpen = false;
|
||||
}
|
||||
|
||||
private async void BackToGame_Tapped(object sender, TappedRoutedEventArgs e)
|
||||
private async void BackToGame_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
bool b = await Util.ShowConfirmDialog("Not implemented", "", Util.DialogType.OKCANCEL);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="TextWrapping" Value="WrapWholeWords" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="StackPanel" x:Key="Base">
|
||||
|
||||
@@ -9,7 +9,42 @@
|
||||
|
||||
<ScrollViewer>
|
||||
<StackPanel Style="{StaticResource Base}" >
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource Header}" Text="About this app" />
|
||||
<TextBlock>
|
||||
This application was developed as a school project for Avans Hogeschool.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="0,10,0,0">
|
||||
<TextBlock Style="{StaticResource Header}" Text="About the creators" />
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Style="{StaticResource Subtext}" Grid.Row="0" Grid.Column="0" Text="Yorick Rommers" />
|
||||
<TextBlock Style="{StaticResource Subtext}" Grid.Row="1" Grid.Column="0" Text="Kenneth van Ewijk" />
|
||||
<TextBlock Style="{StaticResource Subtext}" Grid.Row="2" Grid.Column="0" Text="Janco Kock" />
|
||||
|
||||
<Button Name="YorickGit" Click="YorickGit_Click" Grid.Row="0" Content="Github" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,0,0,5" />
|
||||
<Button Name="KennethGit" Click="KennethGit_Click" Grid.Row="1" Content="Github" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,0,0,5"/>
|
||||
<Button Name="JancoGit" Click="JancoGit_Click" Grid.Row="2" Content="Github" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,0,0,5"/>
|
||||
|
||||
<Button Name="YorickSite" Click="YorickSite_Click" Grid.Row="0" Content="Website" Grid.Column="2" HorizontalAlignment="Stretch" Margin="5,0,0,5"/>
|
||||
<Button Name="KennethSite" Click="KennethSite_Click" Grid.Row="1" Content="Website" Grid.Column="2" HorizontalAlignment="Stretch" Margin="5,0,0,5"/>
|
||||
<Button Name="JancoSite" Click="JancoSite_Click" Grid.Row="2" Content="Website" Grid.Column="2" HorizontalAlignment="Stretch" Margin="5,0,0,5"/>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Page>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using YJMPD_UWP.ViewModels;
|
||||
using System;
|
||||
using YJMPD_UWP.ViewModels;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace YJMPD_UWP.Views
|
||||
@@ -13,5 +14,31 @@ namespace YJMPD_UWP.Views
|
||||
this.DataContext = aboutvm;
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void YorickGit_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
Windows.System.Launcher.LaunchUriAsync(new Uri("http://github.com/yorickr"));
|
||||
}
|
||||
private void KennethGit_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
Windows.System.Launcher.LaunchUriAsync(new Uri("http://github.com/kennyboy55"));
|
||||
}
|
||||
private void JancoGit_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
Windows.System.Launcher.LaunchUriAsync(new Uri("http://github.com/jancoow"));
|
||||
}
|
||||
|
||||
private void YorickSite_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
Windows.System.Launcher.LaunchUriAsync(new Uri("https://imegumii.space"));
|
||||
}
|
||||
private void KennethSite_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
Windows.System.Launcher.LaunchUriAsync(new Uri("http://kvewijk.nl"));
|
||||
}
|
||||
private void JancoSite_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
Windows.System.Launcher.LaunchUriAsync(new Uri("https://jancokock.me"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<StackPanel Style="{StaticResource Base}" >
|
||||
<StackPanel>
|
||||
<TextBlock Text="Start a match" Style="{StaticResource Header}" />
|
||||
<Button Content="Start match" Style="{StaticResource Green}" Tapped="StartMatchButton_Tapped" IsEnabled="{Binding MatchAvailable}" Visibility="{Binding StartMatch, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<Button Content="Leave match" Style="{StaticResource Red}" Tapped="StopMatchButton_Tapped" Visibility="{Binding StopMatch, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<Button Content="Start match" Style="{StaticResource Green}" Click="StartMatchButton_Click" IsEnabled="{Binding MatchAvailable}" Visibility="{Binding StartMatch, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<Button Content="Leave match" Style="{StaticResource Red}" Click="StopMatchButton_Click" Visibility="{Binding StopMatch, Converter={StaticResource BoolToVisConverter}}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Visibility="{Binding StopMatch, Converter={StaticResource BoolToVisConverter}}" Margin="0,10,0,0">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using YJMPD_UWP.ViewModels;
|
||||
|
||||
namespace YJMPD_UWP.Views
|
||||
@@ -14,12 +15,12 @@ namespace YJMPD_UWP.Views
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void StartMatchButton_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
|
||||
private void StartMatchButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
App.Game.Start();
|
||||
}
|
||||
|
||||
private void StopMatchButton_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
|
||||
private void StopMatchButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
App.Game.Stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user