Added all pages

This commit is contained in:
2016-01-19 15:03:56 +01:00
parent 54a5277406
commit 77f6217228
12 changed files with 232 additions and 6 deletions
+7 -6
View File
@@ -121,7 +121,11 @@ namespace YJMPD_UWP
NavView.IsPaneOpen = false;
if (NavListHome.IsSelected)
{
if (Frame.BackStack.Count >= 1)
Frame.BackStack.Clear();
Frame.Navigate(typeof(MatchView));
}
else
if (NavListStatistics.IsSelected)
Frame.Navigate(typeof(StatisticsView));
@@ -138,13 +142,10 @@ namespace YJMPD_UWP
NavView.IsPaneOpen = false;
}
private async void BackToGame_Click(object sender, RoutedEventArgs e)
private void BackToGame_Click(object sender, RoutedEventArgs e)
{
bool b = await Util.ShowConfirmDialog("View Scores", "Go to the scores page (test)?", Util.DialogType.OKCANCEL);
if(b)
{
App.Navigate(typeof(ScoreView));
}
NavView.IsPaneOpen = false;
App.Game.BackToGame();
}
private void Content_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
+24
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using YJMPD_UWP.Helpers.EventArgs;
using YJMPD_UWP.Model.Object;
using YJMPD_UWP.Views;
namespace YJMPD_UWP.Model
{
@@ -124,5 +125,28 @@ namespace YJMPD_UWP.Model
UpdateGameStatus(GameStatus.STOPPED);
return true;
}
public void BackToGame()
{
switch(Status)
{
default:
case GameStatus.STOPPED:
break;
case GameStatus.SEARCHING:
App.Navigate(typeof(MatchView));
break;
case GameStatus.WAITING:
App.Navigate(typeof(WaitingView));
break;
case GameStatus.STARTED:
App.Navigate(typeof(GameView));
break;
case GameStatus.ENDED:
App.Navigate(typeof(ScoreView));
break;
}
}
}
}
+16
View File
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YJMPD_UWP.ViewModels
{
public class GameVM : TemplateVM
{
public GameVM() : base("Game")
{
}
}
}
+16
View File
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YJMPD_UWP.ViewModels
{
public class PhotoVM : TemplateVM
{
public PhotoVM() : base("Photo")
{
}
}
}
+15
View File
@@ -0,0 +1,15 @@
<Page
x:Class="YJMPD_UWP.Views.GameView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:YJMPD_UWP.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<ScrollViewer>
<StackPanel Style="{StaticResource BaseStackPanel}">
</StackPanel>
</ScrollViewer>
</Page>
+30
View File
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using YJMPD_UWP.ViewModels;
namespace YJMPD_UWP.Views
{
public sealed partial class GameView : Page
{
GameVM gamevm;
public GameView()
{
gamevm = new GameVM();
this.DataContext = gamevm;
this.InitializeComponent();
}
}
}
+15
View File
@@ -0,0 +1,15 @@
<Page
x:Class="YJMPD_UWP.Views.PhotoView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:YJMPD_UWP.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<ScrollViewer>
<StackPanel Style="{StaticResource BaseStackPanel}">
</StackPanel>
</ScrollViewer>
</Page>
+30
View File
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using YJMPD_UWP.ViewModels;
namespace YJMPD_UWP.Views
{
public sealed partial class PhotoView : Page
{
PhotoVM photovm;
public PhotoView()
{
photovm = new PhotoVM();
this.DataContext = photovm;
this.InitializeComponent();
}
}
}
+10
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
@@ -28,9 +29,18 @@ namespace YJMPD_UWP.Views
}
private void ReadyButton_Click(object sender, RoutedEventArgs e)
{
Ready();
}
private async void Ready()
{
ReadyCheck.Visibility = Visibility.Visible;
ReadyButton.IsEnabled = false;
Task.Delay(TimeSpan.FromMilliseconds(1500));
App.Navigate(typeof(WaitingView));
}
}
}
+16
View File
@@ -0,0 +1,16 @@
<Page
x:Class="YJMPD_UWP.Views.WaitingView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:YJMPD_UWP.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<RelativePanel Style="{StaticResource BaseRelativePanel}">
<StackPanel RelativePanel.AlignHorizontalCenterWithPanel="True" RelativePanel.AlignVerticalCenterWithPanel="True" Margin="0,-50,0,0">
<ProgressRing Width="80" Height="80" HorizontalAlignment="Center" IsActive="True" />
<TextBlock Text="Waiting on other players..." FontSize="20" Margin="0,20,0,0"/>
</StackPanel>
</RelativePanel>
</Page>
+30
View File
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
namespace YJMPD_UWP.Views
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class WaitingView : Page
{
public WaitingView()
{
this.InitializeComponent();
}
}
}
+23
View File
@@ -117,8 +117,10 @@
<Compile Include="Model\PhotoHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ViewModels\AboutVM.cs" />
<Compile Include="ViewModels\GameVM.cs" />
<Compile Include="ViewModels\MainPageVM.cs" />
<Compile Include="ViewModels\MatchVM.cs" />
<Compile Include="ViewModels\PhotoVM.cs" />
<Compile Include="ViewModels\ScoreVM.cs" />
<Compile Include="ViewModels\SettingsVM.cs" />
<Compile Include="ViewModels\StatisticsVM.cs" />
@@ -126,9 +128,15 @@
<Compile Include="Views\AboutView.xaml.cs">
<DependentUpon>AboutView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\GameView.xaml.cs">
<DependentUpon>GameView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\MatchView.xaml.cs">
<DependentUpon>MatchView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\PhotoView.xaml.cs">
<DependentUpon>PhotoView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ScoreView.xaml.cs">
<DependentUpon>ScoreView.xaml</DependentUpon>
</Compile>
@@ -138,6 +146,9 @@
<Compile Include="Views\StatisticsView.xaml.cs">
<DependentUpon>StatisticsView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\WaitingView.xaml.cs">
<DependentUpon>WaitingView.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
@@ -183,10 +194,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\GameView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\MatchView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\PhotoView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ScoreView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -199,6 +218,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\WaitingView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Folder Include="Helpers\Comparer\" />