Exemplo n.º 1
0
 public void Report0Perc()
 {
     if (!HasReported0Perc)
     {
         ProgressCallback?.Report(0d);
         HasReported0Perc = true;
     }
 }
Exemplo n.º 2
0
 public void EnsureReported100Perc()
 {
     if (!HasReported100Perc)
     {
         ProgressCallback?.Report(1d);
         HasReported100Perc = true;
     }
 }
Exemplo n.º 3
0
 public void EnsureReported100Perc(double area)
 {
     if (!HasReported100Perc)
     {
         ProgressCallback?.Report(new AreaCalculationProgress(1d, area));
         HasReported100Perc = true;
     }
 }
Exemplo n.º 4
0
 public void Report0Perc()
 {
     if (!HasReported0Perc)
     {
         ProgressCallback?.Report(new AreaCalculationProgress(0d, 0d));
         HasReported0Perc = true;
     }
 }
Exemplo n.º 5
0
            public void ReportProgress(double?progress = null)
            {
                var reportedProgress = progress ?? Progress;

                if (ShouldReportProgress && !(reportedProgress == 0d && HasReported0Perc) && !(reportedProgress == 1d && HasReported100Perc))
                {
                    ProgressCallback?.Report(reportedProgress);
                    if (reportedProgress == 1d)
                    {
                        HasReported100Perc = true;
                    }

                    if (reportedProgress == 0d)
                    {
                        HasReported0Perc = true;
                    }
                }
            }
Exemplo n.º 6
0
            public void ReportProgress(double area, double?progress = null)
            {
                var reportedProgress = progress ?? Progress;

                if (ShouldReportProgress && !(reportedProgress == 0d && HasReported0Perc) && !(reportedProgress == 1d && HasReported100Perc))
                {
                    ProgressCallback.Report(new AreaCalculationProgress(reportedProgress, area));
                    if (reportedProgress == 1d)
                    {
                        HasReported100Perc = true;
                    }

                    if (reportedProgress == 0d)
                    {
                        HasReported0Perc = true;
                    }
                }
            }
 private void ReportProgress(int value)
 {
     ProgressCallback?.Report(value);
 }