Reference.cs 20.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.1433
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

// 
// 此源代码是由 Microsoft.VSDesigner 2.0.50727.1433 版自动生成。
// 
#pragma warning disable 1591

namespace App.UpdateSvc {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    using System.Data;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="UpdateSvcSoap", Namespace="http://www.Shixintech.com/MyCMMI/")]
    public partial class UpdateSvc : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback GetClientVersionOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetClientFileListOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetClientFileOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetUpdateSwitchOperationCompleted;
        
        private System.Threading.SendOrPostCallback TestServiceUrlOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetServiceVersionOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public UpdateSvc() {
            this.Url = global::App.Properties.Settings.Default.App_UpdateSvc_UpdateSvc;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        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 GetClientVersionCompletedEventHandler GetClientVersionCompleted;
        
        /// <remarks/>
        public event GetClientFileListCompletedEventHandler GetClientFileListCompleted;
        
        /// <remarks/>
        public event GetClientFileCompletedEventHandler GetClientFileCompleted;
        
        /// <remarks/>
        public event GetUpdateSwitchCompletedEventHandler GetUpdateSwitchCompleted;
        
        /// <remarks/>
        public event TestServiceUrlCompletedEventHandler TestServiceUrlCompleted;
        
        /// <remarks/>
        public event GetServiceVersionCompletedEventHandler GetServiceVersionCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/GetClientVersion", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetClientVersion() {
            object[] results = this.Invoke("GetClientVersion", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void GetClientVersionAsync() {
            this.GetClientVersionAsync(null);
        }
        
        /// <remarks/>
        public void GetClientVersionAsync(object userState) {
            if ((this.GetClientVersionOperationCompleted == null)) {
                this.GetClientVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetClientVersionOperationCompleted);
            }
            this.InvokeAsync("GetClientVersion", new object[0], this.GetClientVersionOperationCompleted, userState);
        }
        
        private void OnGetClientVersionOperationCompleted(object arg) {
            if ((this.GetClientVersionCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetClientVersionCompleted(this, new GetClientVersionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/GetClientFileList", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataSet GetClientFileList() {
            object[] results = this.Invoke("GetClientFileList", new object[0]);
            return ((System.Data.DataSet)(results[0]));
        }
        
        /// <remarks/>
        public void GetClientFileListAsync() {
            this.GetClientFileListAsync(null);
        }
        
        /// <remarks/>
        public void GetClientFileListAsync(object userState) {
            if ((this.GetClientFileListOperationCompleted == null)) {
                this.GetClientFileListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetClientFileListOperationCompleted);
            }
            this.InvokeAsync("GetClientFileList", new object[0], this.GetClientFileListOperationCompleted, userState);
        }
        
        private void OnGetClientFileListOperationCompleted(object arg) {
            if ((this.GetClientFileListCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetClientFileListCompleted(this, new GetClientFileListCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/GetClientFile", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        [return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
        public byte[] GetClientFile(string FileName) {
            object[] results = this.Invoke("GetClientFile", new object[] {
                        FileName});
            return ((byte[])(results[0]));
        }
        
        /// <remarks/>
        public void GetClientFileAsync(string FileName) {
            this.GetClientFileAsync(FileName, null);
        }
        
        /// <remarks/>
        public void GetClientFileAsync(string FileName, object userState) {
            if ((this.GetClientFileOperationCompleted == null)) {
                this.GetClientFileOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetClientFileOperationCompleted);
            }
            this.InvokeAsync("GetClientFile", new object[] {
                        FileName}, this.GetClientFileOperationCompleted, userState);
        }
        
        private void OnGetClientFileOperationCompleted(object arg) {
            if ((this.GetClientFileCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetClientFileCompleted(this, new GetClientFileCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/GetUpdateSwitch", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetUpdateSwitch() {
            object[] results = this.Invoke("GetUpdateSwitch", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void GetUpdateSwitchAsync() {
            this.GetUpdateSwitchAsync(null);
        }
        
        /// <remarks/>
        public void GetUpdateSwitchAsync(object userState) {
            if ((this.GetUpdateSwitchOperationCompleted == null)) {
                this.GetUpdateSwitchOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUpdateSwitchOperationCompleted);
            }
            this.InvokeAsync("GetUpdateSwitch", new object[0], this.GetUpdateSwitchOperationCompleted, userState);
        }
        
        private void OnGetUpdateSwitchOperationCompleted(object arg) {
            if ((this.GetUpdateSwitchCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetUpdateSwitchCompleted(this, new GetUpdateSwitchCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/TestServiceUrl", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public bool TestServiceUrl() {
            object[] results = this.Invoke("TestServiceUrl", new object[0]);
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        public void TestServiceUrlAsync() {
            this.TestServiceUrlAsync(null);
        }
        
        /// <remarks/>
        public void TestServiceUrlAsync(object userState) {
            if ((this.TestServiceUrlOperationCompleted == null)) {
                this.TestServiceUrlOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTestServiceUrlOperationCompleted);
            }
            this.InvokeAsync("TestServiceUrl", new object[0], this.TestServiceUrlOperationCompleted, userState);
        }
        
        private void OnTestServiceUrlOperationCompleted(object arg) {
            if ((this.TestServiceUrlCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.TestServiceUrlCompleted(this, new TestServiceUrlCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.Shixintech.com/MyCMMI/GetServiceVersion", RequestNamespace="http://www.Shixintech.com/MyCMMI/", ResponseNamespace="http://www.Shixintech.com/MyCMMI/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetServiceVersion() {
            object[] results = this.Invoke("GetServiceVersion", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public void GetServiceVersionAsync() {
            this.GetServiceVersionAsync(null);
        }
        
        /// <remarks/>
        public void GetServiceVersionAsync(object userState) {
            if ((this.GetServiceVersionOperationCompleted == null)) {
                this.GetServiceVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServiceVersionOperationCompleted);
            }
            this.InvokeAsync("GetServiceVersion", new object[0], this.GetServiceVersionOperationCompleted, userState);
        }
        
        private void OnGetServiceVersionOperationCompleted(object arg) {
            if ((this.GetServiceVersionCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetServiceVersionCompleted(this, new GetServiceVersionCompletedEventArgs(invokeArgs.Results, 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.Web.Services", "2.0.50727.1433")]
    public delegate void GetClientVersionCompletedEventHandler(object sender, GetClientVersionCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetClientVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetClientVersionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void GetClientFileListCompletedEventHandler(object sender, GetClientFileListCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetClientFileListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetClientFileListCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public System.Data.DataSet Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataSet)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void GetClientFileCompletedEventHandler(object sender, GetClientFileCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetClientFileCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetClientFileCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public byte[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((byte[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void GetUpdateSwitchCompletedEventHandler(object sender, GetUpdateSwitchCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetUpdateSwitchCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetUpdateSwitchCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    public delegate void TestServiceUrlCompletedEventHandler(object sender, TestServiceUrlCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class TestServiceUrlCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal TestServiceUrlCompletedEventArgs(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.1433")]
    public delegate void GetServiceVersionCompletedEventHandler(object sender, GetServiceVersionCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetServiceVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetServiceVersionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
}

#pragma warning restore 1591