Пример #1
0
 protected override void OnBackKeyPress(CancelEventArgs e)
 {
     base.OnBackKeyPress(e);
     if (this.FullscreenLoaders.Count > 0)
     {
         FullscreenLoader m0 = Enumerable.LastOrDefault <FullscreenLoader>(this.FullscreenLoaders, (Func <FullscreenLoader, bool>)(l => l.HideOnBackKeyPress));
         if (m0 != null)
         {
             m0.Hide(true);
         }
         e.Cancel = true;
     }
     else if (this.Flyouts.Count > 0)
     {
         e.Cancel = true;
         ((IFlyout)Enumerable.Last <IFlyout>(this.Flyouts)).Hide();
     }
     else
     {
         if (!this.IsMenuOpen || this.Flyouts.Count != 0)
         {
             return;
         }
         this.OpenCloseMenu(false, null, false);
         e.Cancel = true;
     }
 }
Пример #2
0
 protected override void OnBackKeyPress(CancelEventArgs e)
 {
     base.OnBackKeyPress(e);
     if (this.FullscreenLoaders.Count > 0)
     {
         FullscreenLoader fullscreenLoader = this.FullscreenLoaders.LastOrDefault <FullscreenLoader>((Func <FullscreenLoader, bool>)(l => l.HideOnBackKeyPress));
         if (fullscreenLoader != null)
         {
             int num = 1;
             fullscreenLoader.Hide(num != 0);
         }
         e.Cancel = true;
     }
     else if (this.Flyouts.Count > 0)
     {
         e.Cancel = true;
         this.Flyouts.Last <IFlyout>().Hide();
     }
     else
     {
         if (!this.IsMenuOpen || this.Flyouts.Count != 0)
         {
             return;
         }
         this.OpenCloseMenu(false, null, false);
         e.Cancel = true;
     }
 }
Пример #3
0
 public void Show(FrameworkElement childElement = null, bool addOverlay = true)
 {
     if (this.IsShowed)
     {
         return;
     }
     Execute.ExecuteOnUIThread((Action)(() =>
     {
         this._currentPage = FramePageUtils.CurrentPage;
         if (this._currentPage == null)
         {
             return;
         }
         this._container = this._currentPage.Content as Panel;
         if (this._container == null)
         {
             return;
         }
         this._childElement = FullscreenLoader.CreatePopupContainer();
         this._childElement.Child = (UIElement)(childElement ?? (FrameworkElement) new FullscreenLoadUC());
         if (addOverlay)
         {
             this._overlay = FullscreenLoader.CreateOverlay();
             this._container.Children.Add((UIElement)this._overlay);
         }
         this._container.Children.Add((UIElement)this._childElement);
         this.PreparePage(true);
         this.IsShowed = true;
         Action showedCallback = this.ShowedCallback;
         if (showedCallback == null)
         {
             return;
         }
         showedCallback();
     }));
 }