PopupManager.cs 816 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using InABox.Mobile.Shared;
  3. using Microsoft.Extensions.Logging;
  4. [assembly: Xamarin.Forms.Dependency(typeof(InABox.Mobile.Android.PopupManager))]
  5. namespace InABox.Mobile.Android
  6. {
  7. public class PopupManager : IPopupManager
  8. {
  9. private static bool _initialised = false;
  10. public bool Initialise()
  11. {
  12. if (!_initialised)
  13. {
  14. try
  15. {
  16. Syncfusion.XForms.Android.PopupLayout.SfPopupLayoutRenderer.Init();
  17. _initialised = true;
  18. }
  19. catch (Exception e)
  20. {
  21. MobileLogging.Log(e);
  22. _initialised = false;
  23. }
  24. }
  25. return _initialised;
  26. }
  27. }
  28. }