From b18396f8d81d9784be81402c5ea203518845ef74 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Fri, 14 Nov 2025 20:59:12 +0000 Subject: [PATCH] Add computers page. --- Marechai.App/App.xaml.cs | 19 +- Marechai.App/Presentation/ComputersPage.xaml | 297 ++++++++++++++++++ .../Presentation/ComputersPage.xaml.cs | 43 +++ .../Presentation/ComputersViewModel.cs | 177 +++++++++++ Marechai.App/Presentation/MainPage.xaml | 123 +------- Marechai.App/Presentation/MainPage.xaml.cs | 42 --- Marechai.App/Presentation/MainViewModel.cs | 20 +- Marechai.App/Presentation/NewsPage.xaml | 123 ++++++++ Marechai.App/Presentation/NewsPage.xaml.cs | 72 +++++ 9 files changed, 751 insertions(+), 165 deletions(-) create mode 100644 Marechai.App/Presentation/ComputersPage.xaml create mode 100644 Marechai.App/Presentation/ComputersPage.xaml.cs create mode 100644 Marechai.App/Presentation/ComputersViewModel.cs create mode 100644 Marechai.App/Presentation/NewsPage.xaml create mode 100644 Marechai.App/Presentation/NewsPage.xaml.cs diff --git a/Marechai.App/App.xaml.cs b/Marechai.App/App.xaml.cs index 1b3eb70e..a87dcc79 100644 --- a/Marechai.App/App.xaml.cs +++ b/Marechai.App/App.xaml.cs @@ -100,6 +100,8 @@ public partial class App : Application // Register application services services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); }) .UseNavigation(RegisterRoutes)); @@ -117,14 +119,27 @@ public partial class App : Application { views.Register(new ViewMap(ViewModel: typeof(ShellViewModel)), new ViewMap(), + new ViewMap(), + new ViewMap(), new DataViewMap()); routes.Register(new RouteMap("", views.FindByViewModel(), Nested: [ - new RouteMap("Main", views.FindByViewModel(), true), - new RouteMap("Second", views.FindByViewModel()) + new RouteMap("Main", + views.FindByViewModel(), + true, + Nested: + [ + new RouteMap("News", + views.FindByViewModel(), + true), + new RouteMap("computers", + views.FindByViewModel()), + new RouteMap("Second", + views.FindByViewModel()) + ]) ])); } } \ No newline at end of file diff --git a/Marechai.App/Presentation/ComputersPage.xaml b/Marechai.App/Presentation/ComputersPage.xaml new file mode 100644 index 00000000..8e6b91c6 --- /dev/null +++ b/Marechai.App/Presentation/ComputersPage.xaml @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +