ArcGISWindowsPhoneSDK.ViewShed.MyDrawObject_DrawComplete C# (CSharp) Method

MyDrawObject_DrawComplete() private method

private MyDrawObject_DrawComplete ( object sender, ESRI e ) : void
sender object
e ESRI
return void
        private void MyDrawObject_DrawComplete(object sender, ESRI.ArcGIS.Client.DrawEventArgs e)
        {
            MyDrawObject.IsEnabled = false;

              try
              {
            if (Convert.ToDouble(MilesTextBox.Text) > 10)
            {
              MessageBox.Show("Distance must be 10 miles or less.");
              return;
            }
              }
              catch
              {
            MessageBox.Show("Distance must be a double.");
            return;
              }

              graphicsLayer.ClearGraphics();

              MapPoint mapPoint = e.Geometry as MapPoint;
              mapPoint.SpatialReference = new SpatialReference(102100);

              Graphic graphic = new Graphic()
              {
            Symbol = LayoutRoot.Resources["StartMarkerSymbol"] as Symbol,
            Geometry = mapPoint
              };
              graphicsLayer.Graphics.Add(graphic);

              List<GPParameter> parameters = new List<GPParameter>();
              parameters.Add(new GPFeatureRecordSetLayer("Input_Features", mapPoint));
              parameters.Add(new GPString("Height", HeightTextBox.Text));
              parameters.Add(new GPLinearUnit("Distance", esriUnits.esriMiles, Convert.ToDouble(MilesTextBox.Text)));

              _geoprocessorTask.OutputSpatialReference = new SpatialReference(102100);
              WaitGrid.Visibility = Visibility.Visible;

              _geoprocessorTask.SubmitJobAsync(parameters);
        }