private void deleteButton_Click(object sender, EventArgs e) { if (File.Exists($"recordings/{thumbnail.Id}.json")) { File.Delete($"recordings/{thumbnail.Id}.json"); } ThumbnailManager.RemoveThumbnail(thumbnail); Parent.Controls.Remove(this); }