コード例 #1
0
 private void buttonShowStationOnMap_Click(object sender, RoutedEventArgs e)
 {
     if (!InternetHelper.hasInternetConnection())
     {
         MessageBox.Show("Es ist keine Internetverbindung vorhanden");
         return;
     }
     if (isValidStation)
     {
         Coordinate c = currentlySelectedStation.Coordinate;
         InternetHelper.openLocation(
             c.XCoordinate.ToString(InternetHelper.numberFormatInfo),
             c.YCoordinate.ToString(InternetHelper.numberFormatInfo));
     }
     else
     {
         textBoxInput.Focus();
     }
 }
コード例 #2
0
        private void openStationButton_Click(object sender, RoutedEventArgs e)
        {
            Station s = displayedStations.ElementAt(stackPanelButtons.Children.IndexOf((Button)sender));

            InternetHelper.openLocation(s.Coordinate.XCoordinate.ToString(InternetHelper.numberFormatInfo), s.Coordinate.YCoordinate.ToString(InternetHelper.numberFormatInfo));
        }