private void BingMap_Click(object sender, RoutedEventArgs e) { string pathToBingMaps = BingMapsCredentialsProvider.GetBingMapsCredentialsFullPath(); CreateKeyWindow createKeyWindow = new CreateKeyWindow(pathToBingMaps); createKeyWindow.ShowDialog(); }
public BingMapsCredentialsProvider() { string fullPath = GetBingMapsCredentialsFullPath(); if (!File.Exists(fullPath)) { CreateKeyWindow bingMapsKey = new CreateKeyWindow(fullPath); bool? result = bingMapsKey.ShowDialog(); if (bingMapsKey.Key != "") { this._key = bingMapsKey.Key; } } else { this._key = File.ReadAllText(fullPath); } }