public AHeadSplash1()
        {
            InitializeComponent();

            #region intro stuff
            Title           = "Near Hospitals, ER's";
            BackgroundColor = Color.LightGreen;
            #endregion

            //??//noBlockChain = false;
            //??//GetHospitalDBAsync();


            #region Toolbar 006
            //
            // .......................................................................
            // Tool Bar
            // .......................................................................
            ToolbarItems.Clear();
            // set originator, the returning address/name


            // How To Do
            ToolbarItem TBI_ToDo = new ToolbarItem
            {
                Icon    = "help.png",
                Order   = ToolbarItemOrder.Primary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            };
            ToolbarItems.Add(TBI_ToDo);

            // User Guide
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "User Guide",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            });
            // Share
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Share this app",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseShare()))
            });
            // Legal Disclaimer
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Legal Disclaimer",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseDisclaimer()))
            });
            // Privacy
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Privacy",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BasePrivacy()))
            });
            // About
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "About -- References",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new StatAbout()))
            });
            // Contact Us
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Contact Us",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseContactUs()))
            });
            // .......................................................................
            //

            #endregion



            #region Lines (lightgray)

            var boxViewbnew0 = new BoxView()
            {
                HeightRequest   = 1,
                WidthRequest    = 170,
                BackgroundColor = Color.Black
            };
            StackLayout n0_Underline = new StackLayout()
            {
                Margin          = new Thickness(2, 2, 0, 2),
                BackgroundColor = Color.LightGray,
                WidthRequest    = 170,
                HeightRequest   = 1,
                Children        = { boxViewbnew0 }
            };

            var boxViewbnew0444 = new BoxView()
            {
                HeightRequest   = 1,
                WidthRequest    = 170,
                BackgroundColor = Color.LightGray
            };
            var boxViewbnew02 = new BoxView()
            {
                HeightRequest   = 15,
                WidthRequest    = 28,
                BackgroundColor = Color.LightSkyBlue,
                Opacity         = 100
            };

            StackLayout n555_Underline = new StackLayout()
            {
                //Margin = new Thickness(0, 8, 0, 8),
                //BackgroundColor = Color.LightGray,
                //HeightRequest = 40,
                //WidthRequest=40,
                Children = { boxViewbnew02 }
            };
            #endregion

            #region GPS based nearest

            // Nearest GPS Hospital label
            lbl_btTHosp = new Label()
            {
                Margin                  = new Thickness(0, 35, 0, 0),
                Text                    = " Near Hospitals / ER Location:",
                FontAttributes          = FontAttributes.Bold,
                FontSize                = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
                TextColor               = Color.Black,
                HorizontalTextAlignment = TextAlignment.Start,
                BackgroundColor         = Color.LightSkyBlue,
                HorizontalOptions       = LayoutOptions.CenterAndExpand,
                VerticalOptions         = LayoutOptions.CenterAndExpand,
                //WidthRequest = App.DisplayScaleMax // (App.DisplayScreenWidth)
            };


            Image standardHelp = new Image
            {
                Margin = new Thickness(0, 35, 0, 0),
                //AdvancedHelp.Scale = 50; // (50,50);
                Source = "smallhelp.png"
            };
            // Mark label for tap event
            TapGestureRecognizer standardHelp_tap = new TapGestureRecognizer();

            standardHelp_tap.Tapped += async(s, e) =>
            {
                Boolean ans = await DisplayAlert("Instructions.", "Click the [Hospitals ...GPS] button\n\n" +
                                                 "Next Page will show:\n\n" +

                                                 " --- 'Nearest Hospital' from your GPS position... [Details] / [Phone-Dialer] & [Direction]\n\n" +

                                                 " --- [Slider] ... selecting more Hospitals within a Range of your GPS position\n\n" +

                                                 " --- [Show List Button] ... list all Hospitals in selected Range (Details, Phone-Dialer, Direction)", "Got it", " ");
            };
            standardHelp.GestureRecognizers.Add(standardHelp_tap);


            var stckstandard = new StackLayout()
            {
                //Margin = new Thickness(0, 0, 10, 0),
                //Margin = new Thickness(0, 50, 0, 0),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.LightSkyBlue, //.Black,
                //WidthRequest = App.DisplayScaleMax,
                //Spacing = 10,
                Children =
                {
                    lbl_btTHosp, standardHelp
                }
            };

            btTHosp = new Button
            {
                Text = "Hospitals\n\nFROM MY\nGPS Position",
                //Margin = new Thickness(0, 0, 0, 0),
                Image           = "nhospital.png",
                BorderWidth     = 3,
                CornerRadius    = 10,
                BorderColor     = Color.Red,
                FontSize        = Device.GetNamedSize(NamedSize.Default, typeof(Button)),
                TextColor       = Color.White,
                BackgroundColor = Color.LightSlateGray,
                HeightRequest   = 85,
                WidthRequest    = 190
            };
            btTHosp.Clicked += OnbtTHospClickedAsync;

            var stckGPSLabel = new StackLayout()
            {
                //Margin = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.LightSkyBlue,
                Children          =
                {
                    stckstandard
                }
            };

            // [List All] button
            var stckGPS = new StackLayout()
            {
                //Margin = new Thickness(0, 5, 0, 20),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.LightSkyBlue,
                //WidthRequest = 160,
                Children =
                {
                    btTHosp
                }
            };

            #endregion


            #region Advertisement

            Label addFooter = new Label()
            {
                Margin = new Thickness(0, 3, 0, 0),
                Text   = "Published by CNG Internet Software, LLC\n" +
                         "..publisher by/on mid-November 2018 of the 'C's Medical Emergency' app..",
                FontAttributes          = FontAttributes.None,
                FontSize                = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor               = Color.Black,
                HorizontalOptions       = LayoutOptions.StartAndExpand,
                VerticalOptions         = LayoutOptions.CenterAndExpand,
                HorizontalTextAlignment = TextAlignment.Center,
                WidthRequest            = App.DisplayScaleMax, // App.DisplayScreenHeight
            };

            #endregion

            #region Stack Layouts


            StackLayout centerStack = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.LightSkyBlue,
                WidthRequest      = App.DisplayScaleMax, // App.DisplayScreenHeight,
                //Spacing = 12,
                Children =
                {
                    stckGPSLabel,
                    stckGPS,
                    //??//leftStack
                }
            };


            #endregion


            #region Final Stacks

            StackLayout stackFinalHeader = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                }
            };


            var stackFinalBody = new StackLayout()
            {
                //Margin = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.Black,
                Children          =
                {
                    centerStack
                }
            };

            StackLayout addAd = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                    addFooter
                }
            };

            ScrollView FinalScrollView = new ScrollView()
            {
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Content           = stackFinalBody
            };


            // ------------------------------------------------------------------------
            // Page -------------------------------------------------------------------
            // ------------------------------------------------------------------------
            App.CCMed FinalPageLayout = new App.CCMed();

            FinalPageLayout.TopStack.Children.Add(stackFinalHeader);
            //FinalPageLayout.TopStack.Children.Add(SPheader001);
            //FinalPageLayout.TopStack.Children.Add(FinalScrollView);
            FinalPageLayout.CenterStack.Children.Add(FinalScrollView);
            FinalPageLayout.BottomStack.Children.Add(addAd); // App.contentstatusBaseline);

            // Assign to the page
            this.Content = FinalPageLayout;

            #endregion


            //
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            // This will "blitz" through this page, and immidiately put up the next pag.
            // ... but if you pewaa <Return>, it will show this page for some advertisement
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            //
            try
            {
                var duration = TimeSpan.FromMilliseconds(1000);
                Vibration.Vibrate(duration);
            }
            catch (FeatureNotSupportedException ex)
            {
                string aa = ex.Message.ToString();
            }
            catch (Exception ex)
            {
                string aa = ex.Message.ToString();
            }

            Navigation.PushAsync(new FindHospital(noBlockChain));
            //
        }
        // LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
        #endregion



        // ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        // Hospital Area Location
        // ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        public HospitalList()         //string strAddress)
        {
            InitializeComponent();

            this.Title      = "Hospital List";
            BackgroundColor = Color.Black;

            #region Toolbar 007
            //
            // .......................................................................
            // Tool Bar
            // .......................................................................
            ToolbarItems.Clear();
            // set originator, the returning address/name


            // How To Do
            ToolbarItem TBI_ToDo = new ToolbarItem
            {
                Icon    = "help.png",
                Order   = ToolbarItemOrder.Primary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            };
            ToolbarItems.Add(TBI_ToDo);

            // User Guide
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "User Guide",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            });
            // Share
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Share this app",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseShare()))
            });
            // Setup
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Setup",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseSetup()))
            });
            // Legal Disclaimer
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Legal Disclaimer",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseDisclaimer()))
            });
            // Privacy
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Privacy",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BasePrivacy()))
            });
            // About
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "About -- References",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new StatAbout()))
            });
            // Contact Us
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Contact Us",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseContactUs()))
            });
            // .......................................................................
            //

            #endregion


            // .........................................................................................
            // 1. we have a list of hospital pointers distances (from FindHospital"
            // 2. we will create a list (setList6) of hospitals, (distance, Name), keyed by distance
            // .........................................................................................
            ObservableCollection <HospitalListmach> listSource6s = new ObservableCollection <HospitalListmach>();

            string[] setList6  = new string[App.hospitalsInRangeCount];
            int      inow      = 0;
            int      newIndex  = 0;
            string   newMilage = "";
            App.hospitalsShownCount = 0;
            int icheckdis = Convert.ToInt32((App.requestedHospitalRange) * 100.00);
            for (inow = 0; inow < App.hospitalsInRangeCount; inow++)
            {
                if ((Convert.ToInt32(App.hospitalsInRange[inow, 1])) < icheckdis)
                {
                    newIndex  = App.hospitalsInRange[inow, 0];
                    newMilage = (((Convert.ToDouble(App.hospitalsInRange[inow, 1])) / 100.0)).ToString();
                    if (newMilage == "0")
                    {
                        //break;
                    }
                    else
                    {
                        // need to add trailing blanks for single decimal numbers (5.66 vs 5.5"
                        if ((newMilage.Length - newMilage.LastIndexOf(".")) == 2)
                        {
                            newMilage = newMilage + "0";
                        }
                        // preset the milage to "b999.99bb" / "bbb9.99bb"
                        switch (newMilage.Length - 4)
                        {
                        case 0:
                            newMilage = "   " + newMilage + "   ";
                            break;

                        case 1:
                            newMilage = "  " + newMilage + "   ";
                            break;

                        case 2:
                            newMilage = " " + newMilage + "   ";
                            break;

                        default:
                            newMilage = " " + newMilage + "   ";
                            break;
                        }
                        // need to add trailing blanks for single decimal numbers (5.66 vs 5.5"
                        if ((newMilage.Length - newMilage.LastIndexOf(".")) == 2)
                        {
                            newMilage = newMilage + "   ";
                        }
                        else
                        {
                            newMilage = newMilage + "  ";
                        }
                        string strBeds    = App.hospitalsDB[newIndex, 13];
                        string strFiller1 = "  ";
                        if (strBeds == "")
                        {
                            strBeds = "N/R";
                        }
                        int iTemp1 = 5 - strBeds.Length;
                        if (iTemp1 == 1)
                        {
                            strFiller1 = "  ";
                        }
                        if (iTemp1 == 2)
                        {
                            strFiller1 = "   ";
                        }
                        if (iTemp1 == 3)
                        {
                            strFiller1 = "     ";
                        }
                        setList6[inow] = newMilage.ToString() + "  " + strBeds + strFiller1 + "- " + App.hospitalsDB[newIndex, 0];
                    }
                }
                else
                {
                    //
                    // the list is from shortest to longest distance
                    // the first time the listed milage is above the requested, we can leave the for loop
                    break;
                }
            }


            ObservableCollection <HospitalListmach> listSource6 = new ObservableCollection <HospitalListmach>();

            int know = 0;
            for (know = 0; know < App.hospitalsInRangeCount; know++)
            {
                // 13.89  456  - name
                string[] strTemp  = setList6[know].Split('-');
                string   strName  = strTemp[1].Substring(1, strTemp[1].Length - 1);
                int      ipos1    = strTemp[0].IndexOf(".");
                string   bedcount = strTemp[0].Substring(ipos1 + 3, strTemp[0].Length - (ipos1 + 3));
                string   strbeds  = "";
                try
                {
                    strbeds = Convert.ToInt32(bedcount).ToString() + " beds";
                }
                catch (Exception e)
                {
                    string aa = e.Message.ToString();
                    strbeds = " N/A ";
                }
                string strmiles = strTemp[0].Substring(0, ipos1 + 2) + " miles     " + strbeds;
                string temp100  = strName + "\n" + strmiles;
                listSource6.Add(new HospitalListmach {
                    DisplayName = temp100
                });                                                        // setList6[know] });
            }
            //

            listView6.Margin    = new Thickness(0, 5, 0, 0);
            listView6.RowHeight = 55;
            //listView6.HasUnevenRows = true;
            listView6.ItemsSource = listSource6; //= setList6;

            listView6.ItemSelected += async(sender, e) =>
            {
                var    session    = (HospitalListmach)e.SelectedItem;
                string sessionHit = session.DisplayName.ToString();

                // " 23.67    345  - Hospital One"  isolate Hospital One, get index into hospitalsInRange
                // " 23.67    N/R  - Hospital One"  isolate Hospital One, get index into hospitalsInRange
                string[] strTemp2       = sessionHit.Split('\n');
                string   strselHospital = strTemp2[0].TrimStart(' ');

                for (int ii = 0; ii < App.hospitalsInRangeCount; ii++)
                {
                    if (App.hospitalsDB[App.hospitalsInRange[ii, 0], 0] == strselHospital)
                    {
                        App.selectedHospital = App.hospitalsInRange[ii, 0];
                        break;
                    }
                }

                //await Navigation.PushAsync(new HospitalDetails());

                string searchStr = "https://www.google.com/search?q=%22";
                searchStr = searchStr + App.hospitalsDB[App.selectedHospital, 0] + "," + App.hospitalsDB[App.selectedHospital, 3] + "," + App.hospitalsDB[App.selectedHospital, 4];
                searchStr = searchStr + "%22";

                Device.OpenUri(new Uri(searchStr));
            };



            #region Advertisement

            Label addFooter = new Label()
            {
                Margin = new Thickness(0, 3, 0, 0),
                Text   = "Published by CNG Internet Software, LLC\n" +
                         "..publisher by/on mid-November 2018 of the 'CC Medical Emergency' app..",
                FontAttributes          = FontAttributes.None,
                FontSize                = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor               = Color.Black,
                HorizontalOptions       = LayoutOptions.StartAndExpand,
                VerticalOptions         = LayoutOptions.CenterAndExpand,
                HorizontalTextAlignment = TextAlignment.Center,
                WidthRequest            = App.DisplayScaleMax, // App.DisplayScreenHeight
            };

            #endregion

            // Return button
            var stklistView6 = new StackLayout()
            {
                Margin            = new Thickness(10, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.White,
                Children          =
                {
                    listView6 //TB001
                }
            };


            #region Final Stacks

            StackLayout stackAd = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                    addFooter
                }
            };


            StackLayout stackFinalHeader = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                }
            };

            var stackFinalBody = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.White,
                Children          =
                {
                    stklistView6
                }
            };

            ScrollView FinalScrollView = new ScrollView()
            {
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Content           = stackFinalBody
            };


            // ------------------------------------------------------------------------
            // Page -------------------------------------------------------------------
            // ------------------------------------------------------------------------
            // Stacklayout
            //    scroll Layout / View
            //         stack layout
            //
            // -------------------------------------------------------------------------
            App.CCMed FinalPageLayout = new App.CCMed();

            FinalPageLayout.TopStack.Children.Add(stackFinalHeader);
            //FinalPageLayout.TopStack.Children.Add(SPheader001);
            //FinalPageLayout.TopStack.Children.Add(FinalScrollView);
            FinalPageLayout.CenterStack.Children.Add(FinalScrollView);
            FinalPageLayout.BottomStack.Children.Add(stackAd); // App.contentstatusBaseline);App.contentstatusBaseline);

            // Assign to the page
            this.Content = FinalPageLayout;

            #endregion
        }
