コード例 #1
0
        private async Task Browse()
        {
            ProgressRingBrowse.Foreground = new SolidColorBrush(Windows.UI.Colors.Red);
            ProgressStart();

            cusDep = new CustomerDepartment();
            if (!(TextBoxUrl.Text.Contains("http://") || TextBoxUrl.Text.Contains("https://") || TextBoxUrl.Text.Contains(".com")))
            {
                cusDep.stringURL = "http://www.google.com/search?q=" + TextBoxUrl.Text;
            }
            else
            {
                cusDep.stringURL = TextBoxUrl.Text;
            }
            try
            {
                if (Settings.ToggleSwitchCompression == true)
                {
                    await cusDep.GetUri();

                    NavigateInWebview();
                    TextBoxUrl.Text = cusDep.stringURL;
                }
                else
                {
                    CurrentWebView().Navigate(new Uri(cusDep.stringURL));
                }
            }
            catch (Exception e)
            {
                CurrentWebView().NavigateToString(e.ToString());
            }
        }
コード例 #2
0
        private async void Browse(string url)
        {
            ProgressRingBrowse.Foreground = new SolidColorBrush(Windows.UI.Colors.Red);
            ProgressStart();

            cusDep           = new CustomerDepartment();
            cusDep.stringURL = url;
            try
            {
                await cusDep.GetUri();

                NavigateInWebview();
                TextBoxUrl.Text = cusDep.stringURL;
            }
            catch (Exception e)
            {
                CurrentWebView().NavigateToString(e.ToString());
            }
        }
コード例 #3
0
        private async void Browse(string url)
        {
            ProgressRingBrowse.Foreground = new SolidColorBrush(Windows.UI.Colors.Red);
            ProgressStart();

            cusDep = new CustomerDepartment();
            cusDep.stringURL = url;
            try
            {
                await cusDep.GetUri();
                NavigateInWebview();
                TextBoxUrl.Text = cusDep.stringURL;
            }
            catch (Exception e)
            {
                CurrentWebView().NavigateToString(e.ToString());
            }
        }
コード例 #4
0
        private async Task Browse()
        {
            ProgressRingBrowse.Foreground = new SolidColorBrush(Windows.UI.Colors.Red);
            ProgressStart();

            cusDep = new CustomerDepartment();
            if (!(TextBoxUrl.Text.Contains("http://") || TextBoxUrl.Text.Contains("https://") || TextBoxUrl.Text.Contains(".com")))
            {
                cusDep.stringURL = "http://www.google.com/search?q=" + TextBoxUrl.Text;
            } else cusDep.stringURL = TextBoxUrl.Text;
            try
            {
                if (Settings.ToggleSwitchCompression == true)
                {
                    await cusDep.GetUri();
                    NavigateInWebview();
                    TextBoxUrl.Text = cusDep.stringURL;
                }
                else
                {
                    CurrentWebView().Navigate(new Uri(cusDep.stringURL));
                }
                
            }
            catch (Exception e)
            {
                CurrentWebView().NavigateToString(e.ToString());
            }

            
        }