private void takeScreenShot_button_Click(object sender, EventArgs e) { if (!DoesPathExist(saveFolder)) { MessageBox.Show("Images Folder doesn't exist, either you've deleted it or you still haven't specified one", "Folder Doesn't Exist", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } screenCapture = new ScreenCapture(imageFormat, imageQuality, saveFolder); this.Hide(); Thread.Sleep(200); screenCapture.TakeScreenShot(); this.Show(); }
private void startLogging_button_Click(object sender, EventArgs e) { if (!DoesPathExist(saveFolder)) { MessageBox.Show("Images Folder doesn't exist, either you've deleted it or you still haven't specified one", "Folder Doesn't Exist", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } TurnOffFile = Directory.GetParent(saveFolder).ToString() + "\\SilentMode.OFF"; screenCapture = new ScreenCapture(imageFormat, imageQuality, saveFolder); ShowWindow(false); SetTimerIntervalFromTextDependingOnTimeFormat(GetTimeFormatFromComboBox()); timer1.Start(); }