void OnDeleteClicked(string buildPath, string gameTitle) { if (!Directory.Exists(buildPath)) { Store.Dispatch(new OnErrorAction() { errorMsg = "Build folder not found" }); return; } switch (ShowDeleteBuildPopup(gameTitle)) { case 0: // Yes AnalyticsHelper.ButtonClicked(string.Format("{0}_Delete_RemoveFromList", currentTab)); ShareUtils.RemoveBuildDirectory(buildPath); SetupUploadTab(); break; case 1: break; // Cancel case 2: // Yes and delete AnalyticsHelper.ButtonClicked(string.Format("{0}_Delete_RemoveBuildFiles", currentTab)); ShareUtils.RemoveBuildDirectory(buildPath); Directory.Delete(buildPath, true); SetupUploadTab(); break; } }
void OnDeleteClicked(string buildPath, string gameTitle) { if (!Directory.Exists(buildPath)) { Store.Dispatch(new OnErrorAction() { errorMsg = "Build folder not found" }); return; } if (ShowDeleteBuildPopup(gameTitle)) { AnalyticsHelper.ButtonClicked(string.Format("{0}_Delete_RemoveFromList", currentTab)); ShareUtils.RemoveBuildDirectory(buildPath); SetupUploadTab(); } }