private void CheckForUpdates()
        {
            UpdateChecker checker = new UpdateChecker();
            checker.Completed += (src, args) =>
            {
                if(args.Error == null)
                {
                    this.DataContext = args;

                    if(args.UpdateAvailable)
                    {
                        LoadingStateGrid.Visibility = Visibility.Collapsed;
                        UpdateAvailableStateGrid.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        LoadingStateGrid.Visibility = Visibility.Collapsed;
                        NoUpdateAvailableStateGrid.Visibility = Visibility.Visible;
                    }
                }
                else
                {
                    OnException(args.Error);
                }
            };
            checker.Start();
        }
        private void Initialize()
        {
            IsBusy = true;

            _service = LocateService();
            IsServerRunning = _service.Status == ServiceControllerStatus.Running;

            LoadSettingsFromRegistry();
            CanSaveSettings = false;

            // Launch an update check
            UpdateChecker uc = new UpdateChecker();
            uc.Completed += (src, args) =>
            {
                if (args.Error == null && args.UpdateAvailable)
                {
                    if (MessageBox.Show("A new version is available." + Environment.NewLine + "Click 'yes' to see more about the update.", "Update", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
                    {
                        this.CheckForUpdates.Execute(null);
                    }
                }
            };
            uc.Start();

            IsBusy = false;
        }