From 54e3491f626e38c05dae9d5435ad8d54b0fdfdae Mon Sep 17 00:00:00 2001 From: Lou BRODA Date: Sun, 8 Oct 2023 17:53:41 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/README.md b/README.md index 4230c45..6d6b7c7 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,52 @@ Disponible sur : - View Model non utilisés et fonctionnalités pas toutes mises en place (seulement les vues) - Navigation généralement utilisable mais pas parfaitement codée +--- + +Étape 2 : Personnal MVVM Toolkit + +```mermaid +classDiagram +direction LR +class INotifyPropertyChanged { + <> +} + +class ObservableObject{ + +PropertyChanged: event PropertyChangedEventHandler?; + #OnPropertyChanged (string PropertyName = null) : void + #SetProperty (T member, T value, Action action, string propertyName = null) : void + #SetProperty (ref T member, T value, string propertyName = null) : void +} + +class BaseViewModel : T{ + +Model: TModel; + -model: TModel; + +BaseViewModel(TModel model) + +BaseViewModel() : this(default) +} + +class BaseViewModel{ +} + +class ICommand{ + <> +} + +class RelayCommand : T{ + +CanExecuteChanged: event EventHandler?; + +CanExecute (object? parameter) : bool + +Execute (object? parameter) : void + +RefreshCommand() : void +} + +ObservableObject ..|> INotifyPropertyChanged +BaseViewModel --|> ObservableObject +BaseViewModel --|> ObservableObject +RelayCommand ..|> ICommand + +``` + *******
From 7e3e2a985253345d8b1272a1b3e55535596dcda0 Mon Sep 17 00:00:00 2001 From: Lou BRODA Date: Sun, 8 Oct 2023 17:54:03 +0200 Subject: [PATCH 2/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d6b7c7..3dc3d84 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ class ObservableObject{ #SetProperty (ref T member, T value, string propertyName = null) : void } -class BaseViewModel : T{ +class BaseViewModel{ +Model: TModel; -model: TModel; +BaseViewModel(TModel model) @@ -70,7 +70,7 @@ class ICommand{ <> } -class RelayCommand : T{ +class RelayCommand{ +CanExecuteChanged: event EventHandler?; +CanExecute (object? parameter) : bool +Execute (object? parameter) : void From 96b535075f3025568a345d7a68085e8c1be5085a Mon Sep 17 00:00:00 2001 From: Lou BRODA Date: Sun, 8 Oct 2023 17:54:45 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 3dc3d84..d21f7e3 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,6 @@ class BaseViewModel{ +BaseViewModel() : this(default) } -class BaseViewModel{ -} - class ICommand{ <> } From 6681924b44b149cfc9ae8201e8c8dafb5426e549 Mon Sep 17 00:00:00 2001 From: Lou BRODA Date: Sun, 8 Oct 2023 17:55:07 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d21f7e3..d59b664 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,6 @@ class RelayCommand{ ObservableObject ..|> INotifyPropertyChanged BaseViewModel --|> ObservableObject -BaseViewModel --|> ObservableObject RelayCommand ..|> ICommand ```