private async void HeightTopToTopShadowItem_Click(object sender, RoutedEventArgs e) { try { var line = await RequestUserShape(DrawShape.LineSegment, _lineSymbol) as Polyline; // Requesting shape canceled if (line == null) { return; } var parameters = new MensurationHeightParameters() { LinearUnit = comboLinearUnit.SelectedItem as LinearUnit }; var result = await _mensurationTask.HeightFromTopAndTopShadowAsync( line.Parts.First().StartPoint, line.Parts.First().EndPoint, parameters); ShowResults(result, ((MenuFlyoutItem)sender).Text); } catch (Exception ex) { var _ = new MessageDialog(ex.Message, "Sample Error").ShowAsync(); } }
private async void HeightBaseToTopShadowButton_Click(object sender, RoutedEventArgs e) { try { var line = await RequestUserShape(DrawShape.LineSegment, _lineSymbol) as Polyline; // Requesting shape cancelled if (line == null) { return; } var parameters = new MensurationHeightParameters() { LinearUnit = comboLinearUnit.SelectedItem as LinearUnit }; var result = await _mensurationTask.HeightFromBaseAndTopShadowAsync( line.Parts.First().StartPoint, line.Parts.First().EndPoint, parameters); ShowResults(result, ((Button)sender).Tag.ToString()); } catch (Exception ex) { MessageBox.Show(ex.Message, "Mensuration Error"); } }
private async void HeightTopToTopShadowButton_Click(object sender, RoutedEventArgs e) { var line = await RequestUserShape(DrawShape.LineSegment, _lineSymbol) as Polyline; try { MapPoint pointOne = new MapPoint(line.Paths[0][0], mapView.SpatialReference); MapPoint pointTwo = new MapPoint(line.Paths[0][1], mapView.SpatialReference); var parameters = new MensurationHeightParameters() { LinearUnit = comboLinearUnit.SelectedItem as LinearUnit }; var result = await _mensurationTask.HeightFromTopAndTopShadowAsync(pointOne, pointTwo, parameters); ShowResults(result, ((Button)sender).Tag.ToString()); } catch (Exception ex) { MessageBox.Show(ex.Message, "Mensuration Error"); } }
private async void HeightTopToTopShadowItem_Click(object sender, RoutedEventArgs e) { try { var line = await RequestUserShape(DrawShape.LineSegment, _lineSymbol) as Polyline; // Requesting shape canceled if (line == null) return; var parameters = new MensurationHeightParameters() { LinearUnit = comboLinearUnit.SelectedItem as LinearUnit }; var result = await _mensurationTask.HeightFromTopAndTopShadowAsync( line.Parts.First().StartPoint, line.Parts.First().EndPoint, parameters); ShowResults(result, ((MenuFlyoutItem)sender).Text); } catch (Exception ex) { var _ = new MessageDialog(ex.Message, "Sample Error").ShowAsync(); } }
private async void HeightBaseToTopShadowButton_Click(object sender, RoutedEventArgs e) { try { var line = await RequestUserShape(DrawShape.LineSegment, _lineSymbol) as Polyline; // Requesting shape cancelled if (line == null) return; var parameters = new MensurationHeightParameters() { LinearUnit = comboLinearUnit.SelectedItem as LinearUnit }; var result = await _mensurationTask.HeightFromBaseAndTopShadowAsync( line.Parts.First().StartPoint, line.Parts.First().EndPoint, parameters); ShowResults(result, ((Button)sender).Tag.ToString()); } catch (Exception ex) { MessageBox.Show(ex.Message, "Mensuration Error"); } }