Exemple #3
0
        public BaseGuide(int arg001)
        {
            InitializeComponent();


            this.Title      = "User Guide";
            BackgroundColor = Color.White;



            // 1 ===============================================================================================

            Text1001.Margin = new Thickness(10, 0, 0, 0);
            Text1001.Text   =
                " This app finds nearby Hospitals\n" +
                "   with ER dept's.  ( 100 miles range )\n" +
                "    using GPS";
            Text1001.FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Button));
            //Text1001.FontAttributes = FontAttributes.Bold;
            //Text1001.FontAttributes = FontAttributes.Bold;
            Text1001.TextColor = Color.Black;

            Text1002.Margin = new Thickness(10, -10, 0, 0);
            Text1002.Text   = "\n" +
                              "Usage ...................\n" +
                              "- start the app, \n" +
                              "- wait seconds for location / DB to load\n\n" +
                              "   -- continue w/ Nearest Hospital\n" +
                              "      tap on Large top Button\n" +
                              "        to continue\n\n" +
                              "   or tap on\n" +
                              "   -- [Hospitals - Show List] for more Hospitals\n" +
                              "      and tap on a list item for more info\n\n";
            Text1002.FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Button));
            //Text1002.FontAttributes = FontAttributes.Bold;
            Text1002.TextColor = Color.Black;

            Text1003.Margin = new Thickness(14, -10, 0, 0);
            Text1003.Text   =
                "Additional Info includes:\n" +
                " -- DETAILS about the hospital\n" +
                " -- Google Ratings about the hospital\n" +
                " -- ability to CALL the hospital (preset #)\n" +
                " -- show Web Site\n" +
                " -- Driving Directions to the hospital\n";
            Text1003.FontSize       = Device.GetNamedSize(NamedSize.Small, typeof(Button));
            Text1003.FontAttributes = FontAttributes.Bold;
            Text1003.FontAttributes = FontAttributes.Bold;
            Text1003.TextColor      = Color.Black;


            Text1004.Margin         = new Thickness(10, -10, 0, 0);
            Text1004.Text           = "  ...AND showing Driving Direction";
            Text1004.FontSize       = Device.GetNamedSize(NamedSize.Small, typeof(Button));
            Text1004.FontAttributes = FontAttributes.Bold;
            Text1004.FontAttributes = FontAttributes.Bold;
            Text1004.TextColor      = Color.Black;


            spacerButton7 = new Xamarin.Forms.Button
            {
                Text            = " ",
                CornerRadius    = 1,
                BorderColor     = Color.LightSkyBlue,
                BorderWidth     = 2,
                TextColor       = Color.LightSkyBlue,
                FontAttributes  = FontAttributes.Bold,
                FontSize        = Device.GetNamedSize(NamedSize.Micro, typeof(Xamarin.Forms.Button)),
                BackgroundColor = Color.LightSkyBlue,
                HeightRequest   = 5,
                WidthRequest    = App.DisplayScaleMax // (App.DisplayScreenHeight)
            };

            // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
            // Stack panel fields
            // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
            #region Summary Stack
            contentstack = new StackLayout()
            {
                //Margin = new Thickness(10, 0, 10, 0),
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.White,
                WidthRequest      = App.DisplayScaleMax, // App.DisplayScreenHeight,
                Spacing           = 2,
                Children          =
                {
                    // SPheader001, 002, Website, expla002
                    new StackLayout()
                    {
                        Margin            = new Thickness(0, 0, 0, 0),
                        Orientation       = StackOrientation.Vertical,
                        VerticalOptions   = LayoutOptions.StartAndExpand,
                        HorizontalOptions = LayoutOptions.Center,
                        BackgroundColor   = Color.White,
                        Children          =
                        {
                            Text1001, Text1002, Text1003, Text1004,
                        }
                    },



                    // Spacer
                    new StackLayout()
                    {
                        Margin            = new Thickness(0, 7, 0, 7),
                        VerticalOptions   = LayoutOptions.StartAndExpand,
                        HorizontalOptions = LayoutOptions.CenterAndExpand,
                        BackgroundColor   = Color.LightSkyBlue,
                        Spacing           = 0,
                        Children          = { spacerButton7 }
                    }
                },
            };
            #endregion

            #region Final Stacks

            StackLayout stackFinalHeader = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                }
            };

            var stackFinalBody = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.Black,
                Children          =
                {
                    contentstack
                }
            };

            ScrollView FinalScrollView = new ScrollView()
            {
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Content           = stackFinalBody
            };

            // ------------------------------------------------------------------------
            // Page -------------------------------------------------------------------
            // ------------------------------------------------------------------------
            App.CCMed FinalPageLayout = new App.CCMed();

            FinalPageLayout.TopStack.Children.Add(stackFinalHeader);
            //FinalPageLayout.TopStack.Children.Add(SPheader001);
            //FinalPageLayout.TopStack.Children.Add(FinalScrollView);
            FinalPageLayout.CenterStack.Children.Add(FinalScrollView);
            FinalPageLayout.BottomStack.Children.Add(App.contentstatusBaseline);

            // Assign to the page
            this.Content = FinalPageLayout;

            #endregion
        }
        public StatAbout()
        {
            InitializeComponent();


            Title           = "About";
            BackgroundColor = Color.Black;


            Label Text001 = new Label()
            {
                Margin = new Thickness(20, 0, 20, 0),
                Text   =
                    "App Name.......: NearHospital \n" +
                    "   Release Date: June 15, 2018 \n" +
                    "   App Version..: 2.1.4 CCNearHospital\n" +
                    "   ID Key............: M56-778 \n \n" +
                    "Copyright\n" +
                    "(2018) CNG Internet Software, LLC. All rights reserved.",

                FontSize          = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };
            Label Text002 = new Label()
            {
                Margin = new Thickness(20, 0, 20, 0),
                Text   = " This app will get your current location(1) and gives you:\n" +
                         " * the name and location of the nearest Hospital, and\n" +

                         "Additional Info includes:\n" +
                         " -- DETAILS about the hospital\n" +
                         " -- Google Ratings about the hospital\n" +
                         " -- ability to CALL the hospital (preset #)\n" +
                         " -- show Web Site\n" +
                         " -- Driving Directions to the hospital\n\n" +
                         "You may also get an expanded list of hospitals inside a circle of up to 100 miles.\n",
                FontSize          = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };

            Label Text003 = new Label()
            {
                Margin            = new Thickness(20, 15, 20, 0),
                Text              = "Acknowledgements",
                FontSize          = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };
            Label Text004 = new Label()
            {
                Margin = new Thickness(20, 5, 20, 0),
                Text   = "American Red Cross. First Aid/ CPR / AED Participant's Manual. 2nd ed. Dallas, TX: American Red Cross; 2016.\n" +
                         "Kleinman ME, Brennan EE, Goldberger ZD, et al.\n" +
                         "American Heart Association guidelines update for " +
                         "cardiopulmonary resuscitation and emergency cardiovascular care.Circulation. 2015; 132(18 Suppl 2):S414 - S435.PMID: 26472993 www.ncbi.nlm.nih.gov / pubmed / 26472993.\n\n" +
                         "Review Date 3 / 31 / 2017 by Editorial team.\n\n" +
                         "***Material published by Mayo Clinic Staff\n" +
                         "Chief medical editor  •	Sandhya Pruthi, M.D.\n\n"+
                         "***Dorland's Illustrated Medical Dictionary. 32nd ed. \n" +
                         "Philadelphia, Pa.: W.B. Saunders; 2011. https://www.dorlands.com/index.jsp. Accessed Feb. 3, 2018.",
                FontSize          = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };



            // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
            // Stack panel fields
            // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
            #region Summary Stack
            var contentstack = new StackLayout()
            {
                BackgroundColor = Color.Black,
                Children        =
                {
                    new StackLayout()
                    {
                        Margin            = new Thickness(10, 5, 10, 0),
                        Orientation       = StackOrientation.Vertical,
                        VerticalOptions   = LayoutOptions.StartAndExpand,
                        HorizontalOptions = LayoutOptions.Center,
                        BackgroundColor   = Color.Black,
                        Children          =
                        {
                            Text001,
                            Text002,
                            Text003,
                            Text004,
                        }
                    }
                }
            };
            #endregion


            #region Final Stacks

            StackLayout stackFinalHeader = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                }
            };

            var stackFinalBody = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.Black,
                Children          =
                {
                    contentstack
                }
            };

            ScrollView FinalScrollView = new ScrollView()
            {
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Content           = stackFinalBody
            };


            // ------------------------------------------------------------------------
            // Page -------------------------------------------------------------------
            // ------------------------------------------------------------------------
            App.CCMed FinalPageLayout = new App.CCMed();

            FinalPageLayout.TopStack.Children.Add(stackFinalHeader);
            //FinalPageLayout.TopStack.Children.Add(SPheader001);
            //FinalPageLayout.TopStack.Children.Add(FinalScrollView);
            FinalPageLayout.CenterStack.Children.Add(FinalScrollView);
            FinalPageLayout.BottomStack.Children.Add(App.contentstatusBaseline);

            // Assign to the page
            this.Content = FinalPageLayout;

            #endregion
        }
        public BaseSetup()
        {
            InitializeComponent();

            this.Title      = "SETUP";
            BackgroundColor = Color.Black;


            #region Toolbar 007
            //
            // .......................................................................
            // Tool Bar
            // .......................................................................
            ToolbarItems.Clear();
            // set originator, the returning address/name


            //// To Do
            //ToolbarItem TBI_ToDo = new ToolbarItem
            //{
            //  Icon = "docit.png",
            //  Order = ToolbarItemOrder.Primary,
            //  Command = new Command(async () => await Navigation.PushAsync(new BaseToDo(1)))
            //};
            //ToolbarItems.Add(TBI_ToDo);

            //// Main
            //ToolbarItem TBI_Main = new ToolbarItem
            //{
            //  Icon = "ems.png",
            //  Order = ToolbarItemOrder.Primary,
            //  Command = new Command(async () => await Navigation.PushAsync(new TopScreen1()))
            //};
            //ToolbarItems.Add(TBI_Main);

            // .......................................................................
            //

            #endregion



            var boxViewbnew0 = new BoxView()
            {
                Margin          = new Thickness(0, 8, 0, 0),
                HeightRequest   = 2,
                WidthRequest    = WidthRequest = (App.DisplayScreenWidth),
                BackgroundColor = Color.LightGray
            };


            #region owners name
            lblownersName = new Label
            {
                Margin            = new Thickness(0, 5, 0, 0),
                Text              = "Your Name.......:",
                FontSize          = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.End,
                VerticalOptions   = LayoutOptions.CenterAndExpand, //,
                HeightRequest     = 35,
                WidthRequest      = 90
            };

            ownersNameEntry = new Entry()
            {
                Margin          = new Thickness(3, 0, 0, 0),
                Text            = Preferences.Get("notesOwnerName", "default_value"),
                BackgroundColor = Color.SlateGray, //.LightYellow,
                FontSize        = Device.GetNamedSize(NamedSize.Micro, typeof(Entry)),
                TextColor       = Color.White,
                IsVisible       = true,
                Keyboard        = Keyboard.Create(KeyboardFlags.Suggestions),
                //Placeholder = "address or Latitude / Longitude",
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HeightRequest     = 35,
                WidthRequest      = 220 //(App.DisplayScreenWidth) - 115
            };
            ownersNameEntry.Completed += ownersNameEntry_Completed;
            //ownersNameEntry.Focused += ownersNameEntry_Focused;
            ownersNameEntry.TextChanged += ownersNameEntry_TextChanged;


            #endregion

            #region owners Tel Number
            lblownersTelNumber = new Label
            {
                Margin            = new Thickness(0, 5, 0, 0),
                Text              = "This Phone's #.:",
                FontSize          = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.End,
                VerticalOptions   = LayoutOptions.CenterAndExpand, //,
                HeightRequest     = 35,
                WidthRequest      = 90
            };

            ownersTelNumberEntry = new Entry()
            {
                Margin          = new Thickness(3, 0, 0, 0),
                Text            = Preferences.Get("notesOwnerTelnum", "default_value"),
                BackgroundColor = Color.SlateGray, //.LightYellow,
                FontSize        = Device.GetNamedSize(NamedSize.Micro, typeof(Entry)),
                TextColor       = Color.White,
                IsVisible       = true,
                Keyboard        = Keyboard.Telephone, //(KeyboardFlags.Suggestions),
                //Placeholder = "address or Latitude / Longitude",
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HeightRequest     = 35,
                WidthRequest      = 220 //(App.DisplayScreenWidth) - 115
            };
            ownersTelNumberEntry.Completed += ownersTelNumberEntry_Completed;
            //ownersTelNumberEntry.Focused += ownersTelNumberEntry_Focused;
            ownersTelNumberEntry.TextChanged += ownersTelNumberEntry_TextChanged;

            #endregion

            #region owners EMail
            lblownersEmail = new Label
            {
                Margin            = new Thickness(0, 5, 0, 0),
                Text              = "Your EMail........:",
                FontSize          = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.End,
                VerticalOptions   = LayoutOptions.CenterAndExpand, //,
                HeightRequest     = 35,
                WidthRequest      = 90
            };

            ownersEmailEntry = new Entry()
            {
                Margin          = new Thickness(3, 0, 0, 0),
                Text            = Preferences.Get("notesOwnerEmail", "default_value"),
                BackgroundColor = Color.SlateGray, //.LightYellow,
                FontSize        = Device.GetNamedSize(NamedSize.Micro, typeof(Entry)),
                TextColor       = Color.White,
                IsVisible       = true,
                Keyboard        = Keyboard.Email, // (KeyboardFlags.Suggestions),
                //Placeholder = "address or Latitude / Longitude",
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HeightRequest     = 35,
                WidthRequest      = 220 //(App.DisplayScreenWidth) - 115
            };
            ownersEmailEntry.Completed += ownersEmailEntry_Completed;
            //ownersEmailEntry.Focused += ownersEmailEntry_Focused;
            ownersEmailEntry.TextChanged += ownersEmailEntry_TextChanged;

            #endregion



            #region Grid Setup

            var controlGrid = new Grid {
                RowSpacing = 2, ColumnSpacing = 2
            };

            //controlGrid.BackgroundColor = Color.Red;
            controlGrid.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(35)
            });
            controlGrid.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(35)
            });
            controlGrid.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(35)
            });
            controlGrid.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(35)
            });
            //controlGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(36) });
            //controlGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(26) });
            //controlGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(26) });
            //controlGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(26) });

            controlGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(120)
            });
            controlGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });
            controlGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(70)
            });

            controlGrid.Children.Add(lblownersName, 0, 0);
            controlGrid.Children.Add(ownersNameEntry, 1, 0);
            Grid.SetColumnSpan(ownersNameEntry, 2);

            controlGrid.Children.Add(lblownersTelNumber, 0, 1);
            controlGrid.Children.Add(ownersTelNumberEntry, 1, 1);
            Grid.SetColumnSpan(ownersTelNumberEntry, 2);

            controlGrid.Children.Add(lblownersEmail, 0, 2);
            controlGrid.Children.Add(ownersEmailEntry, 1, 2);
            Grid.SetColumnSpan(ownersEmailEntry, 2);

            #endregion

            #region Grid 2 Setup

            var controlGrid2 = new Grid {
                RowSpacing = 2, ColumnSpacing = 2
            };

            //controlGrid.BackgroundColor = Color.Red;
            controlGrid2.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(26)
            });
            controlGrid2.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(90)
            });
            controlGrid2.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(26)
            });
            controlGrid2.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(26)
            });

            controlGrid2.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(120)
            });
            controlGrid2.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });
            controlGrid2.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(70)
            });

            //controlGrid2.Children.Add(soundonoffheader, 0, 0);
            //controlGrid2.Children.Add(soundonoffswitcher, 1, 0);
            //controlGrid2.Children.Add(soundonoffLabel, 2, 0);

            //controlGrid2.Children.Add(getNotificationTel, 0, 1);
            //controlGrid2.Children.Add(getNotificationTel, 1, 1);
            //controlGrid2.Children.Add(soundonoffLabel, 2, 1);
            #endregion

            #region Grid 3 Setup

            var controlGrid3 = new Grid {
                RowSpacing = 2, ColumnSpacing = 2
            };

            //controlGrid.BackgroundColor = Color.Red;
            controlGrid3.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(26)
            });
            controlGrid3.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(90)
            });
            controlGrid3.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(26)
            });
            controlGrid3.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(26)
            });

            //controlGrid3.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(120) });
            //controlGrid3.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
            //controlGrid3.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(70) });

            //controlGrid3.Children.Add(soundonoffheader, 0, 0);
            //controlGrid3.Children.Add(Testx, 1, 0);
            //controlGrid2.Children.Add(soundonoffLabel, 2, 0);

            //controlGrid3.Children.Add(getNotificationTel, 0, 1);
            //controlGrid3.Children.Add(Testy, 1, 1);
            //controlGrid3.Children.Add(soundonoffLabel, 2, 1);
            #endregion


            #region Final Stacks

            StackLayout stackFinalHeader = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                }
            };

            var stackFinalBody = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.Black,
                Children          =
                {
                    controlGrid,
                    controlGrid2,
                    controlGrid3,
                }
            };

            ScrollView FinalScrollView = new ScrollView()
            {
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Content           = stackFinalBody
            };


            // ------------------------------------------------------------------------
            // Page -------------------------------------------------------------------
            // ------------------------------------------------------------------------
            // Stacklayout
            // scroll Layout / View
            //   stack layout
            //
            // -------------------------------------------------------------------------
            App.CCMed FinalPageLayout = new App.CCMed();

            FinalPageLayout.TopStack.Children.Add(stackFinalHeader);
            //FinalPageLayout.TopStack.Children.Add(SPheader001);
            //FinalPageLayout.TopStack.Children.Add(FinalScrollView);
            FinalPageLayout.CenterStack.Children.Add(FinalScrollView);
            //FinalPageLayout.BottomStack.Children.Add(stackAd); // TopScreen1.contentstatusBaseline);

            // Assign to the page
            this.Content = FinalPageLayout;

            #endregion

            ownersNameEntry.Text = Preferences.Get("notesOwnerName", "default_value");
            if (ownersNameEntry.Text == "default_value")
            {
                ownersNameEntry.Text = "no entry";
            }
            ownersTelNumberEntry.Text = Preferences.Get("notesOwnerTelnum", "default_value"); // ownersTelNumberEntry.Text);
            if (ownersTelNumberEntry.Text == "default_value")
            {
                ownersTelNumberEntry.Text = "no entry";
            }
            ownersEmailEntry.Text = Preferences.Get("notesOwnerEmail", "default_value"); // ownersEmailEntry.Text);
            if (ownersEmailEntry.Text == "default_value")
            {
                ownersEmailEntry.Text = "no entry";
            }
        }
