blob: 86c58d4206da02bf925e37e7667f33d0a0dcbc37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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)
{
}
}
}
|