private async void btnAnalyzeMap_Click(object sender, EventArgs e) { if (txtMapID.Text.Length == 0) { CustomMessageBox.Show(this, "You forgot the key!", new Size(customMessageBoxWidthSize, 100)); return; } LoadingScreenHelper.SwitchToLoadingScreen(this, "Downloading map..."); if (!testJsonMode) { if (Directory.Exists("analyzedMap")) { Directory.Delete("analyzedMap", true); } Directory.CreateDirectory("analyzedMap"); try { await MapInstaller.InstallMap(mapData, "analyzedMap"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); return; } } MapAnalyzer.AnalyzeMap(this, cmbCharacteristics, cmbDifficulty, testJsonMode); LoadingScreenHelper.HideLoadingScreen(this); }
private async void btnInstallMap_Click(object sender, EventArgs e) { if (!CanDownloadMap(txtMapID.Text, txtBeatsaverFolder.Text)) { CustomMessageBox.Show(this, "You have already downloaded this map!", new Size(customMessageBoxWidthSize, 100)); return; } else { LoadingScreenHelper.SwitchToLoadingScreen(this, "Installing map..."); } await MapInstaller.InstallMap(mapData, txtBeatsaverFolder.Text); LoadingScreenHelper.HideLoadingScreen(this); }