Esempio n. 1
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            var    Web         = new WebPageView();
            string text        = "";
            string htmlEncoded = Server.HtmlEncode(text);

            Web.Url = text;
            return(View(Web));
        }
Esempio n. 2
0
        public ActionResult Index(WebPageView webPageView)
        {
            var Web = new WebPageView();

            Web = webPageView;

            var html = new HtmlString(Web.Url);

            return(View("Detail", Web));
        }
Esempio n. 3
0
        public async Task OnOpenLink()
        {
            string link    = Book.VolumeInfo.PreviewLink;
            var    btcolor = (Color)App.Current.Resources[ColorKeys.Primary];

            if (string.IsNullOrEmpty(link))
            {
                CustomActionSheets invalidActionSheet = null;
                invalidActionSheet = new CustomActionSheets(Labels.Labels.LinkNotAvailable, new System.Tuple <Command, string, Color, Color, Color>[] {
                    new System.Tuple <Command, string, Color, Color, Color>(new Command(async() =>
                    {
                        await invalidActionSheet.PopPopupAsync();
                    }),
                                                                            Labels.Labels.OK, btcolor, Color.White, btcolor)
                });
                await invalidActionSheet.DisplayActionSheet();

                return;
            }
            CustomActionSheets actionSheet = null;

            actionSheet = new CustomActionSheets(Labels.Labels.HowOpen, new System.Tuple <Command, string, Color, Color, Color>[] {
                new System.Tuple <Command, string, Color, Color, Color>(new Command(async() =>
                {
                    await Launcher.OpenAsync(new System.Uri(link));
                    await actionSheet.PopPopupAsync();
                }),
                                                                        Labels.Labels.PhoneBrowser, btcolor, Color.White, btcolor),
                new System.Tuple <Command, string, Color, Color, Color>(new Command(async() =>
                {
                    var webPage = new WebPageView(link);
                    await Navigation.PushAsync(webPage);
                    await actionSheet.PopAllPopupAsync();
                }),
                                                                        Labels.Labels.App, btcolor, Color.White, btcolor)
            });
            await actionSheet.DisplayActionSheet();

            return;
        }
Esempio n. 4
0
 public ActionResult Detail(WebPageView webPageView)
 {
     return(View(webPageView));
 }