Exemplo n.º 1
0
        void okClicked(object param)
        {
            string proxy = param as string;

            if (proxy != SecureServicesHelper.GetProxyUrl())
            {
                SecureServicesHelper.SetProxyUrl(proxy);
            }
        }
Exemplo n.º 2
0
 public SecureServicesConfigViewModel()
 {
     if (View.Instance != null)
     {
         View.Instance.ProxyUrlChanged += Instance_ProxyUrlChanged;
     }
     Proxy     = SecureServicesHelper.GetProxyUrl();
     OKCommand = new DelegateCommand(okClicked);
 }
        static void OnProxyUseChange(DependencyObject o, DependencyPropertyChangedEventArgs args)
        {
            SecureServicesLayerConfigViewModel vm = o as SecureServicesLayerConfigViewModel;

            ESRI.ArcGIS.Mapping.Core.LayerExtensions.SetUsesProxy(vm.layer, vm.UsesProxy);
            if (vm.UsesProxy)
            {
                if (vm.layer != null && ViewerApplicationControl.Instance != null && ViewerApplicationControl.Instance.ViewerApplication != null)
                {
                    SecureServicesHelper.SetProxyUrl(vm.layer, SecureServicesHelper.GetProxyUrl());
                }
            }
            else
            {
                SecureServicesHelper.SetProxyUrl(vm.layer, null);
            }
        }
Exemplo n.º 4
0
 void Instance_ProxyUrlChanged(object sender, System.EventArgs e)
 {
     Proxy = SecureServicesHelper.GetProxyUrl();
 }