Exemple #1
0
 public void OnHeartbeatUriChanged( object sender, UriChangedEventArgs e )
 {
     try {
         if ( shutdownPending ) return;
         if ( uriDisplay.InvokeRequired ) {
             BeginInvoke( ( EventHandler<UriChangedEventArgs> )OnHeartbeatUriChanged,
                     sender, e );
         } else {
             uriDisplay.Text = e.NewUri.ToString();
             uriDisplay.Enabled = true;
         }
     } catch ( ObjectDisposedException ) {
     } catch ( InvalidOperationException ) { }
 }
Exemple #2
0
 static void OnHeartbeatUriChanged( object sender, UriChangedEventArgs e ) {
     File.WriteAllText( "externalurl.txt", e.NewUri.ToString(), Encoding.ASCII );
     Console.WriteLine( "** URL: {0} **", e.NewUri );
     Console.WriteLine( "URL is also saved to file externalurl.txt" );
 }
Exemple #3
0
 static void OnHeartbeatUrlChanged( object sender, UriChangedEventArgs e ) {
     File.WriteAllText( "externalurl.txt", e.NewUri.ToString(), Encoding.ASCII );
     Console.WriteLine( "** " + e.NewUri + " **" );
 }