Exemple #1
0
        /// <summary>
        /// Provides the behaviour when the user clicks the map tool.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // Provide map tool behaviour, for example, add mouse handling to the Map,
            // or install a custom toolbar using MapWidget.SetToolbar
            // MapWidget.SetToolbar(new MyMapToolbar(MapWidget));

            // Set the Checked property of the ToggleButton to false after work is complete.
            if ((MapWidget != null) && (MapWidget.Map != null))
            {
                _bombToolbar = new BombThreatToolbar(MapWidget);
                MapWidget.SetToolbar(_bombToolbar);
            }
        }
        /// <summary>
        /// Provides the behaviour when the user clicks the map tool.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // Provide map tool behaviour, for example, add mouse handling to the Map,
            // or install a custom toolbar using MapWidget.SetToolbar
            // MapWidget.SetToolbar(new MyMapToolbar(MapWidget));

            // Set the Checked property of the ToggleButton to false after work is complete.
            if ((MapWidget != null) && (MapWidget.Map != null))
            {
                _bombToolbar = new BombThreatToolbar(MapWidget, ServiceURL);
                MapWidget.SetToolbar(_bombToolbar);
            }
        }