Index: Core/Gui/src/Core.Gui/Core.Gui.csproj =================================================================== diff -u -rcf6a8a632e8f790a5bf3f25ab54d80ca0c91bc74 -r90e6ceb054e3c6826246e33aa9fe19f7aeedc444 --- Core/Gui/src/Core.Gui/Core.Gui.csproj (.../Core.Gui.csproj) (revision cf6a8a632e8f790a5bf3f25ab54d80ca0c91bc74) +++ Core/Gui/src/Core.Gui/Core.Gui.csproj (.../Core.Gui.csproj) (revision 90e6ceb054e3c6826246e33aa9fe19f7aeedc444) @@ -45,15 +45,11 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - MSBuild:Compile Designer - + MSBuild:Compile Designer Fisheye: Tag 90e6ceb054e3c6826246e33aa9fe19f7aeedc444 refers to a dead (removed) revision in file `Core/Gui/src/Core.Gui/Forms/MainWindow/StartScreen.xaml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 90e6ceb054e3c6826246e33aa9fe19f7aeedc444 refers to a dead (removed) revision in file `Core/Gui/src/Core.Gui/Forms/MainWindow/StartScreen.xaml.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 90e6ceb054e3c6826246e33aa9fe19f7aeedc444 refers to a dead (removed) revision in file `Core/Gui/src/Core.Gui/Forms/MainWindow/StartScreenViewModel.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 90e6ceb054e3c6826246e33aa9fe19f7aeedc444 refers to a dead (removed) revision in file `Core/Gui/src/Core.Gui/Forms/SplashScreen/SplashScreen.xaml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 90e6ceb054e3c6826246e33aa9fe19f7aeedc444 refers to a dead (removed) revision in file `Core/Gui/src/Core.Gui/Forms/SplashScreen/SplashScreen.xaml.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreen.xaml =================================================================== diff -u --- Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreen.xaml (revision 0) +++ Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreen.xaml (revision 90e6ceb054e3c6826246e33aa9fe19f7aeedc444) @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreen.xaml.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreen.xaml.cs (revision 0) +++ Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreen.xaml.cs (revision 90e6ceb054e3c6826246e33aa9fe19f7aeedc444) @@ -0,0 +1,50 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using MahApps.Metro.Controls; + +namespace Core.Gui.Forms.StartScreen +{ + /// + /// Interaction logic for . + /// + public partial class StartScreen : MetroWindow + { + /// + /// Creates a new instance of . + /// + /// The view model of the . + /// Thrown when + /// is null. + public StartScreen(StartScreenViewModel viewModel) + { + if (viewModel == null) + { + throw new ArgumentNullException(nameof(viewModel)); + } + + InitializeComponent(); + + DataContext = viewModel; + } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreenViewModel.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreenViewModel.cs (revision 0) +++ Core/Gui/src/Core.Gui/Forms/StartScreen/StartScreenViewModel.cs (revision 90e6ceb054e3c6826246e33aa9fe19f7aeedc444) @@ -0,0 +1,65 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Windows.Input; +using Core.Gui.Commands; + +namespace Core.Gui.Forms.StartScreen +{ + /// + /// ViewModel for . + /// + public class StartScreenViewModel + { + /// + /// Creates a new instance of . + /// + /// The action to perform to create a new project. + /// The action to perform to open a project. + /// Thrown when any parameter is null. + public StartScreenViewModel(Action newProjectAction, Action openProjectAction) + { + if (newProjectAction == null) + { + throw new ArgumentNullException(nameof(newProjectAction)); + } + + if (openProjectAction == null) + { + throw new ArgumentNullException(nameof(openProjectAction)); + } + + NewProjectCommand = new RelayCommand(o => newProjectAction()); + OpenProjectCommand = new RelayCommand(o => openProjectAction()); + } + + /// + /// Gets the command to create a new project. + /// + public ICommand NewProjectCommand { get; } + + /// + /// Gets the command to open a project. + /// + public ICommand OpenProjectCommand { get; } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/GuiCore.cs =================================================================== diff -u -r7942f0626806a8075b1ea3808668a20e2df2b197 -r90e6ceb054e3c6826246e33aa9fe19f7aeedc444 --- Core/Gui/src/Core.Gui/GuiCore.cs (.../GuiCore.cs) (revision 7942f0626806a8075b1ea3808668a20e2df2b197) +++ Core/Gui/src/Core.Gui/GuiCore.cs (.../GuiCore.cs) (revision 90e6ceb054e3c6826246e33aa9fe19f7aeedc444) @@ -40,6 +40,7 @@ using Core.Gui.Forms.MainWindow; using Core.Gui.Forms.MessageWindow; using Core.Gui.Forms.PropertyGridView; +using Core.Gui.Forms.StartScreen; using Core.Gui.Forms.ViewHost; using Core.Gui.Helpers; using Core.Gui.Plugin; Index: Core/Gui/src/Core.Gui/Style/DeltaresGeneralStyle.xaml =================================================================== diff -u -rcf6a8a632e8f790a5bf3f25ab54d80ca0c91bc74 -r90e6ceb054e3c6826246e33aa9fe19f7aeedc444 --- Core/Gui/src/Core.Gui/Style/DeltaresGeneralStyle.xaml (.../DeltaresGeneralStyle.xaml) (revision cf6a8a632e8f790a5bf3f25ab54d80ca0c91bc74) +++ Core/Gui/src/Core.Gui/Style/DeltaresGeneralStyle.xaml (.../DeltaresGeneralStyle.xaml) (revision 90e6ceb054e3c6826246e33aa9fe19f7aeedc444) @@ -24,7 +24,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:mainWindow="clr-namespace:Core.Gui.Forms.MainWindow" - xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"> + xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:startScreen="clr-namespace:Core.Gui.Forms.StartScreen"> @@ -70,7 +71,7 @@ -