private void setMag_Click(object sender, RoutedEventArgs e) { Grid plottingGrid = contentGrid.Children[1] as Grid; SlopePlotCanvas currCanvas = null; if (plottingGrid != null) { currCanvas = plottingGrid.Children[3] as SlopePlotCanvas; } if (currCanvas == null) { return; } SetMagnificationDialog dlg = new SetMagnificationDialog(this); dlg.ShowDialog(); if (dlg.DialogResult == true) { switch (currCanvas.PlotMode) { case PlotModes.DeformedMesh: currCanvas.PlotDeformedMesh(false); break; case PlotModes.DisplacementVectors: currCanvas.PlotDisplacementVectors(false); break; } } }
private void setMag_Click( object sender , RoutedEventArgs e ) { Grid plottingGrid = contentGrid.Children[1] as Grid; SlopePlotCanvas currCanvas = null; if ( plottingGrid != null ) { currCanvas = plottingGrid.Children[3] as SlopePlotCanvas; } if ( currCanvas == null ) return; SetMagnificationDialog dlg = new SetMagnificationDialog( this ); dlg.ShowDialog(); if ( dlg.DialogResult == true ) { switch ( currCanvas.PlotMode ) { case PlotModes.DeformedMesh: currCanvas.PlotDeformedMesh( false ); break; case PlotModes.DisplacementVectors: currCanvas.PlotDisplacementVectors( false ); break; } } }