private void UploadWorld(string folderPath) { new Thread(() => { Uploading = true; byte[] b = Zipper.CompressFolder(folderPath); var result = Remote.UploadWorld(b, Path.GetFileName(folderPath)); Uploading = false; if (result.Error == null) { MessageBox.Show("Your world has been uploaded!", "Success"); } else { MessageBox.Show("Error while uploading world: " + result.Error, "Error"); } }).Start(); }