Ejemplo n.º 1
0
        public async void showConfirm(pageBase pb)
        {
            pageConfirm pc = new pageConfirm(false, "Frage", true);
            await pb.Navigation.PushAsync(pc);

            await pc.PageClosedTask; // Wait here until the SettingsPage is dismissed
        }
Ejemplo n.º 2
0
        private void init(Boolean withListView, HMS.Auth.IHttpClient hmsClient)
        {
            // store the hmsClient
            HMS.Auth.haHttpClient.hmsClient = hmsClient;

            // this is a test for a modal dialog
            Button btnDebug = this.createButton("Debug");

            btnDebug.Clicked += async(sender, e) =>
            {
                pageConfirm pc = new pageConfirm(false, "This is just a test for a modal dialog.", true);
                await Navigation.PushAsync(pc);

                await pc.PageClosedTask; // Wait here until the confirmPage is dismissed
                var ret = pc.Return;
            };

            Button btnBrowse = this.createButton("Browse");

            btnBrowse.Clicked += async(sender, e) =>
            {
                await Navigation.PushAsync(new pageBrowse(true));
            };
            Button btnSetup = this.createButton("Setup");

            btnSetup.Clicked += async(sender, e) =>
            {
                await Navigation.PushAsync(new pageSetup(false));
            };

            // create the left pane containig the buttons
            StackLayout btnLayout = new StackLayout()
            {
                HorizontalOptions = LayoutOptions.Center,
                Orientation       = StackOrientation.Vertical
            };

            btnLayout.Children.Add(btnDebug);
            btnLayout.Children.Add(btnBrowse);
            btnLayout.Children.Add(btnSetup);

            Label labelInfo = new Label();

            labelInfo.Text = "For more information about HMS see:";
            btnLayout.Children.Add(labelInfo);

            Label labelUri = new Label();

            labelUri.Text = "http://www.hypermediasystems.de/";
            var tapGestureRecognizer = new TapGestureRecognizer();

            tapGestureRecognizer.Tapped += (s, e) => {
                Device.OpenUri(new Uri(((Label)s).Text));
            };
            labelUri.GestureRecognizers.Add(tapGestureRecognizer);

            btnLayout.Children.Add(labelUri);


            base.contentStack.Children.Add(btnLayout);

            // Put the StackLayout in a ScrollView.
            Content = base.mainStack;
            this.setServerUser();
            this.hide_running();
        }