Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/02/11 18:42:44 (13 years ago)
Author:
ascheibe
Message:

#1233 slave: catch more errors and log them to the windows event log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/SlaveMainViewBase.cs

    r6823 r6945  
    6161    #region Register Content Events
    6262    protected override void DeregisterContentEvents() {
     63      Content.CoreConnectionChanged -= new EventHandler<Common.EventArgs<CoreConnection>>(Content_CoreConnectionChanged);
    6364      base.DeregisterContentEvents();
    6465    }
     
    6667    protected override void RegisterContentEvents() {
    6768      base.RegisterContentEvents();
     69      Content.CoreConnectionChanged += new EventHandler<Common.EventArgs<CoreConnection>>(Content_CoreConnectionChanged);
     70    }
     71
     72    void Content_CoreConnectionChanged(object sender, Common.EventArgs<CoreConnection> e) {
     73      if (e.Value == CoreConnection.Offline) {
     74        Connector();
     75      }
    6876    }
    6977    #endregion
     
    7785        Content.UserVisibleMessageFired += new System.EventHandler<Common.EventArgs<string>>(Content_UserVisibleMessageFired);
    7886        Task.Factory.StartNew(Connector);
     87      } else {
     88        Content.UserVisibleMessageFired -= new System.EventHandler<Common.EventArgs<string>>(Content_UserVisibleMessageFired);
    7989      }
    8090    }
Note: See TracChangeset for help on using the changeset viewer.