//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.4200
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.4200.
// 
#pragma warning disable 1591

namespace Baza_Reklam.pl.admoto.service {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ImportOtoMotoSoap", Namespace="http://service.admoto.pl/")]
    public partial class ImportOtoMoto : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback GetAllAdsOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetShortAdsOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetAds2NodeOperationCompleted;
        
        private AuthenticationTicket authenticationTicketValueField;
        
        private System.Threading.SendOrPostCallback PutImageOperationCompleted;
        
        private System.Threading.SendOrPostCallback AuthenticateOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public ImportOtoMoto() {
            this.Url = global::Baza_Reklam.Properties.Settings.Default.Baza_Reklam_pl_admoto_service_ImportOtoMoto;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        public AuthenticationTicket AuthenticationTicketValue {
            get {
                return this.authenticationTicketValueField;
            }
            set {
                this.authenticationTicketValueField = value;
            }
        }
        
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            && (this.useDefaultCredentialsSetExplicitly == false)) 
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        /// <remarks/>
        public event GetAllAdsCompletedEventHandler GetAllAdsCompleted;
        
        /// <remarks/>
        public event GetShortAdsCompletedEventHandler GetShortAdsCompleted;
        
        /// <remarks/>
        public event GetAds2NodeCompletedEventHandler GetAds2NodeCompleted;
        
        /// <remarks/>
        public event PutImageCompletedEventHandler PutImageCompleted;
        
