Exemple #1
0
 /// <summary>
 /// Creates a new instance of SNTPClient.
 /// </summary>
 public SNTPClient()
 {
     Initialize();
     threadStart = new WorkerThreadStartDelegate(WorkerThreadStart);
     operationCompleted = new SendOrPostCallback(AsyncOperationCompleted);
     Timeout = DefaultTimeout;
     VersionNumber = DefaultVersionNumber;
     UpdateLocalDateTime = true;
 }
 /// <summary>
 /// Creates a new instance of SNTPClient.
 /// </summary>
 public SNTPClient()
 {
     Initialize();
     threadStart         = new WorkerThreadStartDelegate(WorkerThreadStart);
     operationCompleted  = new SendOrPostCallback(AsyncOperationCompleted);
     Timeout             = DefaultTimeout;
     VersionNumber       = DefaultVersionNumber;
     UpdateLocalDateTime = true;
 }
Exemple #3
0
        /// <summary>
        /// Creates a new instance of SNTPClient.
        /// </summary>
        public SNTPClient()
        {
            this.InitializeComponent();

            this.Initialize();
            this.ThreadStart         = new WorkerThreadStartDelegate(WorkerThreadStart);
            this.OperationCompleted  = new SendOrPostCallback(AsyncOperationCompleted);
            this.Timeout             = SNTPSettings.GetConfigOrDefault().Timeout;
            this.VersionNumber       = DefaultVersionNumber;
            this.UpdateLocalDateTime = false;
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        public DownloadManagement()
        {
            //初始化管理下载的数据结构
            waitDownloadTable = new Dictionary<Guid, DownloadMusicTask>();
            downloadTable = new Dictionary<Guid, DownloadMusicTask>();
            asyncOperationtTable = new Dictionary<Guid, AsyncOperation>();

            //绑定委托事件
            this.threadStart = new WorkerThreadStartDelegate(this.WorkerThreadStart);
            this.progressReporter = new SendOrPostCallback(this.ProgressReporter);
            this.operationCompleted = new SendOrPostCallback(this.AsyncOperationCompleted);

            //初始化锁
            waitTableLock = new object();
            downloadTableLock = new object();
            asyncOperationLock = new object();
        }
 public BackgroundWorker()
 {
     threadStart        = new WorkerThreadStartDelegate(WorkerThreadStart);
     operationCompleted = new SendOrPostCallback(AsyncOperationCompleted);
     progressReporter   = new SendOrPostCallback(ProgressReporter);
 }
Exemple #6
0
 public BackgroundWorker()
 {
     this.threadStart        = new WorkerThreadStartDelegate(this.WorkerThreadStart);
     this.operationCompleted = new SendOrPostCallback(this.AsyncOperationCompleted);
     this.progressReporter   = new SendOrPostCallback(this.ProgressReporter);
 }
 public BackgroundWorkerEx()
 {
     threadStart = new WorkerThreadStartDelegate(WorkerThreadStart);
     operationCompleted = new SendOrPostCallback(AsyncOperationCompleted);
     progressReporter = new SendOrPostCallback(ProgressReporter);
 }
 public BackgroundWorker()
 {
     this.threadStart = new WorkerThreadStartDelegate(this.WorkerThreadStart);
     this.operationCompleted = new SendOrPostCallback(this.AsyncOperationCompleted);
     this.progressReporter = new SendOrPostCallback(this.ProgressReporter);
 }