From ea22a9534860a726ff3273a3aaa4b50884cb304d Mon Sep 17 00:00:00 2001 From: Yik Teng Hie Date: Mon, 6 Feb 2023 15:57:02 +0800 Subject: [PATCH] add MvvmAppUi class library --- MvvmAppCore/Models/MotorProfile.cs | 12 ++++++ .../ViewModels/MotorProfileViewModel.cs | 15 ++++++++ MvvmAppUi/MvvmAppUi.csproj | 17 +++++++++ MvvmAppUi/Views/MotorProfileView.xaml | 38 +++++++++++++++++++ MvvmAppUi/Views/MotorProfileView.xaml.cs | 19 ++++++++++ MvvmCommunityApp.sln | 6 +++ MvvmCommunityApp/App.xaml.cs | 1 + MvvmCommunityApp/MainWindow.xaml | 2 + MvvmCommunityApp/MvvmCommunityApp.csproj | 1 + 9 files changed, 111 insertions(+) create mode 100644 MvvmAppCore/Models/MotorProfile.cs create mode 100644 MvvmAppCore/ViewModels/MotorProfileViewModel.cs create mode 100644 MvvmAppUi/MvvmAppUi.csproj create mode 100644 MvvmAppUi/Views/MotorProfileView.xaml create mode 100644 MvvmAppUi/Views/MotorProfileView.xaml.cs diff --git a/MvvmAppCore/Models/MotorProfile.cs b/MvvmAppCore/Models/MotorProfile.cs new file mode 100644 index 0000000..a156531 --- /dev/null +++ b/MvvmAppCore/Models/MotorProfile.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MvvmAppCore.Models +{ + internal class MotorProfile + { + } +} diff --git a/MvvmAppCore/ViewModels/MotorProfileViewModel.cs b/MvvmAppCore/ViewModels/MotorProfileViewModel.cs new file mode 100644 index 0000000..b16ab69 --- /dev/null +++ b/MvvmAppCore/ViewModels/MotorProfileViewModel.cs @@ -0,0 +1,15 @@ +using CommunityToolkit.Mvvm.ComponentModel; + +namespace MvvmAppCore.ViewModels +{ + public partial class MotorProfileViewModel : ObservableObject + { + [ObservableProperty] + private string _motorName; + + public MotorProfileViewModel() + { + MotorName = "Elevator"; + } + } +} diff --git a/MvvmAppUi/MvvmAppUi.csproj b/MvvmAppUi/MvvmAppUi.csproj new file mode 100644 index 0000000..51c7aeb --- /dev/null +++ b/MvvmAppUi/MvvmAppUi.csproj @@ -0,0 +1,17 @@ + + + + net6.0-windows + enable + true + + + + + + + + + + + diff --git a/MvvmAppUi/Views/MotorProfileView.xaml b/MvvmAppUi/Views/MotorProfileView.xaml new file mode 100644 index 0000000..c78c51d --- /dev/null +++ b/MvvmAppUi/Views/MotorProfileView.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + +