private void MapView_Loaded(object sender, RoutedEventArgs e)
{
// make transparent the notification bar then hide it
SystemTray.Opacity = 0.0;
SystemTray.IsVisible = false;
if (!_loaded)
{
_loaded = true;
// set the zoom level
Mymap.ZoomLevel = 2;
}
_wmstileprovider = new WMSTiles();
_wmstileprovider.setBuidAndFloor("", "");
if (_tilesCheck)
Mymap.TileSources.Add(_wmstileprovider);
var settings1 = IsolatedStorageFile.GetUserStoreForApplication();
if (!settings1.FileExists("WorldBuilding"))
{
//var result = MessageBox.Show("You have to download the required maps to use all the features. Download now?", "Download Required Maps", MessageBoxButton.OKCancel);
//if (result == MessageBoxResult.OK)
//{
var isNetwork = NetworkInterface.GetIsNetworkAvailable();
if (isNetwork)
{
if (isDownloading)
return;
isDownloading = true;
loading.Visibility = Visibility.Visible;
loading.IsIndeterminate = true;
DownloadRequireStaff();
}
//else
// MessageBox.Show("No Internet Connection. Please check your internet connection and try again!");
//}
}
}