Beispiel #1
0
 public FrmMain()
 {
     InitializeComponent();
     EnableListener = ConfigurationManager.AppSettings["EnableListener"];
     if (Convert.ToBoolean(EnableListener))
     {
         NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(AddressChangedCallback);
     }
     NetResolver.EnableRemoteSettings();
     getData();
 }
Beispiel #2
0
 protected override void OnStart(string[] args)
 {
     try
     {
         log.Debug("Starting Service");
         NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(AddressChangedCallback);
         NetResolver.EnableRemoteSettings();
         getData();
     }
     catch (Exception ex)
     {
         log.Error(ex.ToString());
     }
 }