void RemoveSelectedItem(object sender, EventArgs e) { if (DisplayState.Warn("Are you sure you want to remove this license?")) { var license = (LicenseItemModel)sender; license.ItemRemoved -= RemoveSelectedItem; SpAgent.Product.Stores.Delete(license.ActivationKey); Licenses.Remove(license); } }
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(); }