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; } }
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; } }