blob: c572a275fbd078fe73554b56f8a49252ef43ea47 (
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
{
internal 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)
{
}
}
}
|