diff --git a/Marechai.App/App.xaml.cs b/Marechai.App/App.xaml.cs index 61bae854..83eb47ab 100644 --- a/Marechai.App/App.xaml.cs +++ b/Marechai.App/App.xaml.cs @@ -1,4 +1,6 @@ using System.Net.Http; +using Marechai.App.Presentation.ViewModels; +using Marechai.App.Presentation.Views; using Marechai.App.Services; using Microsoft.UI.Xaml; using Uno.Extensions; @@ -8,6 +10,11 @@ using Uno.Extensions.Http; using Uno.Extensions.Localization; using Uno.Extensions.Navigation; using Uno.UI; +using ComputersListViewModel = Marechai.App.Presentation.ViewModels.ComputersListViewModel; +using ComputersViewModel = Marechai.App.Presentation.ViewModels.ComputersViewModel; +using MachineViewViewModel = Marechai.App.Presentation.ViewModels.MachineViewViewModel; +using MainViewModel = Marechai.App.Presentation.ViewModels.MainViewModel; +using NewsViewModel = Marechai.App.Presentation.ViewModels.NewsViewModel; namespace Marechai.App; diff --git a/Marechai.App/Helpers/UntypedNodeExtractor.cs b/Marechai.App/Helpers/UntypedNodeExtractor.cs index 762554cc..11a0f4cb 100644 --- a/Marechai.App/Helpers/UntypedNodeExtractor.cs +++ b/Marechai.App/Helpers/UntypedNodeExtractor.cs @@ -1,6 +1,6 @@ using Microsoft.Kiota.Abstractions.Serialization; -namespace Marechai.App.Services; +namespace Marechai.App.Helpers; /// /// Helper class for extracting values from Kiota UntypedNode objects. diff --git a/Marechai.App/Marechai.App.csproj b/Marechai.App/Marechai.App.csproj index 1f8beaf9..9be6967d 100644 --- a/Marechai.App/Marechai.App.csproj +++ b/Marechai.App/Marechai.App.csproj @@ -44,5 +44,39 @@ + + + Shell.xaml + true + + + SecondPage.xaml + true + + + ComputersPage.xaml + true + + + MainPage.xaml + true + + + ComputersListPage.xaml + true + + + NewsPage.xaml + true + + + MachineViewPage.xaml + true + + + Sidebar.xaml + true + + diff --git a/Marechai.App/Presentation/Components/Sidebar.xaml b/Marechai.App/Presentation/Components/Sidebar.xaml index a3dceb7f..b5da531a 100644 --- a/Marechai.App/Presentation/Components/Sidebar.xaml +++ b/Marechai.App/Presentation/Components/Sidebar.xaml @@ -1,7 +1,7 @@ - /// Navigation parameter for the MachineViewPage containing both the machine ID and the navigation source. diff --git a/Marechai.App/Presentation/ViewModels/ComputersListViewModel.cs b/Marechai.App/Presentation/ViewModels/ComputersListViewModel.cs index dd9dfdaa..2fa92341 100644 --- a/Marechai.App/Presentation/ViewModels/ComputersListViewModel.cs +++ b/Marechai.App/Presentation/ViewModels/ComputersListViewModel.cs @@ -6,10 +6,12 @@ using System.Collections.ObjectModel; using System.Linq; using System.Threading.Tasks; using System.Windows.Input; +using Marechai.App.Helpers; +using Marechai.App.Presentation.Models; using Marechai.App.Services; using Uno.Extensions.Navigation; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.ViewModels; /// /// ViewModel for displaying a filtered list of computers diff --git a/Marechai.App/Presentation/ViewModels/ComputersViewModel.cs b/Marechai.App/Presentation/ViewModels/ComputersViewModel.cs index 5a917965..649826a9 100644 --- a/Marechai.App/Presentation/ViewModels/ComputersViewModel.cs +++ b/Marechai.App/Presentation/ViewModels/ComputersViewModel.cs @@ -5,7 +5,7 @@ using System.Windows.Input; using Marechai.App.Services; using Uno.Extensions.Navigation; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.ViewModels; public partial class ComputersViewModel : ObservableObject { diff --git a/Marechai.App/Presentation/ViewModels/MachineViewViewModel.cs b/Marechai.App/Presentation/ViewModels/MachineViewViewModel.cs index 675f564b..a6209a36 100644 --- a/Marechai.App/Presentation/ViewModels/MachineViewViewModel.cs +++ b/Marechai.App/Presentation/ViewModels/MachineViewViewModel.cs @@ -30,12 +30,13 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Threading.Tasks; using Humanizer; +using Marechai.App.Helpers; using Marechai.App.Services; using Marechai.Data; using Microsoft.UI.Xaml; using Uno.Extensions.Navigation; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.ViewModels; public partial class MachineViewViewModel : ObservableObject { diff --git a/Marechai.App/Presentation/ViewModels/MainViewModel.cs b/Marechai.App/Presentation/ViewModels/MainViewModel.cs index 0d3c6172..8a23d5cd 100644 --- a/Marechai.App/Presentation/ViewModels/MainViewModel.cs +++ b/Marechai.App/Presentation/ViewModels/MainViewModel.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using System.Windows.Input; using Uno.Extensions.Navigation; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.ViewModels; public partial class MainViewModel : ObservableObject { diff --git a/Marechai.App/Presentation/ViewModels/NewsViewModel.cs b/Marechai.App/Presentation/ViewModels/NewsViewModel.cs index 9267a4e6..3e67c51a 100644 --- a/Marechai.App/Presentation/ViewModels/NewsViewModel.cs +++ b/Marechai.App/Presentation/ViewModels/NewsViewModel.cs @@ -2,11 +2,13 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Threading.Tasks; +using Marechai.App.Helpers; +using Marechai.App.Presentation.Models; using Marechai.App.Services; using Marechai.Data; using Uno.Extensions.Navigation; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.ViewModels; /// /// Wrapper for NewsDto with generated display text diff --git a/Marechai.App/Presentation/ViewModels/SecondViewModel.cs b/Marechai.App/Presentation/ViewModels/SecondViewModel.cs index cd90246d..f59b44d4 100644 --- a/Marechai.App/Presentation/ViewModels/SecondViewModel.cs +++ b/Marechai.App/Presentation/ViewModels/SecondViewModel.cs @@ -1,5 +1,3 @@ -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.ViewModels; -public partial record SecondViewModel(Entity Entity) -{ -} +public record SecondViewModel(Entity Entity) {} \ No newline at end of file diff --git a/Marechai.App/Presentation/ViewModels/ShellViewModel.cs b/Marechai.App/Presentation/ViewModels/ShellViewModel.cs index 38c4b1a6..13edb3f6 100644 --- a/Marechai.App/Presentation/ViewModels/ShellViewModel.cs +++ b/Marechai.App/Presentation/ViewModels/ShellViewModel.cs @@ -1,15 +1,12 @@ using Uno.Extensions.Navigation; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.ViewModels; public class ShellViewModel { private readonly INavigator _navigator; - public ShellViewModel( - INavigator navigator) - { - _navigator = navigator; - // Add code here to initialize or attach event handlers to singleton services - } -} + public ShellViewModel(INavigator navigator) => _navigator = navigator; + + // Add code here to initialize or attach event handlers to singleton services +} \ No newline at end of file diff --git a/Marechai.App/Presentation/Views/ComputersListPage.xaml b/Marechai.App/Presentation/Views/ComputersListPage.xaml index d07b048b..e98f1551 100644 --- a/Marechai.App/Presentation/Views/ComputersListPage.xaml +++ b/Marechai.App/Presentation/Views/ComputersListPage.xaml @@ -1,7 +1,7 @@ - /// Professional list view for displaying computers filtered by letter, year, or all. diff --git a/Marechai.App/Presentation/Views/ComputersPage.xaml b/Marechai.App/Presentation/Views/ComputersPage.xaml index 8e6b91c6..abafb0b8 100644 --- a/Marechai.App/Presentation/Views/ComputersPage.xaml +++ b/Marechai.App/Presentation/Views/ComputersPage.xaml @@ -1,7 +1,7 @@ - - - - @@ -27,9 +27,9 @@ Grid.Column="0" Width="280" HorizontalAlignment="Left"> - + diff --git a/Marechai.App/Presentation/Views/MainPage.xaml.cs b/Marechai.App/Presentation/Views/MainPage.xaml.cs index 120b51ca..85cfe3fa 100644 --- a/Marechai.App/Presentation/Views/MainPage.xaml.cs +++ b/Marechai.App/Presentation/Views/MainPage.xaml.cs @@ -1,9 +1,10 @@ using System; using System.ComponentModel; +using Marechai.App.Presentation.ViewModels; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.Views; public sealed partial class MainPage : Page { diff --git a/Marechai.App/Presentation/Views/NewsPage.xaml b/Marechai.App/Presentation/Views/NewsPage.xaml index 0f1521cf..3cfd3c4a 100644 --- a/Marechai.App/Presentation/Views/NewsPage.xaml +++ b/Marechai.App/Presentation/Views/NewsPage.xaml @@ -1,7 +1,7 @@ - - - - - - - - - - + + + + + + + + - - + + \ No newline at end of file diff --git a/Marechai.App/Presentation/Views/SecondPage.xaml.cs b/Marechai.App/Presentation/Views/SecondPage.xaml.cs index 8d0eff64..cb728081 100644 --- a/Marechai.App/Presentation/Views/SecondPage.xaml.cs +++ b/Marechai.App/Presentation/Views/SecondPage.xaml.cs @@ -1,11 +1,11 @@ using Microsoft.UI.Xaml.Controls; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.Views; public sealed partial class SecondPage : Page { public SecondPage() { - this.InitializeComponent(); + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/Marechai.App/Presentation/Views/Shell.xaml b/Marechai.App/Presentation/Views/Shell.xaml index 7cc97d14..57fda752 100644 --- a/Marechai.App/Presentation/Views/Shell.xaml +++ b/Marechai.App/Presentation/Views/Shell.xaml @@ -1,36 +1,34 @@ - - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + \ No newline at end of file diff --git a/Marechai.App/Presentation/Views/Shell.xaml.cs b/Marechai.App/Presentation/Views/Shell.xaml.cs index 2306cba3..cf0e1bf1 100644 --- a/Marechai.App/Presentation/Views/Shell.xaml.cs +++ b/Marechai.App/Presentation/Views/Shell.xaml.cs @@ -1,14 +1,14 @@ using Microsoft.UI.Xaml.Controls; using Uno.Extensions.Hosting; -namespace Marechai.App.Presentation; +namespace Marechai.App.Presentation.Views; public sealed partial class Shell : UserControl, IContentControlProvider { public Shell() { - this.InitializeComponent(); + InitializeComponent(); } public ContentControl ContentControl => Splash; -} +} \ No newline at end of file diff --git a/Marechai.App/Services/ComputersService.cs b/Marechai.App/Services/ComputersService.cs index 5548683b..b6f03d3f 100644 --- a/Marechai.App/Services/ComputersService.cs +++ b/Marechai.App/Services/ComputersService.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Marechai.App.Helpers; using Microsoft.Kiota.Abstractions.Serialization; namespace Marechai.App.Services;