Exemple #6
0
        // LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
        #endregion



        // ......................................................................................................
        // Main Entry
        //
        // noblockchain = false (no data) = tru (have data, continue)
        // ......................................................................................................
        public FindHospital(bool noBlockChain)
        {
            InitializeComponent();

            this.Title      = "Near Hospitals, ER"; // Hospital \n\r  <LineBreakMode.TailTruncation>  Location(s)";
            BackgroundColor = Color.LightGray;


            App.requestedHospitalRange = 1000;

            noBlockChain = false;
            GetHospitalDBAsync();

            #region Toolbar 007
            //
            // .......................................................................
            // Tool Bar
            // .......................................................................
            ToolbarItems.Clear();
            // set originator, the returning address/name


            // How To Do
            ToolbarItem TBI_ToDo = new ToolbarItem
            {
                Icon    = "help.png",
                Order   = ToolbarItemOrder.Primary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            };
            ToolbarItems.Add(TBI_ToDo);

            // User Guide
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "User Guide",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            });
            // Share
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Share this app",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseShare()))
            });
            // Setup
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Setup",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseSetup()))
            });
            // Legal Disclaimer
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Legal Disclaimer",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseDisclaimer()))
            });
            // Privacy
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Privacy",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BasePrivacy()))
            });
            // About
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "About -- References",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new StatAbout()))
            });
            // Contact Us
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Contact Us",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseContactUs()))
            });
            // .......................................................................
            //

            #endregion


            var boxViewbnew0 = new BoxView()
            {
                Margin          = new Thickness(0, 8, 0, 0),
                HeightRequest   = 2,
                WidthRequest    = WidthRequest = App.DisplayScaleMax, // (App.DisplayScreenWidth),
                BackgroundColor = Color.LightBlue,                    //White
            };


            #region Nearest Hospital

            // Nearest Hospital label
            nearestHspt = new Label()
            {
                //Margin = new Thickness(0, 15, 0, 0),
                Text = "\n The Nearest Hospital / ER:\n",
                //FontAttributes = FontAttributes.Bold,
                FontSize  = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
                TextColor = Color.White,
                HorizontalTextAlignment = TextAlignment.Start,
                BackgroundColor         = Color.Black, //Gray,
                HorizontalOptions       = LayoutOptions.CenterAndExpand,
                VerticalOptions         = LayoutOptions.CenterAndExpand,
                WidthRequest            = App.DisplayScaleMax // (App.DisplayScreenWidth)
            };


            // Display Info, nearest hospital
            displayGoogle = new Button
            {
                Text            = "Loading Name",
                Margin          = new Thickness(0, 0, 0, 0),
                CornerRadius    = 8,
                BorderColor     = Color.Red,
                BorderWidth     = 2,
                TextColor       = Color.Blue,
                FontSize        = Device.GetNamedSize(NamedSize.Micro, typeof(Button)),
                BackgroundColor = Color.Yellow,
                HeightRequest   = 85,
                WidthRequest    = 300
            };
            displayGoogle.Clicked += DisplayGoogleClicked;


            // two buttons  [Hospital Info]    [Directions]
            var stckDisplayMap = new StackLayout()
            {
                Margin            = new Thickness(0, -5, 0, 0),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.Black, //Gray, //.Black,
                                                 //HeightRequest = 35,
                Spacing  = 15,
                Children =
                {
                    displayGoogle,
                }
            };


            var stckNearestHospitalHeader = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                WidthRequest      = App.DisplayScaleMax, // (App.DisplayScreenWidth),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.Black, //Gray, //LightGray, //.Black,
                Children          =
                {
                    nearestHspt
                }
            };

            // "Nearest ...", [Hospital Distance]
            var stckNearestHospital = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 15),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.Black, //Gray, //LightGray, //.Black,
                Children          =
                {
                    stckDisplayMap
                }
            };

            #endregion

            #region Display Hospitals in Range

            Label lblHospitalDBHeader = new Label
            {
                Margin   = new Thickness(25, 15, 0, 0),
                Text     = "All other Hospitals / ER's  (in 100 Miles Range) \n\nTap the List-Button, and next select a Hospital for more information,\nas well as rating if available from Google.\n",
                FontSize = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                //FontAttributes = FontAttributes.Bold,
                TextColor = Color.White,
                HorizontalTextAlignment = TextAlignment.Start,
                BackgroundColor         = Color.SlateGray,               //DarkGray,   //
                HorizontalOptions       = LayoutOptions.CenterAndExpand,
                VerticalOptions         = LayoutOptions.CenterAndExpand, //,
                WidthRequest            = 490
            };


            // Display all hospitals in Range
            btdisplayAllHospitals = new Button
            {
                Text              = "List of all Hospitals",
                CornerRadius      = 8,
                BorderColor       = Color.Red,
                BorderWidth       = 1,
                Font              = Font.SystemFontOfSize(NamedSize.Small),
                BackgroundColor   = Color.LightYellow,
                HorizontalOptions = LayoutOptions.Center,
                HeightRequest     = 35,
                //WidthRequest = 180,
                TextColor = Color.Black
            };
            btdisplayAllHospitals.Clicked += async(sendernav, args) =>
                                             await Navigation.PushAsync(new HospitalList()); //       HospitalList()); // displayHospitals());

            var stckDisplayHospital = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.SlateGray, //.Black,
                Children          =
                {
                    lblHospitalDBHeader
                }
            };

            // [List All] button
            var stckLoadHospitals = new StackLayout()
            {
                Margin            = new Thickness(5, 5, 0, 20),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.SlateGray, //Color.Red, //Black,
                HeightRequest     = 35,
                Children          =
                {
                    btdisplayAllHospitals
                }
            };


            #endregion

            #region MyAddress
            // Current Address Label
            lblMyAddress = new Label()
            {
                Margin            = new Thickness(6, 0, 0, -25),
                Text              = "My Address  (via GPS) ....................",
                FontSize          = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
                TextColor         = Color.Black,
                BackgroundColor   = Color.LightGray,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand,
            };

            Image MyAddressHelp = new Image
            {
                Margin = new Thickness(-10, 0, 0, 0),
                Source = "smallhelp.png"
            };
            // Mark label for tap event
            TapGestureRecognizer MyAddressHelp_tap = new TapGestureRecognizer();
            MyAddressHelp_tap.Tapped += async(s, e) =>
            {
                Boolean ans = await DisplayAlert("GPS Address generator", "Possible issues:\n" +
                                                 "1) No data; blockchain error: NH14\n" +
                                                 "     Please follow msg in address box\n\n" +
                                                 "2) Slow to get GPS data:\n" +
                                                 "     Other apps using GPS?\n" +
                                                 "     Exit completely out of \n" +
                                                 "      'NearHospital', try again.\n\n" +
                                                 "3) No data, even after a minute:\n" +
                                                 "      Go to Phone [Settings]\n" +
                                                 "        Tap on - Connections, \n" +
                                                 "        check \"Locations\" (must be ON)", "Got it", " ");
            };
            MyAddressHelp.GestureRecognizers.Add(MyAddressHelp_tap);

            var stckMyAddress = new StackLayout()
            {
                Margin            = new Thickness(10, 10, 0, 0),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.LightGray, //.Black,
                Spacing           = 10,
                Children          =
                {
                    lblMyAddress, MyAddressHelp
                }
            };

            #endregion

            #region AddressDisplay
            PrimlblDisplayAddress = new Label
            {
                Margin = new Thickness(10, -5, 0, 0),
                Text   = " No valid address data yet.... \n  " +
                         "   synching the GPS satellites \n  " +
                         "   can take a few seconds",
                FontSize          = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor         = Color.Black,
                BackgroundColor   = Color.LightYellow,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.Start
            };

            var MyLocation = new Image()
            {
                IsVisible     = true,
                Source        = Device.RuntimePlatform == Device.Android ? ImageSource.FromFile("aamylocation.png") : ImageSource.FromFile("Images/aamylocation.png"),
                HeightRequest = 30,
                WidthRequest  = 30,
                Margin        = new Thickness(10, -5, 0, 0),
            };
            // Mark label for tap event
            TapGestureRecognizer MyLocation_tap = new TapGestureRecognizer();
            MyLocation_tap.Tapped += (s, e) =>
            {
                AddressMap100();
            };
            MyLocation.GestureRecognizers.Add(MyLocation_tap);


            var stckDisplayAddress0 = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.LightGray, //.Black,
                Spacing           = 15,
                Children          =
                {
                    PrimlblDisplayAddress,
                }
            };

            var stckDisplayAddress = new StackLayout()
            {
                Margin            = new Thickness(5, 4, 0, 0),
                Orientation       = StackOrientation.Horizontal,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.LightGray, //.Black,
                Spacing           = 15,
                Children          =
                {
                    stckDisplayAddress0, MyLocation
                }
            };

            #endregion

            #region Latitude / Longitude
            // Latitude / Longitude label
            lblLating = new Label
            {
                Margin            = new Thickness(10, 0, 0, 0),
                Text              = "Latitude:              Longitude:  ",
                FontSize          = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor         = Color.Black,
                BackgroundColor   = Color.LightGray,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };

            var stcklblLating = new StackLayout()
            {
                Margin            = new Thickness(10, 5, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.LightGray, //.Black,
                                                     //HeightRequest = 55,
                                                     //Spacing = 10,
                Children =
                {
                    lblLating,      // long - lat display}
                }
            };


            #endregion


            #region StackLayout
            // ------------------------------------------------------------------------
            // Collection 1 Stacklayout
            // -------------------------------------------------------------------------
            var CollectStack1 = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand, //HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.LightGray,               //.Black,
                Children          =
                {
                    stckMyAddress,
                    stckDisplayAddress,
                    stcklblLating,
                }
            };
            var CollectStack2 = new StackLayout()
            {
                //Margin = new Thickness(0, 20, 0, 20),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand, //HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.Black,                   //Gray, //.Black,
                Children          =
                {
                    stckNearestHospitalHeader,      // nearest hospital, [get distance button]
                    stckNearestHospital,            // nearest hospital, [get distance button]
                }
            };
            var CollectStack3 = new StackLayout()
            {
                //Margin = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand, //HorizontalOptions = LayoutOptions.StartAndExpand,
                BackgroundColor   = Color.SlateGray,               //   .LightGray, //.Black,
                WidthRequest      = App.DisplayScaleMax,           // (App.DisplayScreenWidth),
                Children          =
                {
                    stckDisplayHospital,
                    stckLoadHospitals,
                }
            };

            #endregion


            #region Advertisement on bottom

            Label addFooter = new Label()
            {
                Margin = new Thickness(0, 3, 0, 0),
                Text   = "Published by CNG Internet Software, LLC\n" +
                         "..publisher by/on mid-November 2018 of the 'CC Medical Emergency' app..",
                FontAttributes          = FontAttributes.None,
                FontSize                = Device.GetNamedSize(NamedSize.Micro, typeof(Label)),
                TextColor               = Color.Black,
                HorizontalOptions       = LayoutOptions.StartAndExpand,
                VerticalOptions         = LayoutOptions.CenterAndExpand,
                HorizontalTextAlignment = TextAlignment.Center,
                WidthRequest            = App.DisplayScaleMax      //  App.DisplayScreenHeight
            };

            StackLayout stackAd = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                    addFooter
                }
            };

            #endregion



            #region Final Stacks


            StackLayout stackFinalHeader = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand, //.StartAndExpand,
                BackgroundColor   = Color.Blue,                    //LightGray, //.OldLace,
                                                                   //Spacing = 0,
                Children =
                {
                }
            };

            var stackFinalBody = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.CenterAndExpand, //StartAndExpand,
                                                                   //BackgroundColor = Color.Chocolate, //LightGray, //.Black,
                Children =
                {
                    CollectStack2,
                    //boxViewbnew0,
                    CollectStack3,
                    CollectStack1
                }
            };

            ScrollView FinalScrollView = new ScrollView()
            {
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand, //HorizontalOptions = LayoutOptions.FillAndExpand,
                Content           = stackFinalBody
            };


            // ------------------------------------------------------------------------
            // Page -------------------------------------------------------------------
            // ------------------------------------------------------------------------
            App.CCMed FinalPageLayout = new App.CCMed();

            FinalPageLayout.TopStack.Children.Add(stackFinalHeader);
            //FinalPageLayout.TopStack.Children.Add(SPheader001);
            //FinalPageLayout.TopStack.Children.Add(FinalScrollView);
            FinalPageLayout.CenterStack.Children.Add(FinalScrollView);
            FinalPageLayout.BottomStack.Children.Add(stackAd); // App.contentstatusBaseline);App.contentstatusBaseline);

            // Assign to the page
            this.Content = FinalPageLayout;

            #endregion



            //
            GetDevLocationAsync();                                   // get deviceLatitude, deviceLongitude, and actual device address if any
            //
        }
        // LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

        #endregion


        public Entry100()
        {
            InitializeComponent();

            #region intro stuff
            this.Title      = "Near Hospitals, ER's";
            BackgroundColor = Color.Black; // WhiteSmoke;
            Opacity         = 0.9;
            //?//App.statusBaseLine.BackgroundColor = A_Util001.ColorInTraining();

            #endregion

            #region Toolbar 007
            //
            // .......................................................................
            // Tool Bar
            // .......................................................................
            ToolbarItems.Clear();
            // set originator, the returning address/name


            // How To Do
            ToolbarItem TBI_ToDo = new ToolbarItem
            {
                Icon    = "help.png",
                Order   = ToolbarItemOrder.Primary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            };
            ToolbarItems.Add(TBI_ToDo);

            // User Guide
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "User Guide",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseGuide(1)))
            });
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Share this app",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseShare()))
            });
            // Setup
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Setup",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseSetup()))
            });
            // Legal Disclaimer
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Legal Disclaimer",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseDisclaimer()))
            });
            // Privacy
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Privacy",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BasePrivacy()))
            });
            // About
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "About -- References",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new StatAbout()))
            });
            // Contact Us
            ToolbarItems.Add(new ToolbarItem
            {
                Text    = "Contact Us",
                Order   = ToolbarItemOrder.Secondary,
                Command = new Command(async() => await Navigation.PushAsync(new BaseContactUs()))
            });
            // .......................................................................
            //

            #endregion


            #region Lines (lightgray)

            var boxViewbnew0 = new BoxView()
            {
                HeightRequest   = 1,
                WidthRequest    = 170,
                BackgroundColor = Color.Black
            };
            StackLayout n0_Underline = new StackLayout()
            {
                Margin          = new Thickness(2, 2, 0, 2),
                BackgroundColor = Color.LightGray,
                WidthRequest    = 170,
                HeightRequest   = 1,
                Children        = { boxViewbnew0 }
            };

            var boxViewbnew0444 = new BoxView()
            {
                HeightRequest   = 1,
                WidthRequest    = 170,
                BackgroundColor = Color.LightGray
            };
            var boxViewbnew02 = new BoxView()
            {
                HeightRequest   = 15,
                WidthRequest    = 28,
                BackgroundColor = Color.LightSkyBlue,
                Opacity         = 100
            };

            StackLayout n555_Underline = new StackLayout()
            {
                //Margin = new Thickness(0, 8, 0, 8),
                //BackgroundColor = Color.LightGray,
                //HeightRequest = 40,
                //WidthRequest=40,
                Children = { boxViewbnew02 }
            };
            #endregion

            #region Startup labels, background


            Label lb001 = new Label()
            {
                Text     = "Welcome\n\nList all Hospitals w/ EMS\nin 100 miles Surounding",
                Margin   = new Thickness(5, -125, 0, 0),
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                //FontAttributes = FontAttributes.Bold,
                Style   = Device.Styles.TitleStyle,
                Opacity = 0.5,
                HorizontalTextAlignment = TextAlignment.Center,
                BackgroundColor         = Color.White, //.LightYellow,
                TextColor = Color.Black,
                //WidthRequest = App.DisplayScaleMax,
                HeightRequest = 140
            };

            Label lb003b = new Label()
            {
                Text     = "Get Hospital Details, Get Driving Direction",
                Margin   = new Thickness(10, -5, 0, 0),
                FontSize = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
                HorizontalTextAlignment = TextAlignment.Center,
                //FontAttributes = FontAttributes.Bold,
                BackgroundColor = Color.White, //.LightYellow,
                TextColor       = Color.Blue,
                WidthRequest    = App.DisplayScaleMax,
                //HeightRequest = 60
            };

            var image001 = new Image
            {
                Source  = "Splash_121618002.jpg",
                Opacity = 0.2,
                Margin  = new Thickness(0, 0, 0, 0)
            };

            #endregion

            #region Start-It button

            btItemsAdult = new Button
            {
                Text         = "Hospitals",
                Image        = "techn.jpg",
                Margin       = new Thickness(0, 0, 0, 0),
                BorderWidth  = 2,
                CornerRadius = 10,
                BorderColor  = Color.White,
                FontSize     = Device.GetNamedSize(NamedSize.Small, typeof(Button)),
                //Style = Device.Styles.TitleStyle,
                FontAttributes    = FontAttributes.Italic,
                TextColor         = Color.White,
                BackgroundColor   = Color.DarkRed, //.DeepSkyBlue,
                HorizontalOptions = LayoutOptions.Center,
                HeightRequest     = 55,
                WidthRequest      = 160
            };
            btItemsAdult.Clicked += OnbtItemsAdultClickedAsync;


            btItemsHistory = new Button
            {
                Text         = "Plain List Only",
                Image        = "docitsmall.jpg",
                Margin       = new Thickness(0, 10, 0, 0),
                BorderWidth  = 2,
                CornerRadius = 10,
                BorderColor  = Color.White,
                FontSize     = Device.GetNamedSize(NamedSize.Small, typeof(Button)),
                //Style = Device.Styles.TitleStyle,
                FontAttributes    = FontAttributes.Italic,
                TextColor         = Color.Black,
                BackgroundColor   = Color.LightGray, //.DeepSkyBlue,
                HorizontalOptions = LayoutOptions.Center,
                HeightRequest     = 50,
                WidthRequest      = 200
            };
            btItemsHistory.Clicked += OnbtItemsHistoryClickedAsync;

            StackLayout stkSum2 = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.EndAndExpand,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                //BackgroundColor = Color.White,
                Spacing      = 5,
                WidthRequest = App.DisplayScaleMax,
                Children     =
                {
                    btItemsAdult,
                    btItemsHistory,
                }
            };

            Frame startframe = new Frame()
            {
                Content           = stkSum2,
                BorderColor       = Color.Blue,
                CornerRadius      = 10,
                HasShadow         = true,
                Margin            = new Thickness(5, -10, 5, 5),
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.Center
            };


            #endregion

            #region Stack Layouts

            StackLayout selectionStack = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.Start,
                Margin            = new Thickness(0, 15, 0, 0),
                BackgroundColor   = Color.Snow, //.LightSlateGray, //.Silver, //.NavajoWhite,
                //WidthRequest = App.DisplayScreenHeight,
                WidthRequest = App.DisplayScaleMax,
                //Spacing = 8,
                Children =
                {
                    startframe,
                }
            };


            StackLayout leftStack = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.Start,
                Margin            = new Thickness(0, 0, 0, 0),
                BackgroundColor   = Color.White, //Color.LightSkyBlue,
                //WidthRequest = App.DisplayScreenHeight,
                Spacing  = 12,
                Children =
                {
                    image001,
                    lb001,
                    lb003b,
                    selectionStack,
                }
            };


            StackLayout centerStack = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Color.LightSkyBlue,
                WidthRequest      = App.DisplayScreenHeight,
                Spacing           = 12,
                Children          =
                {
                    leftStack,
                }
            };


            #endregion


            #region Advertisement on bottom
            //

            //  A. Ad-contract is renewable from month to month.
            //  B. An Ad-contract area size is a 'virtual' circle, with a center at Longitude / Latitude, and a radius of x miles
            //  C. Ad-contract areas do not overlap
            //
            // Upon the start of an app, the following steps are mtaken:
            //    1. establishes the devices geao location,
            //    2. get count of ad-contracts
            //
            //       loop on all contracts
            //				3. reads the ad-contract DB, keyed by location and distance, called contract-location, contract - distance
            //				4. if todays date is not past expiration date:
            //				5. calculate the distance between the device location and the contract - location, called device-distance
            //				6. if the device - distance is less than the contract-distance a hit is found,
            //					7. the texts from the hit record are read and displayed.
            //			end loop
            //


            try
            {
                //    1. establishes its own location, deviceLatitude. deviceLongitude
                Entry100.GetDevLocationAsync();
                //    2. get count of ad-contracts
                Entry100.azLoop = A_Advertisement.GetAzLoopCount();
                Entry100.azLoop = 1;
                //
                // loop on all Azure records
                //
                for (int iL = 0; iL < Entry100.azLoop; iL++)
                {
                    //	3. reads the ad-contract DB, keyed by location and distance, called contract-location, contract - distance
                    string aa = Entry100.readAd_Azure(iL);
                    //	4. if todays date is not past expiration date:

                    DateTime dt2 = DateTime.Now;;
                    DateTime dt1 = DateTime.Parse("07/12/2021");

                    if (dt1.Date > dt2.Date)
                    {
                        //	5. calculate the distance between the device location and the contract - location, called device-distance
                        int idistance = Entry100.adSpotsDistance_Azure(Entry100.deviceLatitude, Entry100.deviceLongitude, Entry100.aDspotLatitude, Entry100.aDspotLongitude);
                        //	6. if the device - distance is less than the contract-distance a hit is found,
                        if (idistance <= Entry100.aDspotMiles)
                        {
                            Entry100.adText = Entry100.adString;
                            break;
                        }
                    }
                    else
                    {
                        //It's an earlier or equal date
                    }
                }
                if (Entry100.adText.Length == 0)
                {
                    Entry100.adText = Entry100.adString;
                }
                this.addFooter.Text = "  " + Entry100.adText + "  ";
            }
            catch (Exception ex)
            {
                string aa = ex.ToString();
                //////ib = true;
            }

            A_Advertisement.Adv_Set1(addFooter, 0);
            stackAd = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.OldLace,
                //Spacing = 0,
                Children =
                {
                    addFooter
                }
            };

            #endregion


            #region Final Stacks

            StackLayout stackFinalHeader = new StackLayout()
            {
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.Yellow, //.OldLace,
                //Spacing = 0,
                Children =
                {
                }
            };

            var stackFinalBody = new StackLayout()
            {
                Margin            = new Thickness(0, 0, 0, 0),
                Orientation       = StackOrientation.Vertical,
                VerticalOptions   = LayoutOptions.Start,
                HorizontalOptions = LayoutOptions.Start,
                BackgroundColor   = Color.White, //.Green, //.Black,
                HeightRequest     = App.DisplayScaleMax,
                Children          =
                {
                    centerStack
                }
            };

            ScrollView FinalScrollView = new ScrollView()
            {
                VerticalOptions   = LayoutOptions.StartAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Content           = stackFinalBody
            };


            // ------------------------------------------------------------------------
            // Page -------------------------------------------------------------------
            // ------------------------------------------------------------------------
            // Stacklayout
            // scroll Layout / View
            //   stack layout
            //
            // -------------------------------------------------------------------------
            App.CCMed FinalPageLayout = new App.CCMed();

            FinalPageLayout.TopStack.Children.Add(stackFinalHeader);
            //FinalPageLayout.TopStack.Children.Add(SPheader001);
            //FinalPageLayout.TopStack.Children.Add(FinalScrollView);
            FinalPageLayout.CenterStack.Children.Add(FinalScrollView);
            FinalPageLayout.BottomStack.Children.Add(stackAd); // TopScreen1.contentstatusBaseline);

            // Assign to the page
            this.Content = FinalPageLayout;

            #endregion

            //
            // Setting Startup Values
            //
            //////Accelerometer.Stop();
            //////Preferences.Set("MonitorOnOff", "0");
            //
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            // This will "blitz" through this page, and immidiately put up the next pag.
            // ... but if you pewaa <Return>, it will show this page for some advertisement
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            //
            try
            {
                var duration = TimeSpan.FromMilliseconds(1000);
                Vibration.Vibrate(duration);
            }
            catch (FeatureNotSupportedException ex)
            {
                string aa = ex.Message.ToString();
            }
            catch (Exception ex)
            {
                string aa = ex.Message.ToString();
            }
            bool noBlockChain = false;
            Navigation.PushAsync(new FindHospital(noBlockChain));
            //
        }