Ejemplo n.º 1
0
        void Render(MultipartRelated related)
        {
            var client = new MultipartRelatedWebViewClient(related);

            webView.SetWebViewClient(client);

            Render(related.Root);
        }
Ejemplo n.º 2
0
		void Render (MultipartRelated related)
		{
			var client = new MultipartRelatedWebViewClient (related);

			webView.SetWebViewClient (client);

			Render (related.Root);
		}
Ejemplo n.º 3
0
		void RenderMultipartRelated (MultipartRelated related)
		{
			var root = related.Root;

			if (root == null)
				return;

			var client = new MultipartRelatedWebViewClient (related);

			webView.SetWebViewClient (client);

			Render (root);
		}
Ejemplo n.º 4
0
        void RenderMultipartRelated(MultipartRelated related)
        {
            var root = related.Root;

            if (root == null)
            {
                return;
            }

            var client = new MultipartRelatedWebViewClient(related);

            webView.SetWebViewClient(client);

            Render(root);
        }
Ejemplo n.º 5
0
        protected override void VisitTextPart(TextPart entity)
        {
            TextConverter converter;

            if (renderedBody)
            {
                // since we've already found the body, treat this as an attachment
                attachments.Add(entity);
                return;
            }

            if (entity.IsHtml)
            {
                converter = new HtmlToHtml {
                    HtmlTagCallback = HtmlTagCallback
                };
            }
            else if (entity.IsFlowed)
            {
                var    flowed = new FlowedToHtml();
                string delsp;

                if (entity.ContentType.Parameters.TryGetValue("delsp", out delsp))
                {
                    flowed.DeleteSpace = delsp.ToLowerInvariant() == "yes";
                }

                converter = flowed;
            }
            else
            {
                converter = new TextToHtml();
            }

            var client = new MultipartRelatedWebViewClient(stack);
            var html   = converter.Convert(entity.Text);

            webView.SetWebViewClient(client);
            webView.LoadData(html, "text/html", "utf-8");
            renderedBody = true;
        }