public static async Task CheckWarningBeforeSync(IWorkbook workbook, ISynchronizationManager syncManager, IMessageBoxService messageBoxService, IPlatformService platformService) { if (workbook == null) { throw new ArgumentNullException("workbook"); } if (syncManager == null) { throw new ArgumentNullException("syncManager"); } if (messageBoxService == null) { throw new ArgumentNullException("messageBoxService"); } if (platformService == null) { throw new ArgumentNullException("platformService"); } // check if context warning has already been shown if (!workbook.Settings.GetValue <bool>(CoreSettings.SyncWarningContextNotSupported)) { if (workbook.Contexts.Count > 0 && !syncManager.ActiveProviderSupportFeature(SyncFeatures.Context)) { // show warning var result = await messageBoxService.ShowAsync( StringResources.Dialog_TitleConfirmation, StringResources.Dialog_SyncContextsNotSupported, DialogButton.YesNo); if (result == DialogResult.Yes) { await platformService.OpenWebUri(Constants.HelpPageChooseSyncAddress); } workbook.Settings.SetValue(CoreSettings.SyncWarningContextNotSupported, true); } } }