        /// <remarks/>
        public event AuthenticateCompletedEventHandler AuthenticateCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.admoto.pl/GetAllAds", RequestNamespace="http://service.admoto.pl/", ResponseNamespace="http://service.admoto.pl/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Xml.XmlNode GetAllAds(string otomotoDealer) {
            object[] results = this.Invoke("GetAllAds", new object[] {
                        otomotoDealer});
            return ((System.Xml.XmlNode)(results[0]));
        }
        
        /// <remarks/>
        public void GetAllAdsAsync(string otomotoDealer) {
            this.GetAllAdsAsync(otomotoDealer, null);
        }
        
        /// <remarks/>
        public void GetAllAdsAsync(string otomotoDealer, object userState) {
            if ((this.GetAllAdsOperationCompleted == null)) {
                this.GetAllAdsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAllAdsOperationCompleted);
            }
            this.InvokeAsync("GetAllAds", new object[] {
                        otomotoDealer}, this.GetAllAdsOperationCompleted, userState);
        }
        
        private void OnGetAllAdsOperationCompleted(object arg) {
            if ((this.GetAllAdsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetAllAdsCompleted(this, new GetAllAdsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.admoto.pl/GetShortAds", RequestNamespace="http://service.admoto.pl/", ResponseNamespace="http://service.admoto.pl/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Xml.XmlNode GetShortAds(string otomotoDealer) {
            object[] results = this.Invoke("GetShortAds", new object[] {
                        otomotoDealer});
            return ((System.Xml.XmlNode)(results[0]));
        }
        
        /// <remarks/>
        public void GetShortAdsAsync(string otomotoDealer) {
            this.GetShortAdsAsync(otomotoDealer, null);
        }
        
        /// <remarks/>
        public void GetShortAdsAsync(string otomotoDealer, object userState) {
            if ((this.GetShortAdsOperationCompleted == null)) {
                this.GetShortAdsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetShortAdsOperationCompleted);
            }
            this.InvokeAsync("GetShortAds", new object[] {
                        otomotoDealer}, this.GetShortAdsOperationCompleted, userState);
        }
        
        private void OnGetShortAdsOperationCompleted(object arg) {
            if ((this.GetShortAdsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetShortAdsCompleted(this, new GetShortAdsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.admoto.pl/GetAds2Node", RequestNamespace="http://service.admoto.pl/", ResponseNamespace="http://service.admoto.pl/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Xml.XmlNode GetAds2Node(string oglId) {
            object[] results = this.Invoke("GetAds2Node", new object[] {
                        oglId});
            return ((System.Xml.XmlNode)(results[0]));
        }
        
        /// <remarks/>
        public void GetAds2NodeAsync(string oglId) {
            this.GetAds2NodeAsync(oglId, null);
        }
        
        /// <remarks/>
        public void GetAds2NodeAsync(string oglId, object userState) {
            if ((this.GetAds2NodeOperationCompleted == null)) {
                this.GetAds2NodeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAds2NodeOperationCompleted);
            }
            this.InvokeAsync("GetAds2Node", new object[] {
                        oglId}, this.GetAds2NodeOperationCompleted, userState);
        }
        
        private void OnGetAds2NodeOperationCompleted(object arg) {
            if ((this.GetAds2NodeCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetAds2NodeCompleted(this, new GetAds2NodeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapHeaderAttribute("AuthenticationTicketValue")]
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.admoto.pl/PutImage", RequestNamespace="http://service.admoto.pl/", ResponseNamespace="http://service.admoto.pl/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public bool PutImage([System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] imgIn, int nrWydania, string idReklamy, int n) {
            object[] results = this.Invoke("PutImage", new object[] {
                        imgIn,
                        nrWydania,
                        idReklamy,
                        n});
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        public void PutImageAsync(byte[] imgIn, int nrWydania, string idReklamy, int n) {
            this.PutImageAsync(imgIn, nrWydania, idReklamy, n, null);
        }
        
        /// <remarks/>
        public void PutImageAsync(byte[] imgIn, int nrWydania, string idReklamy, int n, object userState) {
            if ((this.PutImageOperationCompleted == null)) {
                this.PutImageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPutImageOperationCompleted);
            }
            this.InvokeAsync("PutImage", new object[] {
                        imgIn,
                        nrWydania,
                        idReklamy,
                        n}, this.PutImageOperationCompleted, userState);
        }
        
        private void OnPutImageOperationCompleted(object arg) {
            if ((this.PutImageCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.PutImageCompleted(this, new PutImageCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapHeaderAttribute("AuthenticationTicketValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.admoto.pl/Authenticate", RequestNamespace="http://service.admoto.pl/", ResponseNamespace="http://service.admoto.pl/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void Authenticate(string uid, string password) {
            this.Invoke("Authenticate", new object[] {
                        uid,
                        password});
        }
        
        /// <remarks/>
        public void AuthenticateAsync(string uid, string password) {
            this.AuthenticateAsync(uid, password, null);
        }
        
        /// <remarks/>
        public void AuthenticateAsync(string uid, string password, object userState) {
            if ((this.AuthenticateOperationCompleted == null)) {
                this.AuthenticateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAuthenticateOperationCompleted);
            }
            this.InvokeAsync("Authenticate", new object[] {
                        uid,
                        password}, this.AuthenticateOperationCompleted, userState);
        }
        
        private void OnAuthenticateOperationCompleted(object arg) {
            if ((this.AuthenticateCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.AuthenticateCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null) 
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024) 
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.4016")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://service.admoto.pl/")]
    [System.Xml.Serialization.XmlRootAttribute(Namespace="http://service.admoto.pl/", IsNullable=false)]
    public partial class AuthenticationTicket : System.Web.Services.Protocols.SoapHeader {
        
        private System.DateTime createField;
        
        private System.Xml.XmlAttribute[] anyAttrField;
        
        /// <remarks/>
        public System.DateTime Create {
            get {
                return this.createField;
            }
            set {
                this.createField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.XmlAnyAttributeAttribute()]
        public System.Xml.XmlAttribute[] AnyAttr {
            get {
                return this.anyAttrField;
            }
            set {
                this.anyAttrField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    public delegate void GetAllAdsCompletedEventHandler(object sender, GetAllAdsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetAllAdsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetAllAdsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Xml.XmlNode Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Xml.XmlNode)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    public delegate void GetShortAdsCompletedEventHandler(object sender, GetShortAdsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetShortAdsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetShortAdsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Xml.XmlNode Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Xml.XmlNode)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    public delegate void GetAds2NodeCompletedEventHandler(object sender, GetAds2NodeCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetAds2NodeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetAds2NodeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Xml.XmlNode Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Xml.XmlNode)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    public delegate void PutImageCompletedEventHandler(object sender, PutImageCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class PutImageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal PutImageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public bool Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((bool)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4016")]
    public delegate void AuthenticateCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}

#pragma warning restore 1591