public void OnCancelled() { browseDialog.Reset(); //as if it has not yet been configured if (_backupConfiguration != null) { browseDialog.ShowRestrictedServices = _backupConfiguration.UseProxy; if (_backupConfiguration.TaskEndPoint != null) { // Check whether the proxy URL has changed since the last time tool configuration was saved bool proxyChanged = MapApplication.Current != null && MapApplication.Current.Urls != null && _backupConfiguration.ProxyUrl != MapApplication.Current.Urls.ProxyUrl; // Only revert the URL on the service browsing UI if proxy is not being used or the proxy // URL is the same as the last time configuration was saved if (!_backupConfiguration.UseProxy || !proxyChanged) { browseDialog.SelectedResourceUrl = _backupConfiguration.TaskEndPoint.AbsoluteUri; } else { browseDialog.SelectedResourceUrl = null; } } configuration = _backupConfiguration.Clone(); } else { browseDialog.SelectedResourceUrl = null; configuration = null; } //refresh the ui with previous settings updateInputParamsPage(); updateOutputParamsPage(); updateTitleAndLayerOrderPage(); }
public void OnCompleted() { _backupConfiguration = configuration != null?configuration.Clone() : null; }