コード例 #1
0
ファイル: Queries.cs プロジェクト: abordt/Viking
        public static SortedDictionary<long, StructureType> GetStructureTypes(AnnotateStructureTypesClient proxy)
        {
            SortedDictionary<long, StructureType> dictTypes = new SortedDictionary<long, StructureType>();

            StructureType[] StructureTypes = proxy.GetStructureTypes();

            foreach (StructureType type in StructureTypes)
            {
                dictTypes.Add(type.ID, type);
            }

            return dictTypes;
        }
コード例 #2
0
ファイル: State.cs プロジェクト: abordt/Viking
        public static AnnotateStructureTypesClient CreateStructureTypeClient()
        {
            AnnotateStructureTypesClient proxy = new AnnotateStructureTypesClient();
            proxy.Endpoint.Address = new System.ServiceModel.EndpointAddress(State.serviceDictionary[State.selectedService]);
            proxy.ClientCredentials.UserName.UserName = userCredentials.UserName;
            proxy.ClientCredentials.UserName.Password = userCredentials.Password;
            //    if(proxy.State != System.ServiceModel.CommunicationState.Opened)
            //        proxy.Open();

            return proxy;
        }