public static HotelExplorer GetInstance() { if (_hotelExplorer == null) _hotelExplorer = new HotelExplorer(); return _hotelExplorer; }
public override void Dispose() { UnRegisterEvents(); _hotelExplorer = null; }
private void ShowHotelExplorer() { _hotelExplorer = new HotelExplorer(); _hotelExplorer.Drag += HotelExplorerDrag; var top = canvas.ActualHeight / 2 - (_hotelExplorer.Height / 2); var left = canvas.ActualWidth / 2 - (_hotelExplorer.Width / 2); _hotelExplorer.OptionClicked += HotelExplorerOptionClicked; _hotelExplorer.OptionUnUnChecked += HotelExplorerOptionUnChecked; FrameworkManager.RegisterElement(_hotelExplorer.TourVideoOption, false, new[] { TouchAction.Tap }); FrameworkManager.RegisterElement(_hotelExplorer.AccomodationsOption, false, new[] { TouchAction.Tap }); FrameworkManager.RegisterElement(_hotelExplorer.HotelMapOption, false, new[] { TouchAction.Tap }); FrameworkManager.RegisterElement(_hotelExplorer.PhotoGalleryOption, false, new[] { TouchAction.Tap }); FrameworkManager.RegisterElement(_hotelExplorer.CloseButton, false, new[] { TouchAction.Tap }); FrameworkManager.AddControlWithAllGestures(_hotelExplorer, left, top); _hotelExplorer.Closed += HotelExplorerClosed; }