示例#1
0
 public virtual void OnDocumentLoading(WebViewLoadingEventArgs e)
 {
     if (documentLoading != null)
     {
         documentLoading(this, e);
     }
 }
示例#2
0
文件: WebView.cs 项目: mhusen/Eto
			/// <summary>
			/// Raises the document loading event.
			/// </summary>
			public void OnDocumentLoading(WebView widget, WebViewLoadingEventArgs e)
			{
				widget.Platform.Invoke(() => widget.OnDocumentLoading(e));
			}
示例#3
0
文件: WebView.cs 项目: mhusen/Eto
		/// <summary>
		/// Raises the <see cref="DocumentLoading"/> event.
		/// </summary>
		/// <param name="e">Event arguments.</param>
		protected virtual void OnDocumentLoading(WebViewLoadingEventArgs e)
		{
			Properties.TriggerEvent(DocumentLoadingEvent, this, e);
		}
示例#4
0
文件: WebView.cs 项目: hultqvist/Eto
		public virtual void OnDocumentLoading (WebViewLoadingEventArgs e)
		{
			if (documentLoading != null)
				documentLoading (this, e);
		}
示例#5
0
文件: WebView.cs 项目: zzlvff/Eto
 /// <summary>
 /// Raises the document loading event.
 /// </summary>
 public void OnDocumentLoading(WebView widget, WebViewLoadingEventArgs e)
 {
     using (widget.Platform.Context)
         widget.OnDocumentLoading(e);
 }
示例#6
0
文件: WebView.cs 项目: zzlvff/Eto
 /// <summary>
 /// Raises the <see cref="DocumentLoading"/> event.
 /// </summary>
 /// <param name="e">Event arguments.</param>
 protected virtual void OnDocumentLoading(WebViewLoadingEventArgs e)
 {
     Properties.TriggerEvent(DocumentLoadingEvent, this, e);
 }
示例#7
0
 /// <summary>
 /// Raises the document loading event.
 /// </summary>
 public void OnDocumentLoading(WebView widget, WebViewLoadingEventArgs e)
 {
     widget.Platform.Invoke(() => widget.OnDocumentLoading(e));
 }
示例#8
0
        protected override void HandleAction(WebViewLoadingEventArgs e)
        {
            var historyIndex = e.Uri.LocalPath.IndexOf(LOAD_HISTORY_PREFIX);
            if (historyIndex >= 0)
            {
                LoadHistory();
                return;
            }

            var joinRoomIndex = e.Uri.LocalPath.IndexOf(JOIN_ROOM_PREFIX);
            if (joinRoomIndex >= 0)
            {
                Channel.Server.JoinChannel(e.Uri.PathAndQuery.Substring(joinRoomIndex + JOIN_ROOM_PREFIX.Length));
                return;
            }
            
            base.HandleAction(e);
        }
示例#9
0
 void HandleDocumentLoading(object sender, WebViewLoadingEventArgs e)
 {
     if (e.IsMainFrame)
     {
         Debug.Print("Loading {0}", e.Uri);
         if (e.Uri.IsFile || e.Uri.IsLoopback)
         {
             Application.Instance.AsyncInvoke(delegate
             {
                 HandleAction(e);
             });
             e.Cancel = true;
         }
         else
         {
             Application.Instance.AsyncInvoke(delegate
             {
                 Application.Instance.Open(e.Uri.AbsoluteUri);
             });
             e.Cancel = true;
         }
     }
 }
示例#10
0
 protected virtual void HandleAction(WebViewLoadingEventArgs e)
 {
     FinishLoad();
 }