示例#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;
        }