diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/FormsApplication.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/FormsApplication.cs b/Xamarin.Forms.Platform.Tizen/FormsApplication.cs index 4399efb4..cae21e27 100644 --- a/Xamarin.Forms.Platform.Tizen/FormsApplication.cs +++ b/Xamarin.Forms.Platform.Tizen/FormsApplication.cs @@ -1,13 +1,13 @@ using System; using System.ComponentModel; using System.Diagnostics; -using Xamarin.Forms.Internals; -using Tizen.Applications; +using System.Threading.Tasks; using ElmSharp; +using Tizen.Applications; +using Xamarin.Forms.Internals; using EButton = ElmSharp.Button; -using EProgressBar = ElmSharp.ProgressBar; using EColor = ElmSharp.Color; -using ELabel = ElmSharp.Label; +using EProgressBar = ElmSharp.ProgressBar; namespace Xamarin.Forms.Platform.Tizen { @@ -92,8 +92,16 @@ namespace Xamarin.Forms.Platform.Tizen } } - public void LoadApplication(Application application) + [EditorBrowsable(EditorBrowsableState.Never)] + public static Func<Task> RequestingUserConsentFunc { get; set; } = null; + + public async void LoadApplication(Application application) { + if (RequestingUserConsentFunc != null) + { + await RequestingUserConsentFunc(); + } + if (null == MainWindow) { throw new NullReferenceException("MainWindow is not prepared. This method should be called in OnCreated()."); @@ -104,7 +112,6 @@ namespace Xamarin.Forms.Platform.Tizen throw new ArgumentNullException("application"); } _application = application; - Application.Current = application; application.SendStart(); application.PropertyChanged += new PropertyChangedEventHandler(this.AppOnPropertyChanged); |