public void OnDeactivated() { // Clean up any objects if still set. if (_cancelToolbar != null) { _cancelToolbar = null; } }
public void OnDeactivated() { // Clean up any objects if still set. if (_cancelToolbar != null) { _cancelToolbar = null; } }
private void Button_Click(object sender, RoutedEventArgs e) { // When the user clicks the map tool button, begin installing zoom code. // Ensure the tool has a valid map to work with. if ((MapWidget != null) && (MapWidget.Map != null)) { // Provide a way for the user to cancel the operation, by installing a temporary toolbar. // This also prevents other tools from being used in the meantime. _cancelToolbar = new CancelationToolbar(MapWidget); MapWidget.SetToolbar(_cancelToolbar); } }
private void Button_Click(object sender, RoutedEventArgs e) { // When the user clicks the map tool button, begin installing zoom code. // Ensure the tool has a valid map to work with. if ((MapWidget != null) && (MapWidget.Map != null)) { // Provide a way for the user to cancel the operation, by installing a temporary toolbar. // This also prevents other tools from being used in the meantime. _cancelToolbar = new CancelationToolbar(MapWidget); MapWidget.SetToolbar(_cancelToolbar); } }