コード例 #1
0
        public App()
        {
            InitializeComponent();

            //MainPage = new NavigationPage(new HomePage());
            MainPage = new TabbedPage1();
        }
コード例 #2
0
 public MasterDetailPage1()
 {
     InitializeComponent();
     MasterPage.ListView.ItemSelected += ListView_ItemSelected;
     navi           = navigation;
     Sistema.FOOTER = tabbedpage;
     pagina         = tabbedpage;
     Dados();
 }
コード例 #3
0
        public App()
        {
            InitializeComponent();

            MainPage = new TabbedPage1();
            //    {
            //        Children =
            //        {
            //            new AddExpense(),
            //            new ExpensesList(),
            //            new AddIncome(),
            //        }
            //    };
        }
コード例 #4
0
        public App()
        {
            App.Current.Resources["colorPrimaryTransparente"] = Color.FromHex("#1E3246").MultiplyAlpha(0.5);
            var current = Connectivity.NetworkAccess;

            if (current != NetworkAccess.Internet)
            {
                MainPage = new  Erro("Para usar este aplicativo é necessário estar conectado a internet.");
                //    System.Diagnostics.Process.GetCurrentProcess().Kill();
            }
            else
            {
                Services.Sistema.RESTAPI = new Services.Rest("http://www.api.rodrigosimoesimoveis.com.br/");

                Services.Sistema.DATABASE = new Services.DataBaseAsync();
                Dados();


                try
                {
                    GerarConfiguracao();
                }
                catch (Exception ex)
                {
                    MainPage = new Erro("Não foi possível acessar os dados!");
                    return;
                }
                InitializeComponent();



                // page = new MasterDetailPage1();
                page = new TabbedPage1();
                Services.Sistema.TABBEDPAGE = page;

                npage = new NavigationPage(page);

                OAuthConfig._NavigationPage = npage;
                OAuthConfig._TabbedPage     = page;

                MainPage = npage;//page; //NavigationPage(new TabbedPage1()) ;// ;
            }
        }
コード例 #5
0
        public App()
        {
            var scrollView = new Button {
                Text = "ScrollView"
            };
            var scrollViewXaml = new Button {
                Text = "ScrollView Xaml"
            };
            var listView = new Button {
                Text = "ListView"
            };
            var stackLayout = new Button {
                Text = "StackLayout"
            };
            var grid = new Button {
                Text = "Grid"
            };
            var scrollViewIn = new Button {
                Text = "ScrollView"
            };
            var listViewIn = new Button {
                Text = "ListView"
            };
            var stackLayoutIn = new Button {
                Text = "StackLayout"
            };
            var gridIn = new Button {
                Text = "Grid"
            };
            var disposeCrash = new Button {
                Text = "Dispose Crash"
            };
            var disposeCrash2 = new Button {
                Text = "Dispose Crash"
            };


            scrollViewPage = new ScrollViewPage(false);
            Page page;

            // The root page of your application
            MainPage = page = new NavigationPage(new ContentPage
            {
                Title   = "Pull to Refresh!",
                Content = new ScrollView
                {
                    Content = new StackLayout
                    {
                        Padding  = 25,
                        Children =
                        {
                            new Label
                            {
                                Text = "Pull to Refresh in:"
                            },
                            scrollView,
                            listView,
                            stackLayout,
                            grid,
                            scrollViewXaml,
                            new Label
                            {
                                Text = "Inside a layout:"
                            },
                            scrollViewIn,
                            listViewIn,
                            stackLayoutIn,
                            gridIn,
                            new Label
                            {
                                Text = "Misc"
                            },
                            disposeCrash,
                            disposeCrash2
                        }
                    }
                }
            })
            {
                BackgroundColor = Color.FromHex("3498db"),
                BarTextColor    = Color.White
            };

            scrollView.Clicked += async(sender, e) =>
            {
                var page2 = new ScrollViewXamlPage();
                await page.Navigation.PushAsync(scrollViewPage);

                await scrollViewPage.Navigation.PushAsync(page2);
            };
            scrollViewXaml.Clicked += (sender, e) => page.Navigation.PushAsync(new ScrollViewXamlPage());
            scrollViewIn.Clicked   += (sender, e) => page.Navigation.PushAsync(new ScrollViewPage(true));
            listView.Clicked       += (sender, e) => page.Navigation.PushAsync(new ListViewPage(false));
            listViewIn.Clicked     += (sender, e) => page.Navigation.PushAsync(new ListViewPage(true));
            stackLayout.Clicked    += (sender, e) => page.Navigation.PushAsync(new StackLayoutPage(false));
            stackLayoutIn.Clicked  += (sender, e) => page.Navigation.PushAsync(new StackLayoutPage(true));
            grid.Clicked           += (sender, e) => page.Navigation.PushAsync(new GridPage(false));
            gridIn.Clicked         += (sender, e) => page.Navigation.PushAsync(new GridPage(true));
            disposeCrash.Clicked   += (sender, e) => MainPage = new TabbedPage1();
            disposeCrash2.Clicked  += (sender, e) => MainPage = new DisposeCrashPage();
        }
コード例 #6
0
ファイル: App.xaml.cs プロジェクト: kasperrr123/WorkHours
        public App()
        {
            MainPage = new TabbedPage1();

            InitializeComponent();
        }