Beispiel #1
0
        private void NotifyProgress(object sender, ProgressRecordEventArgs e)
        {
            var ev = Progress;

            if (null == ev)
            {
                return;
            }

            ev(sender, e);
        }
Beispiel #2
0
	    private void OnShellProgressReport(object sender, ProgressRecordEventArgs e)
	    {
            if( (-1) != e.ProgressRecord.ParentActivityId)
            {
                return;
            }

            var isComplete = e.ProgressRecord.RecordType == ProgressRecordType.Completed;
	        var labelFormat = "{0}: {1}";
            if( ! String.IsNullOrEmpty( e.ProgressRecord.CurrentOperation ) )
            {
                labelFormat += " ({2})";
            }
            
            var label = String.Format(labelFormat, e.ProgressRecord.Activity, e.ProgressRecord.StatusDescription, e.ProgressRecord.CurrentOperation );

            var percent = isComplete
	                          ? 100
	                          : Math.Max( 0, e.ProgressRecord.PercentComplete);

            _applicationObject.StatusBar.Progress( ! isComplete, label, percent, 100 );            
	    }
        private void NotifyProgress(object sender, ProgressRecordEventArgs e)
        {
            var ev = Progress;
            if (null == ev)
            {
                return;
            }

            ev(sender, e);
        }