private static void OnServiceEndpointPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GPWidget obj = (GPWidget)d; Uri newValue = (Uri)e.NewValue; Uri oldValue = (Uri)e.OldValue; if (newValue == null) { obj.ServiceInfo = null; } else if (newValue != null && oldValue != newValue) { obj.MetaDataLoader.ServiceEndpoint = newValue; obj.isLoading = true; // Get proxy URL if proxy is being used string proxyUrl = null; if (obj.Configuration != null && obj.Configuration.UseProxy && MapApplication.Current != null && MapApplication.Current.Urls != null) { proxyUrl = MapApplication.Current.Urls.ProxyUrl; } obj.MetaDataLoader.LoadMetadata(DesignerProperties.GetIsInDesignMode(obj), proxyUrl); } (obj.Execute as DelegateCommand).RaiseCanExecuteChanged(); }
public void Execute(object parameter) { if (configuration == null) { MessageBoxDialog.Show(Resources.Strings.GeoprocessingHasNotBeenconfigured, Resources.Strings.ConfigurationError, MessageBoxButton.OK); return; } if (gpWidget != null) { MapApplication.Current.HideWindow(gpWidget); } // Update proxy URL if proxy is used if (configuration.UseProxy && MapApplication.Current != null && MapApplication.Current.Urls != null) { configuration.ProxyUrl = MapApplication.Current.Urls.ProxyUrl; } gpWidget = new GPWidget(); gpWidget.Configuration = configuration; gpWidget.Map = Map; gpWidget.ExecuteCompleted += new EventHandler <GPWidget.ExecuteCompleteEventArgs>(gpWidget_ExecuteCompleted); SingleWindow.Current.ShowWindow(MapApplication.Current, configuration.Title, gpWidget); }
private void gpWidget_ExecuteCompleted(object sender, GPWidget.ExecuteCompleteEventArgs e) { if (!((gpWidget.LatestErrors != null && gpWidget.LatestErrors.Count > 0) //errors need to be displayed || GPResultWidget.AreDisplayable(gpWidget.Configuration.OutputParameters))) //results need to be displayed in control { MapApplication.Current.HideWindow(gpWidget); } }
public void Execute(object parameter) { if (configuration == null) { MessageBoxDialog.Show(Resources.Strings.GeoprocessingHasNotBeenconfigured, Resources.Strings.ConfigurationError, MessageBoxButton.OK); return; } if (gpWidget != null) MapApplication.Current.HideWindow(gpWidget); // Update proxy URL if proxy is used if (configuration.UseProxy && MapApplication.Current != null && MapApplication.Current.Urls != null) configuration.ProxyUrl = MapApplication.Current.Urls.ProxyUrl; gpWidget = new GPWidget(); gpWidget.Configuration = configuration; gpWidget.Map = Map; gpWidget.ExecuteCompleted += new EventHandler<GPWidget.ExecuteCompleteEventArgs>(gpWidget_ExecuteCompleted); SingleWindow.Current.ShowWindow(MapApplication.Current, configuration.Title, gpWidget); }
private static void OnIsProcessingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GPWidget obj = (GPWidget)d; }
private static void OnMapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GPWidget obj = (GPWidget)d; obj.RaiseCanExecuteChanged(); }
private static void OnServiceInfoPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GPWidget obj = (GPWidget)d; (obj.Execute as DelegateCommand).RaiseCanExecuteChanged(); }
private static void OnConfigurationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { GPWidget obj = (GPWidget)d; obj.BuildUI(); }