blob: ad2e4d04612564fa4cbc7e69effec90750bf7fa2 (
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
36
37
38
39
40
41
42
43
|
using System;
using Foundation;
using AppKit;
using Xamarin.PropertyEditing.Tests.MockControls;
namespace Xamarin.PropertyEditing.Mac.Standalone
{
public abstract class MockedAppKitControlButton<T> : AppKit.NSButtonCell where T : MockControl
{
protected MockedAppKitControlButton (T mockedControl, IntPtr handle) : base (handle)
{
MockedControl = mockedControl;
Initialize ();
}
protected MockedAppKitControlButton (T mockedControl, NSCoder coder) : base (coder)
{
Initialize ();
MockedControl = mockedControl;
}
// Shared initialization code
void Initialize ()
{
}
public T MockedControl { get; }
}
public partial class MockedAppKitButton : MockedAppKitControlButton<MockNSButton>
{
// Called when created from unmanaged code
public MockedAppKitButton (IntPtr handle) : base (new MockNSButton (), handle)
{
}
// Called when created directly from a XIB file
[Export ("initWithCoder:")]
public MockedAppKitButton (NSCoder coder) : base (new MockNSButton (), coder)
{
}
}
}
|