Ejemplo n.º 1
0
 public virtual void OnDocumentLoaded(WebViewLoadedEventArgs e)
 {
     if (documentLoaded != null)
     {
         documentLoaded(this, e);
     }
 }
Ejemplo n.º 2
0
 public virtual void OnNavigated(WebViewLoadedEventArgs e)
 {
     if (navigated != null)
     {
         navigated(this, e);
     }
 }
Ejemplo n.º 3
0
		/// <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);
		}
Ejemplo n.º 4
0
		public virtual void OnDocumentLoaded (WebViewLoadedEventArgs e)
		{
			if (documentLoaded != null)
				documentLoaded (this, e);
		}
Ejemplo n.º 5
0
		void HandleDocumentLoaded (object sender, WebViewLoadedEventArgs e)
		{
			
		}
Ejemplo n.º 6
0
 /// <summary>
 /// Raises the document loaded event.
 /// </summary>
 public void OnDocumentLoaded(WebView widget, WebViewLoadedEventArgs e)
 {
     using (widget.Platform.Context)
         widget.OnDocumentLoaded(e);
 }
Ejemplo n.º 7
0
 /// <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);
 }
Ejemplo n.º 8
0
 /// <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);
 }
Ejemplo n.º 9
0
		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"));
			}
		}
Ejemplo n.º 10
0
 public virtual void OnNavigated(WebViewLoadedEventArgs e)
 {
     if (navigated != null)
         navigated(this, e);
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 12
0
        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"));
            }
        }
Ejemplo n.º 13
0
 protected virtual void HandleDocumentLoaded(object sender, WebViewLoadedEventArgs e)
 {
     Application.Instance.AsyncInvoke(delegate
     {
         StartLive();
         ReplayDelayedCommands();
     });
 }
Ejemplo n.º 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"));
     }
 }
Ejemplo n.º 15
0
		/// <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);
		}
Ejemplo n.º 16
0
			/// <summary>
			/// Raises the document loaded event.
			/// </summary>
			public void OnDocumentLoaded(WebView widget, WebViewLoadedEventArgs e)
			{
				widget.Platform.Invoke(() => widget.OnDocumentLoaded(e));
			}
Ejemplo n.º 17
0
 /// <summary>
 /// Raises the document loaded event.
 /// </summary>
 public void OnDocumentLoaded(WebView widget, WebViewLoadedEventArgs e)
 {
     widget.Platform.Invoke(() => widget.OnDocumentLoaded(e));
 }