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:
authorCartBlanche <savagesoftware@gmail.com>2019-06-20 12:51:55 +0300
committerCartBlanche <savagesoftware@gmail.com>2019-06-20 12:51:55 +0300
commit6ef99516182a903b5aaeeeca486e706695293d41 (patch)
treeef3b6fb7c3db69c49b44ac1a0b966781770648ae /Xamarin.PropertyEditing.Mac
parentfd8c56278e746c9bba04a66e78bfe33d1d2e0307 (diff)
[Mac] Sharable ModalWindowCloseDelegate. For Bindings and Variations to begin with.
Diffstat (limited to 'Xamarin.PropertyEditing.Mac')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs
new file mode 100644
index 0000000..df2506f
--- /dev/null
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ModalWindowCloseDelegate.cs
@@ -0,0 +1,16 @@
+using System;
+using AppKit;
+using Foundation;
+
+namespace Xamarin.PropertyEditing.Mac
+{
+ internal class ModalWindowCloseDelegate : NSWindowDelegate
+ {
+ public NSModalResponse Response { get; set; } = NSModalResponse.Cancel;
+
+ public override void WillClose (NSNotification notification)
+ {
+ NSApplication.SharedApplication.StopModalWithCode ((int)Response);
+ }
+ }
+}