diff --git a/PenaltyMaster3000/App.xaml b/PenaltyMaster3000/App.xaml
index da77f29..ee1a9fd 100644
--- a/PenaltyMaster3000/App.xaml
+++ b/PenaltyMaster3000/App.xaml
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:PenaltyMaster3000"
- StartupUri="View/MainView.xaml">
+ StartupUri="View/StartView.xaml">
diff --git a/PenaltyMaster3000/Images/football_ball.png b/PenaltyMaster3000/Images/football_ball.png
new file mode 100644
index 0000000..9ffbaab
Binary files /dev/null and b/PenaltyMaster3000/Images/football_ball.png differ
diff --git a/PenaltyMaster3000/Images/whistle.png b/PenaltyMaster3000/Images/whistle.png
new file mode 100644
index 0000000..c3d9117
Binary files /dev/null and b/PenaltyMaster3000/Images/whistle.png differ
diff --git a/PenaltyMaster3000/Navigation/INavigationService.cs b/PenaltyMaster3000/Navigation/INavigationService.cs
new file mode 100644
index 0000000..3b05436
--- /dev/null
+++ b/PenaltyMaster3000/Navigation/INavigationService.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PenaltyMaster3000.Navigation
+{
+ public interface INavigationService
+ {
+ void NavigateTo(string pageKey);
+ }
+}
diff --git a/PenaltyMaster3000/Navigation/NavigationService.cs b/PenaltyMaster3000/Navigation/NavigationService.cs
new file mode 100644
index 0000000..b9085ef
--- /dev/null
+++ b/PenaltyMaster3000/Navigation/NavigationService.cs
@@ -0,0 +1,34 @@
+using PenaltyMaster3000.View;
+using PenaltyMaster3000.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PenaltyMaster3000.Navigation
+{
+ public class NavigationService : INavigationService
+ {
+ private readonly StartView _startView;
+
+ public NavigationService(StartView startView)
+ {
+ _startView = startView;
+ }
+
+ public void NavigateTo(string pageKey)
+ {
+ switch(pageKey)
+ {
+ case "MainView":
+ MainView mainView = new MainView();
+ _startView.Content = mainView;
+ break;
+
+ default:
+ throw new ArgumentException($"PageKey {pageKey} non prise en charge.");
+ }
+ }
+ }
+}
diff --git a/PenaltyMaster3000/PenaltyMaster3000.csproj b/PenaltyMaster3000/PenaltyMaster3000.csproj
index a06f26c..95a9935 100644
--- a/PenaltyMaster3000/PenaltyMaster3000.csproj
+++ b/PenaltyMaster3000/PenaltyMaster3000.csproj
@@ -87,10 +87,16 @@
App.xaml
Code
+
+
+
MainView.xaml
+
+ StartView.xaml
+
@@ -134,10 +140,20 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+
+
diff --git a/PenaltyMaster3000/View/MainView.xaml b/PenaltyMaster3000/View/MainView.xaml
index ff04e59..91acf57 100644
--- a/PenaltyMaster3000/View/MainView.xaml
+++ b/PenaltyMaster3000/View/MainView.xaml
@@ -1,17 +1,17 @@
-
+ Height="Auto" Width="Auto">
-
+
@@ -28,31 +28,85 @@
Grid.RowSpan="2"
Grid.Column="0"
Visibility="Hidden"/>
+
+
+
+
+
+
+
+
+ Grid.Column="1"
+ Visibility="Visible"/>
+
+
+
+
+
-
+
diff --git a/PenaltyMaster3000/View/MainView.xaml.cs b/PenaltyMaster3000/View/MainView.xaml.cs
index d5bc0f4..59d23a3 100644
--- a/PenaltyMaster3000/View/MainView.xaml.cs
+++ b/PenaltyMaster3000/View/MainView.xaml.cs
@@ -18,7 +18,7 @@ namespace PenaltyMaster3000.View
///
/// Logique d'interaction pour MainView.xaml
///
- public partial class MainView : Window
+ public partial class MainView : UserControl
{
public MainVM MainVM { get; set; }
diff --git a/PenaltyMaster3000/View/StartView.xaml b/PenaltyMaster3000/View/StartView.xaml
new file mode 100644
index 0000000..1052a5a
--- /dev/null
+++ b/PenaltyMaster3000/View/StartView.xaml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PenaltyMaster3000/View/StartView.xaml.cs b/PenaltyMaster3000/View/StartView.xaml.cs
new file mode 100644
index 0000000..884a29a
--- /dev/null
+++ b/PenaltyMaster3000/View/StartView.xaml.cs
@@ -0,0 +1,34 @@
+using PenaltyMaster3000.Navigation;
+using PenaltyMaster3000.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace PenaltyMaster3000.View
+{
+ ///
+ /// Logique d'interaction pour StartView.xaml
+ ///
+ public partial class StartView : Window
+ {
+ public StartVM StartVM { get; set; }
+
+ public StartView()
+ {
+ var navigationService = new NavigationService(this);
+ StartVM = new StartVM(navigationService);
+ InitializeComponent();
+ DataContext = StartVM;
+ }
+ }
+}
diff --git a/PenaltyMaster3000/ViewModel/StartVM.cs b/PenaltyMaster3000/ViewModel/StartVM.cs
new file mode 100644
index 0000000..884f1ef
--- /dev/null
+++ b/PenaltyMaster3000/ViewModel/StartVM.cs
@@ -0,0 +1,32 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using PenaltyMaster3000.Navigation;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using System.Windows.Navigation;
+
+namespace PenaltyMaster3000.ViewModel
+{
+ public class StartVM : ObservableObject
+ {
+
+ private readonly INavigationService _navigationService;
+
+ public ICommand StartCommand { get; set; }
+
+ public StartVM(INavigationService navigationService)
+ {
+ _navigationService = navigationService;
+ StartCommand = new RelayCommand(Start);
+ }
+
+ private void Start()
+ {
+ _navigationService.NavigateTo("MainView");
+ }
+ }
+}