SilverlightMappingToolBasic.ThemeManager.LoadTheme C# (CSharp) Method

LoadTheme() public method

public LoadTheme ( string themeSvcUrl, string themeName ) : void
themeSvcUrl string
themeName string
return void
        public void LoadTheme(string themeSvcUrl, string themeName)
        {
            _currentThemeName = themeName;
            ThemeServiceClient client = null;
            if (string.IsNullOrEmpty(themeSvcUrl))
            {
                client = new ThemeServiceClient();
            }
            else
            {
                BasicHttpBinding binding = new BasicHttpBinding();
                binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;

                EndpointAddress address = new EndpointAddress(new Uri(themeSvcUrl));
                client = new ThemeServiceClient(binding, address);
            }
            client.GetThemeCompleted += new EventHandler<GetThemeCompletedEventArgs>(client_GetThemeCompleted);
            client.GetThemeAsync(themeName);
        }