Clean up comments and add some MgdbForm logs

This commit is contained in:
Manu
2024-10-10 03:04:57 +02:00
parent 65e690eda1
commit b683b27d06

View File

@@ -51,23 +51,22 @@ public partial class MgdbForm : Form
{
await stream.WriteAsync(buffer, 0, bytesRead);
totalRead += bytesRead;
// Calculate and display progress
if (totalBytes > 0)
{
double progressPercentage = (double)totalRead / totalBytes * 100;
// Update UI or log progress here
lblMessage.Text = $"Download progress: {progressPercentage:F2}%";
}
}
}
}
lblMessage.Text = $"Extracting files...";
ZipFile.ExtractToDirectory(zipPath, path);
File.Delete(zipPath);
var tmpMgbdPath = Path.Combine(path, "EventsGallery-master");
lblMessage.Text = $"Cleaning up residual files...";
File.Delete(Path.Combine(tmpMgbdPath, ".gitignore"));
Directory.Delete(Path.Combine(tmpMgbdPath, "Extras"), true);
Directory.Delete(Path.Combine(tmpMgbdPath, "Unreleased"), true);