コード例 #1
0
ファイル: WebView.cs プロジェクト: modulexcite/Eto-1
 public virtual void OnDocumentLoaded(WebViewLoadedEventArgs e)
 {
     if (documentLoaded != null)
     {
         documentLoaded(this, e);
     }
 }
コード例 #2
0
ファイル: WebView.cs プロジェクト: pcdummy/Eto
 public virtual void OnNavigated(WebViewLoadedEventArgs e)
 {
     if (navigated != null)
     {
         navigated(this, e);
     }
 }
コード例 #3
0
ファイル: WebView.cs プロジェクト: mhusen/Eto
		/// <summary>
		/// Raises the <see cref="Navigated"/> event.
		/// </summary>
		/// <param name="e">Event arguments.</param>
		protected virtual void OnNavigated(WebViewLoadedEventArgs e)
		{
			Properties.TriggerEvent(NavigatedEvent, this, e);
		}
コード例 #4
0
ファイル: WebView.cs プロジェクト: hultqvist/Eto
		public virtual void OnDocumentLoaded (WebViewLoadedEventArgs e)
		{
			if (documentLoaded != null)
				documentLoaded (this, e);
		}
コード例 #5
0
		void HandleDocumentLoaded (object sender, WebViewLoadedEventArgs e)
		{
			
		}
コード例 #6
0
ファイル: WebView.cs プロジェクト: zzlvff/Eto
 /// <summary>
 /// Raises the document loaded event.
 /// </summary>
 public void OnDocumentLoaded(WebView widget, WebViewLoadedEventArgs e)
 {
     using (widget.Platform.Context)
         widget.OnDocumentLoaded(e);
 }
コード例 #7
0
ファイル: WebView.cs プロジェクト: zzlvff/Eto
 /// <summary>
 /// Raises the <see cref="DocumentLoaded"/> event.
 /// </summary>
 /// <param name="e">Event arguments.</param>
 protected virtual void OnDocumentLoaded(WebViewLoadedEventArgs e)
 {
     Properties.TriggerEvent(DocumentLoadedEvent, this, e);
 }
コード例 #8
0
ファイル: WebView.cs プロジェクト: zzlvff/Eto
 /// <summary>
 /// Raises the <see cref="Navigated"/> event.
 /// </summary>
 /// <param name="e">Event arguments.</param>
 protected virtual void OnNavigated(WebViewLoadedEventArgs e)
 {
     Properties.TriggerEvent(NavigatedEvent, this, e);
 }
コード例 #9
0
ファイル: ChannelSection.cs プロジェクト: neiz/JabbR.Eto
		protected override void HandleDocumentLoaded (object sender, WebViewLoadedEventArgs e)
		{
			if (this.Channel != null && Server.IsConnected) {
				BeginLoad ();
				var getChannelInfo = this.Channel.GetChannelInfo ();
				if (getChannelInfo != null) {
					getChannelInfo.ContinueWith(t => {
						var channel = t.Result;
						Application.Instance.AsyncInvoke (delegate {
							SetTopic (channel.Topic);
							UserList.SetUsers (channel.Users);
							var getHistory = channel.GetHistory (LastHistoryMessageId);
							if (getHistory != null) {
								getHistory.ContinueWith(r => {
									Application.Instance.AsyncInvoke (delegate {
										try {
											Debug.WriteLine ("Starting live");
											StartLive ();
											Debug.WriteLine ("Adding History");
											AddHistory (r.Result, true);
											AddNotification (new NotificationMessage (DateTimeOffset.Now, string.Format ("You just entered {0}", Channel.Name)));
											Debug.WriteLine ("Set Marker");
											SetMarker ();
											Debug.WriteLine ("Replay delayed");
											ReplayDelayedCommands ();
	
											Debug.WriteLine ("Finished Load");
											FinishLoad ();
										}
										catch (Exception ex) {
											Debug.WriteLine ("Getting Initial History {0}", ex);
											throw;
										}
									});
								}, TaskContinuationOptions.OnlyOnRanToCompletion);
								getHistory.ContinueWith (r => {
									Debug.WriteLine ("Error getting history {0}", r.Exception);
								}, TaskContinuationOptions.OnlyOnFaulted);
							}
							else
								FinishLoad ();
						});
					}, TaskContinuationOptions.OnlyOnRanToCompletion);
					getChannelInfo.ContinueWith (t => {
						Debug.WriteLine ("Error getting channel info {0}", t.Exception);	
					}, TaskContinuationOptions.OnlyOnFaulted);
				}
				else
					FinishLoad ();
			}
			else {
				StartLive ();
				ReplayDelayedCommands ();
				AddNotification (new NotificationMessage(DateTimeOffset.Now, "Disconnected"));
			}
		}
コード例 #10
0
ファイル: WebView.cs プロジェクト: JohnACarruthers/Eto
 public virtual void OnNavigated(WebViewLoadedEventArgs e)
 {
     if (navigated != null)
         navigated(this, e);
 }
