ArcGISRuntime.UWP.Samples.AnalyzeViewshed.AnalyzeViewshed.SetBusy C# (CSharp) Method

SetBusy() private method

private SetBusy ( bool isBusy = true ) : void
isBusy bool
return void
        private void SetBusy(bool isBusy = true)
        {
            // This function toggles the visibility of the 'busyOverlay' Grid control defined in xaml,
            // sets the 'progress' control feedback status and updates the _isExecutingGeoprocessing
            // boolean to denote if the viewshed analysis is executing as a result of the user click 
            // on the map

            if (isBusy)
            {
                // Change UI to indicate that the geoprocessing is running
                _isExecutingGeoprocessing = true;
                busyOverlay.Visibility = Visibility.Visible;
                progress.IsIndeterminate = true;
            }
            else
            {
                // Change UI to indicate that the geoprocessing is not running
                _isExecutingGeoprocessing = false;
                busyOverlay.Visibility = Visibility.Collapsed;
                progress.IsIndeterminate = false;
            }
        }
    }