Esempio n. 1
0
 private void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     if (args.Uri != null)
     {
         statusTextBlock.Text = "Loading content for " + args.Uri.ToString();
     }
 }
Esempio n. 2
0
        private void wbView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            System.Diagnostics.Debug.WriteLine("wbView_ContentLoading");

            _vmBinder.Store.CheckDownloadableItem(args.Uri);
            LastLoadedUrl = args.Uri.AbsoluteUri;
        }
Esempio n. 3
0
        private void AuthProcess_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            if (null != args.Uri && args.Uri.AbsolutePath.Contains("/login/oauth2/pincode/"))
            {
                ViewModel.SettingView     = false;
                ViewModel.AuthProcessView = false;

                ThermostatAPI api = Global.Instance.ThermostatAPI;

                string json = args.Uri.AbsolutePath.Replace("/login/oauth2/pincode/", "");

                Task <bool> t = Task.Run(async() => await api.GetAccessToken(json));
                t.Wait();

                if (t.Result)
                {
                    //Task m = Task.Run(async () => await SetTokenToMainApp(api.AuthToken));
                    //m.Wait();

                    var message = new ValueSet();
                    message.Add("Type", "COMMON");
                    message.Add("Command", "SETNESTTOKEN");
                    message.Add("NESTTOKEN", api.AuthToken);

                    //AppServiceResponse response = await ConnectionService._connection.connection.SendMessageAsync(message);
                    IOTOI.Common.CommonService.GetReturnData(message);

                    ViewModel.InitDevice();
                }
                else
                {
                    ViewModel.Setting();
                }
            }
        }
Esempio n. 4
0
        private async void wbView_FrameContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            System.Diagnostics.Debug.WriteLine("wbView_FrameContentLoading");
            System.Diagnostics.Debug.WriteLine(args.Uri.ToString());

            LastLoadedUrl = args.Uri.ToString();

            /*if (args.Uri.ToString().Contains("en_US/application/"))
             * {
             *  btnDownload.Visibility = Windows.UI.Xaml.Visibility.Visible;
             * }
             * else
             * {
             *  btnDownload.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
             * }
             *
             * if (args.Uri.ToString().Contains("watchfaces"))
             * {
             *  btnApps.Visibility = Visibility.Visible;
             *  btnFace.Visibility = Visibility.Collapsed;
             * }
             * if (args.Uri.ToString().Contains("watchapps"))
             * {
             *  btnApps.Visibility = Visibility.Collapsed;
             *  btnFace.Visibility = Visibility.Visible;
             * }
             *
             * try
             * {
             *     String Result = await wbView.InvokeScriptAsync("eval", new string[] { "document.getElementsByClassName(\"add-button\")).removeAttribute(\"ng-click\");" });
             *      System.Diagnostics.Debug.WriteLine(Result);
             * }
             * catch (Exception) { }*/
        }
Esempio n. 5
0
 private void WebView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     if (doLoading)
     {
         doLoading = false;
         DoOnMainThreadAsync(() => OnContentLoading()).ConfigureAwait(false);
     }
 }
Esempio n. 6
0
 private async void OnContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     if (Logger.LogExtraTiming)
     {
         var uri = args.Uri == null ? "null" : args.Uri.ToString();
         await Logger.LogAsync($"MainEpubReader:HTML:OnContentLoading: URL={uri}");
     }
 }
Esempio n. 7
0
 private void contentView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     var ds = DataContext as ItemViewModel;
     if (ds != null)
     {
         ds.IsPrintEnable = false;
     }
 }
Esempio n. 8
0
 private void wvMain_ContentLoading(Windows.UI.Xaml.Controls.WebView sender, WebViewContentLoadingEventArgs args)
 {
     dtMaxLoadTime.Start();
     SendMessage?.Invoke(null, new ContentViewEventArgs()
     {
         Type = "ContentLoading", Uri = args.Uri
     });
 }
Esempio n. 9
0
 private void Vista_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     ProgRing.Visibility     = Visibility.Visible;
     ErrorMessage.Visibility = Visibility.Collapsed;
     ToTopButton.Visibility  = Visibility.Collapsed;
     // Método que comprueba si se puede navegar para atrás o para adelante y activa o desactiva los botones de navegación
     ComprobarNavegacion();
 }
Esempio n. 10
0
        private void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            CBBack.IsEnabled    = webView1.CanGoForward;
            CBForward.IsEnabled = webView1.CanGoBack;

            progress1.IsActive       = true;
            progress.IsIndeterminate = true;
            progress.Visibility      = Visibility.Visible;
        }
Esempio n. 11
0
 // ProgressRing enable
 private void webView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     progRing.Opacity      = 1;
     btnRefresh.Opacity    = 0;
     btnRefresh.IsEnabled  = false;
     btnStop.IsEnabled     = true;
     btnStop.Opacity       = 1;
     tbxWebPageAdress.Text = Convert.ToString(webView.Source);
 }
 private void Wv_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     if (num < 2)
     {
         ++num;;
     }
     btn_Open.IsEnabled = false;
     MainPage.UseRefresh();
 }
