예제 #1
0
        void TestConnection()
        {
            var diagnosticsResult = DistributorDiagnosticsHelper.GetDiagnosticsInformation(new Uri(DistributorUrl));

            MessageBox.Show(diagnosticsResult.GetAllMessagesAsString(), "Connectivity test", MessageBoxButton.OK,
                            diagnosticsResult.AllVerificationsPassed ? MessageBoxImage.Information : MessageBoxImage.Warning);
        }
예제 #2
0
        void Save()
        {
            if (HasValidDistributorUrl())
            {
                var diagnosticsResult = DistributorDiagnosticsHelper.GetDiagnosticsInformation(new Uri(DistributorUrl));
                if (!diagnosticsResult.AllVerificationsPassed)
                {
                    var messages = diagnosticsResult.GetAllMessagesAsString() + "\n\nDo you want to save this configuration anyway?";
                    if (!DisplayState.Warn(messages))
                    {
                        return;
                    }
                }
            }

            DistributorConfigurationRepository.Save(this);
            _isDirty = false;
            SaveCommand.RaiseCanExecuteChanged();
            SetFirstRunLicensingConfigurationFinishedIfApplies();
        }