Esempio n. 1
0
 void client_ScanProgressUpdated(object sender, ScanProgressEventArgs e)
 {
     if (ScanProgressUpdated != null)
     {
         ScanProgressUpdated(this, e);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// The scan progress callback.
        /// </summary>
        /// <param name="eventArgs">
        /// The event args.
        /// </param>
        public override void ScanProgressCallback(ScanProgressEventArgs eventArgs)
        {
            if (this.ScanStatusChanged != null)
            {
                ThreadPool.QueueUserWorkItem(delegate { this.ScanStatusChanged(this, eventArgs); });
            }

            base.ScanProgressCallback(eventArgs);
        }
Esempio n. 3
0
        /// <summary>
        /// Fire an event when the scan process progresses
        /// </summary>
        /// <param name="sender">the sender</param>
        /// <param name="currentTitle">the current title being scanned</param>
        /// <param name="titleCount">the total number of titles</param>
        private void OnScanProgress(object sender, int currentTitle, int titleCount)
        {
            ScanProgressEventArgs eventArgs = new ScanProgressEventArgs
            {
                CurrentTitle = currentTitle,
                Titles       = titleCount
            };

            if (this.ScanStatusChanged != null)
            {
                this.ScanStatusChanged(this, eventArgs);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Scan Status has changed, update log window.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 private void ScanServiceScanStatusChanged(object sender, ScanProgressEventArgs e)
 {
     this.NotifyOfPropertyChange(() => this.ScanLog);
 }
 /// <summary>
 /// The scan progress.
 /// </summary>
 /// <param name="eventArgs">
 /// The event args.
 /// </param>
 public virtual void ScanProgressCallback(ScanProgressEventArgs eventArgs)
 {
 }
 /// <summary>
 /// Handle the Scan Status Changed Event.
 /// </summary>
 /// <param name="sender">
 /// The Sender
 /// </param>
 /// <param name="e">
 /// The EventArgs
 /// </param>
 private void ScanStatusChanged(object sender, ScanProgressEventArgs e)
 {
     this.SourceLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
     this.StatusLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
 }