Esempio n. 13
0
        private void currentWebView_ContentLoading(FrameworkElement sender, WebViewContentLoadingEventArgs args)
        {
            MainProgressRing.IsActive   = true;
            MainProgressRing.Visibility = Visibility.Visible;

            StopAppBarButton.Visibility    = Visibility.Visible;
            RefreshAppBarButton.Visibility = Visibility.Collapsed;

            AddressAutoSuggestBox.Text = currentWebView.Source.ToString();
        }
Esempio n. 14
0
 private void OnContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     loading.Visibility    = Visibility.Visible;
     LoadingText.Text      = "拼命加载中...";
     LoadingPic.Visibility = Visibility.Collapsed;
     if (n == 1 && ("Windows.Mobile" == Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily))
     {
         Back.Visibility = Visibility.Visible;
     }
     n = 1;
 }
Esempio n. 15
0
        private async void LogInWebView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            //if (LogInWebView.Source.AbsoluteUri.Contains("code=") && LogInWebView.Source.Host == "localhost")
            //{
            //    var postitionCode = LogInWebView.Source.AbsoluteUri.IndexOf("code=");
            //    var code = LogInWebView.Source.AbsoluteUri.Remove(0, postitionCode + 5);
            //    var postitionScope = code.IndexOf("&scope=");
            //    code = code.Remove(postitionScope);
            //    var token = await oauth2.GetToken(code);

            //}
        }
        private async void Wv_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            var url = await wvMain.InvokeScriptAsync("eval", new string[] { "document.location.href;" });

            if (HasUrlBeenProcessed(url))
            {
                return;
            }

            lastProcessedUrl = url;

            MediaChanged?.Invoke(null, new MediaChangedEventArgs()
            {
                MediaUri = new Uri(url)
            });
        }
Esempio n. 17
0
        private void YoutubeWebElement_FrameContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            string temp = args.Uri.ToString();

            if (temp.Contains("/watch?v="))
            {
                youtubeUrl = temp;
            }
            Task.Delay(3000);
            if (youtubeUrl.Contains("/watch?v="))
            {
                downloadAppBarButton.IsEnabled = true;
            }
            else
            {
                downloadAppBarButton.IsEnabled = false;
            }
        }
Esempio n. 18
0
 private void web_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     style();
     if (args.Uri.AbsoluteUri.Contains("www.instagram.com/p/"))
     {
         if (gdDownloadPhotoOverlay == null)
         {
             this.FindName("gdDownloadPhotoOverlay");
             UtilityClass.TranslationAnimation(_compositor, gdDownloadPhotoOverlay, false);
         }
         gdDownloadPhotoOverlay.Visibility = Visibility.Visible;
     }
     else
     {
         if (gdDownloadPhotoOverlay != null)
         {
             gdDownloadPhotoOverlay.Visibility = Visibility.Collapsed;
         }
     }
 }
        private void WebViewContent_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            try
            {
                TextBoxUrl.Text = CurrentWebView().Source.AbsoluteUri;
            }
            catch {
                try
                {
                    TextBoxUrl.Text = cusDep.stringURL;
                }
                catch
                {
                    TextBoxUrl.Text = "Command Not available now";
                }
            }

            //Add to history list
            history.Add(TextBoxUrl.Text);

            WriteOnTile("Current URL: " + TextBoxUrl.Text);
        }
Esempio n. 20
0
        async void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            string url = (args.Uri != null) ? args.Uri.ToString() : "<null>";

            String filePath = "HistoryData.csv";
            //String filePath2 = "LastViewData.csv";

            // write file
            StorageFolder roamingFolder = ApplicationData.Current.RoamingFolder;
            StorageFile   file          = await roamingFolder.CreateFileAsync(filePath,
                                                                              CreationCollisionOption.OpenIfExists);

            //       StorageFile file2 = await roamingFolder.CreateFileAsync(filePath2,
            //  CreationCollisionOption.OpenIfExists);
            try
            {
                await FileIO.AppendTextAsync(file, (string)webView1.DocumentTitle + "\t" + url + "\t" + DateTime.Now + "\n");

                //       await FileIO.AppendTextAsync(file, (string)webView1.DocumentTitle + "\t" + url + "\t" + DateTime.Now + "\n");
            }
            catch (Exception ex) { }

            var s1 = new Logic.PopulateHistories();

            s1.populateHistories();

            var p1 = new Logic.HistoryDataStore(ref histories);

            cvs1.Source = histories;

            var p2 = new Logic.FavoriteDataStore(ref favorites_load);

            cvs2.Source = favorites_load;

            var s2 = new Logic.PopulateLastview();

            s2.populateLastview();
        }
