示例#1
0
        void INavigationAware.HandleNavigatedTo(NavigatedArgs e)
        {
#if !(NETFX_CORE || WINDOWS_UWP)
            if (e.Uri != null)
            {
                string decodedUrl = WebUtility.UrlDecode(e.Uri.ToString());

                queryParameters = WebUtilityExtended.ParseQueryString(decodedUrl);
            }
#endif
            OnNavigatedTo(e);
        }
示例#2
0
        public async Task <bool> ShowAsync()
        {
            StringBuilder url = new StringBuilder("mailto:?");

            var to = String.Join(";", toList);

            if (!string.IsNullOrWhiteSpace(to))
            {
                url.Append("to=");
                url.Append(WebUtilityExtended.UrlEncode(to));
                url.Append('&');
            }

            var cc = String.Join(";", toList);

            if (!string.IsNullOrWhiteSpace(cc))
            {
                url.Append("cc=");
                url.Append(WebUtilityExtended.UrlEncode(cc));
                url.Append('&');
            }

            var bcc = String.Join(";", bccList);

            if (string.IsNullOrWhiteSpace(bcc))
            {
                url.Append("bcc=");
                url.Append(WebUtilityExtended.UrlEncode(Body));
                url.Append('&');
            }

            if (string.IsNullOrWhiteSpace(Subject))
            {
                url.Append("subject=");
                url.Append(WebUtilityExtended.UrlEncode(Subject));
                url.Append('&');
            }

            if (string.IsNullOrWhiteSpace(Body))
            {
                url.Append("body=");
                url.Append(WebUtilityExtended.UrlEncode(Body));
                url.Append('&');
            }

            var mailToUri = new Uri(url.ToString());
            await Launcher.LaunchUriAsync(mailToUri);

            return(true);
        }