Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Ewing <lewing@gmail.com>2018-05-16 23:10:33 +0300
committerLarry Ewing <lewing@microsoft.com>2018-07-16 22:05:49 +0300
commitf1493a820084403b92e417f517a7be7009f3e879 (patch)
tree7f95cc1823db532ce4221a7d5334be5cc312f3c4 /Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs
parentbe3e495b986db4eb09ecd206718a7455d581a765 (diff)
Rename notifying listner adaptor users
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs
new file mode 100644
index 0000000..86c58d4
--- /dev/null
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using AppKit;
+using CoreAnimation;
+using CoreGraphics;
+using Xamarin.PropertyEditing.Drawing;
+using Xamarin.PropertyEditing.ViewModels;
+
+namespace Xamarin.PropertyEditing.Mac
+{
+ class NotifyingViewController<T> : NSViewController, INotifyingListner<T> where T : NotifyingObject
+ {
+ internal T ViewModel {
+ get => adaptor.ViewModel;
+ set => adaptor.ViewModel = value;
+ }
+
+ public NotifyingViewController ()
+ {
+ adaptor = new NotifyingViewAdaptor<T> (this);
+ }
+
+ protected NotifyingViewAdaptor<T> adaptor { get; }
+
+ public virtual void OnViewModelChanged (T oldModel)
+ {
+ }
+
+ public virtual void OnPropertyChanged (object sender, PropertyChangedEventArgs e)
+ {
+ }
+ }
+}