Untitled
unknown
plain_text
15 days ago
674 B
3
Indexable
private void SubmitButton_Click(object sender, RoutedEventArgs e) { if (_temporaryImageCapture == null) { MessageBox.Show("No image captured. Please capture an image first."); return; } string projectDirectory = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.Parent.FullName; string folderPath = Path.Combine(projectDirectory, "SubmittedImages"); string filePath = Path.Combine(folderPath, $"CapturedImage_{DateTime.Now:yyyyMMdd_HHmmss}.png"); _temporaryImageCapture.Save(filePath, System.Drawing.Imaging.ImageFormat.Png); MessageBox.Show($"Image saved successfully at {filePath}"); }
Editor is loading...
Leave a Comment