static void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { try { if (IsRunning) { using (UpdaterService.UpdaterIpcServiceClient sc = new UpdaterService.UpdaterIpcServiceClient()) { updateInfo.LastCheckTime = sc.GetLastCheckTimestamp(); updateInfo.Details = sc.GetNewVersionDetails(); updateInfo.UpdateExists = sc.UpdateExists(); updateInfo.DownloadIsComplete = sc.IsDownloadComplete(); sc.Close(); } } } catch (Exception ex) { try { DomainModel.Application.Status.Update( StatusController.Abstract.StatusTypes.Error, "", ex.Message); } catch { } } }
internal static void ApplyUpdates() { try { using (UpdaterService.UpdaterIpcServiceClient sc = new UpdaterService.UpdaterIpcServiceClient()) { sc.ApplyUpdates(); sc.Close(); } } catch (Exception ex) { try { DomainModel.Application.Status.Update( StatusController.Abstract.StatusTypes.Error, "", ex.Message); } catch { } } }