コード例 #11
0
 void HandleDocumentLoaded(object sender, WebViewLoadedEventArgs e)
 {
     var newIsLocal = string.IsNullOrEmpty(e.Uri.AbsolutePath) || e.Uri.IsLoopback;
     if (isLocal != newIsLocal)
     {
         isLocal = newIsLocal;
         var newSize = isLocal ? defaultSize : expandedSize;
         var location = this.Location;
         var rect = new Rectangle(location, this.ClientSize);
         rect.Inflate((newSize.Width - rect.Width) / 2, (newSize.Height - rect.Height) / 2);
         if (Generator.IsMac)
             rect.Y = location.Y;
         this.Location = rect.Location;
         this.ClientSize = rect.Size;
     }
 }
コード例 #12
0
ファイル: ChannelSection.cs プロジェクト: jschell/JabbR.Eto
        protected override void HandleDocumentLoaded(object sender, WebViewLoadedEventArgs e)
        {
            if (this.Channel != null && Server.IsConnected)
            {
                BeginLoad();
                var getChannelInfo = this.Channel.GetChannelInfo();
                if (getChannelInfo != null)
                {
                    getChannelInfo.ContinueWith(t => {
                        if (t.IsFaulted)
                        {
                            LoadError(t.Exception, "Error getting channel info");
                            return;
                        }
                        var channel = t.Result;
                        Application.Instance.AsyncInvoke(delegate
                        {
                            SetTopic(channel.Topic);
                            UserList.SetUsers(channel.Users);
                            var getHistory = channel.GetHistory(LastHistoryMessageId);
                            if (getHistory != null)
                            {
                                getHistory.ContinueWith(r => {
                                    if (r.IsFaulted)
                                    {
                                        LoadError(r.Exception, "Error getting history");
                                        return;
                                    }
                                    Application.Instance.AsyncInvoke(delegate
                                    {
                                        StartLive();
                                        AddHistory(r.Result, true);
                                        AddNotification(new NotificationMessage(DateTimeOffset.Now, string.Format("You just entered {0}", Channel.Name)));
                                        SetMarker();
                                        ReplayDelayedCommands();

                                        FinishLoad();
                                    });
                                });
                            }
                            else
                                FinishLoad();
                        });
                    });
                }
                else
                    FinishLoad();
            }
            else
            {
                StartLive();
                ReplayDelayedCommands();
                AddNotification(new NotificationMessage(DateTimeOffset.Now, "Disconnected"));
            }
        }
コード例 #13
0
 protected virtual void HandleDocumentLoaded(object sender, WebViewLoadedEventArgs e)
 {
     Application.Instance.AsyncInvoke(delegate
     {
         StartLive();
         ReplayDelayedCommands();
     });
 }
コード例 #14
0
 protected override async void HandleDocumentLoaded(object sender, WebViewLoadedEventArgs e)
 {
     if (Channel != null && Server.IsConnected)
     {
         BeginLoad();
         try
         {
             var channel = await Channel.GetChannelInfo();
             if (channel != null)
             {
                 SetTopic(channel.Topic);
                 UserList.SetUsers(channel.Users);
                 var history = await channel.GetHistory(LastHistoryMessageId);
                 if (history != null)
                 {
                     StartLive();
                     AddHistory(history, true);
                     AddNotification(new NotificationMessage(DateTimeOffset.Now, string.Format("You just entered {0}", Channel.Name)));
                     SetMarker();
                     ReplayDelayedCommands();
                 }
             }
         }
         catch (Exception ex)
         {
             LoadError(ex, "Error getting channel info");
         }
         FinishLoad();
     }
     else
     {
         StartLive();
         ReplayDelayedCommands();
         AddNotification(new NotificationMessage(DateTimeOffset.Now, "Disconnected"));
     }
 }
コード例 #15
0
ファイル: WebView.cs プロジェクト: mhusen/Eto
		/// <summary>
		/// Raises the <see cref="DocumentLoaded"/> event.
		/// </summary>
		/// <param name="e">Event arguments.</param>
		protected virtual void OnDocumentLoaded(WebViewLoadedEventArgs e)
		{
			Properties.TriggerEvent(DocumentLoadedEvent, this, e);
		}
コード例 #16
0
ファイル: WebView.cs プロジェクト: mhusen/Eto
			/// <summary>
			/// Raises the document loaded event.
			/// </summary>
			public void OnDocumentLoaded(WebView widget, WebViewLoadedEventArgs e)
			{
				widget.Platform.Invoke(() => widget.OnDocumentLoaded(e));
			}
コード例 #17
0
 /// <summary>
 /// Raises the document loaded event.
 /// </summary>
 public void OnDocumentLoaded(WebView widget, WebViewLoadedEventArgs e)
 {
     widget.Platform.Invoke(() => widget.OnDocumentLoaded(e));
 }