Skip to content

Instantly share code, notes, and snippets.

View LuisAlbertoPenaNunez's full-sized avatar
💪
Hey

Luis Pena LuisAlbertoPenaNunez

💪
Hey
View GitHub Profile
@LuisAlbertoPenaNunez
LuisAlbertoPenaNunez / FlattenList.cs
Last active June 13, 2018 17:48
Flatten an array of arbitrarily nested arrays of integers into a flat array of integers
using System;
using System.Collections;
using System.Collections.Generic;
namespace Flatten
{
class Program
{
static void Main(string[] args)
{
<?xml version="1.0" encoding="utf-8" ?>
<xf:BottomBarPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Movies.Views.MoviesHomeTabbedPage"
FixedMode="false"
BarTheme="DarkWithAlpha"
xmlns:xf="clr-namespace:BottomBar.XamarinForms;assembly=BottomBar.XamarinForms"
xmlns:screens="clr-namespace:Movies.Views;assembly=Movies"
BarTextColor="White"
BarBackgroundColor="Black">
protected override void OnInitialized()
{
InitializeComponent();
var tabs = CreateTabs();
NavigationService.NavigateAsync(tabs);
}
var showingNowTab = $"{KnownNavigationParameters.CreateTab}={nameof(ShowingNow)}";
private async void OnMovieSelected(Movie movie)
{
if (movie == null)
return;
var navigationParameters = new NavigationParameters();
navigationParameters.Add(NavigationParametersKey.SelectedMovieId, movie.Id);
await _navigationService.NavigateAsync($"{nameof(MovieDetails)}", navigationParameters);
}
private async void OnMovieSelected(Movie movie)
{
if (movie == null)
return;
var navigationParameters = new NavigationParameters();
navigationParameters.Add(NavigationParametersKey.SelectedMovieId, movie.Id);
await _navigationService.NavigateAsync($"{nameof(MovieDetails)}", navigationParameters);
}
var showingNowTab = $"{KnownNavigationParameters.CreateTab}={Screens.ShowingNowNavigationPage}|{Screens.ShowingNow}";
var tabs = $"{Screens.MoviesHomeTabbedPage}?{showingNowTab}&{categoriesTab}&{aboutMeTab}"
public class Screens
{
public readonly static string MoviesHomeTabbedPage = nameof(MoviesHomeTabbedPage);
public readonly static string ShowingNowNavigationPage = nameof(ShowingNowNavigationPage);
public readonly static string CategoriesNavigationPage = nameof(CategoriesNavigationPage);
public readonly static string AboutMeNavigationPage = nameof(AboutMeNavigationPage);
public partial class App : PrismApplication
{
public App(IPlatformInitializer initializer = null) : base(initializer) { }
protected override void OnInitialized()
{
InitializeComponent();
var tabs = CreateTabs();