From 9105b16df86bca4ed8ed522f813d5c51ceb57e2e Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Sun, 5 May 2024 16:45:25 +0300 Subject: [PATCH] Add singleton support for QuikApplication. --- Quik/QuikApplication.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Quik/QuikApplication.cs b/Quik/QuikApplication.cs index af3b74e..24aa773 100644 --- a/Quik/QuikApplication.cs +++ b/Quik/QuikApplication.cs @@ -49,6 +49,7 @@ namespace Quik { Platform = platform; FontProvider = new FontProvider(this); + Current = this; } public IDisposable GetMedia(object key, MediaHint hint) @@ -101,5 +102,12 @@ namespace Quik } } } + + public static QuikApplication Current { get; private set; } + + public static void SetCurrentApplication(QuikApplication application) + { + Current = application; + } } } \ No newline at end of file