Esempio n. 21
0
 void webView_FrameContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     // args.Uri
 }
Esempio n. 22
0
 /// <summary>
 /// Event to indicate webview has resolved the uri, and that it is loading html content
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     string url = (args.Uri != null) ? args.Uri.ToString() : "<null>";
     rootPage.NotifyUser(String.Format("Loading content for \"{0}\".\n", url), NotifyType.StatusMessage);
 }
Esempio n. 23
0
 private void ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     BackButton.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
 }
 /// <summary>
 /// Event to indicate webview has resolved the uri, and that it is loading html content
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 void FavoriteBrowser_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     IsNavigationCompleted = true;
 }
Esempio n. 25
0
 private void myWebView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     urlBar.Text = args.Uri.ToString();
 }
Esempio n. 26
0
 private void _webView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
 }
 private void framaContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
 }
 private void ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     m_base.FireOnLoading(false);
     HideReadingModeLoading();
 }
        /// <summary>
        /// Event to indicate webview has resolved the uri, and that it is loading html content
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            string url = (args.Uri != null) ? args.Uri.ToString() : "<null>";

            rootPage.NotifyUser(String.Format("Loading content for \"{0}\".\n", url), NotifyType.StatusMessage);
        }
Esempio n. 30
0
 /// <summary>
 /// Event to indicate webview has resolved the uri, and that it is loading html content
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     string url = (args.Uri != null) ? args.Uri.ToString() : "<null>";
 }
 void webview_ContentLoading(WebView sender, WebViewContentLoadingEventArgs e) {
     //com.codename1.ui.events.BrowserNavigationCallback bn = (com.codename1.ui.events.BrowserNavigationCallback)currentBrowser.getBrowserNavigationCallback();
     com.codename1.ui.events.ActionEvent ev = new com.codename1.ui.events.ActionEvent();
     ev.@this(toJava(e.Uri.OriginalString));
     currentBrowser.fireWebEvent(toJava("onLoad"), ev);
 }
 private void ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     m_base.FireOnLoading(false);
     HideReadingModeLoading();
 }
        private void WebViewContent_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            try
            {
                TextBoxUrl.Text = CurrentWebView().Source.AbsoluteUri;
            }
            catch{
                try
                {
                    TextBoxUrl.Text = cusDep.stringURL;
                }
                catch
                {
                    TextBoxUrl.Text = "Command Not available now";
                }
            }
            
            //Add to history list
            history.Add(TextBoxUrl.Text);

            WriteOnTile("Current URL: " + TextBoxUrl.Text);
        }
 private void oneView_FrameContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     SavePage(AccountManager.GetAccount(), args.Uri.ToString());
 }
 private void oneView_FrameContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     SavePage(AccountManager.GetAccount(), args.Uri.ToString());
 }
Esempio n. 36
0
 /// <summary> 
 /// Event to indicate webview has resolved the uri, and that it is loading html content 
 /// </summary> 
 void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     string url = (args.Uri != null) ? args.Uri.ToString() : "<null>";
 }
Esempio n. 37
0
 private void ChangeText(WebView sender, WebViewContentLoadingEventArgs args)
 {
     ShowUrl       = new UrlOperations().GetUrlToShow(sender.Source.ToString());
     UrlField.Text = ShowUrl;
     CheckButtons();
 }
Esempio n. 38
0
 private void wvMain_ContentLoading(Windows.UI.Xaml.Controls.WebView sender, WebViewContentLoadingEventArgs args)
 {
     dtMaxLoadTime.Start();
     SendMessage?.Invoke(null, new ContentViewEventArgs() { Type = "ContentLoading", Uri = args.Uri });
 }
Esempio n. 39
0
 private void Web_OnContentLoading(WebView aSender, WebViewContentLoadingEventArgs aArgs)
 {
     mProgressRing.IsActive    = true;
     mProgressRing.Visibility  = Visibility.Visible;
     mNavigateButton.IsEnabled = false;
 }
 private void ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     HideLoading();
     HideReadingModeLoading();
 }
Esempio n. 41
0
 private void webView_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     this.isWebviewLoading = true;
 }
		void wbMain_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
		{
		}
 /// <summary>
 /// Handle the event that indicates that WebView has resolved the URI, and that it is loading HTML content.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 void WebViewControl_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     AppendLog($"Loading content for \"{UriToString(args.Uri)}\".");
 }
Esempio n. 44
0
 /// <summary>
 /// Event to indicate webview has resolved the uri, and that it is loading html content
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 void webView1_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     string url = (args.Uri != null) ? args.Uri.ToString() : "<null>";
     appendLog(String.Format("Loading content for \"{0}\".\n", url));
 }
Esempio n. 45
0
 private void TopicWebView_OnContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
 {
     _navigatingRoot = false;
 }