コード例 #1
0
ファイル: ThemeManager.cs プロジェクト: chris-tomich/Glyma
        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);
        }
コード例 #2
0
ファイル: ThemeManager.cs プロジェクト: chris-tomich/Glyma
        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);
        }