Ejemplo n.º 1
0
 private void onWebsiteStatusChanged(WebsiteStatus changedFrom, WebsiteStatus changedTo)
 {
     if (WebsiteStatusChanged != null)
     {
         var args = new WebsiteStatusEventArgs();
         args.ChangedFrom = changedFrom;
         args.ChangedTo = changedTo;
         WebsiteStatusChanged(this, args);
     }
 }
Ejemplo n.º 2
0
 void WebsiteStatusChanged(object sender, WebsiteStatusEventArgs e)
 {
     Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
             {
                 switch (e.ChangedTo)
                 {
                     case WebsiteStatus.Up:
                         StatusImage.Source = (BitmapImage)Resources["status_up"];
                         break;
                     case WebsiteStatus.Down:
                         StatusImage.Source = (BitmapImage)Resources["status_down"];
                         break;
                 }
             }));
 }