private void generateProxyButton_Click(object sender, EventArgs e) { CheckLoadArtOverlay(); string tempImagePath = Path.Combine(GetExecutingDir(), "temp.png"); if (File.Exists(tempImagePath)) { File.Delete(tempImagePath); } ProxyDefinition def = GetProxyDef(proxydefPathTextBox.Text, rootDirTextBox.Text); DateTime startTime = DateTime.Now; if (LoadArtOverlay) { string artOverlayPath = artOverlayTextbox.Text; def.SaveProxyImage(GetValues(), tempImagePath, artOverlayPath); } else { def.SaveProxyImage(GetValues(), tempImagePath); } DateTime endTime = DateTime.Now; proxyPictureBox.ImageLocation = tempImagePath; proxyPictureBox.Refresh(); TimeGeneratedTextBox.Text = string.Format("Generated in {0}ms", (endTime - startTime).Milliseconds); }