void auto_focus_now() { try { if (device.LiveViewEnabled) { device.LiveViewEnabled = false; liveViewTimer.Stop(); pictureBox1.Image = null; live_btn.BackgroundImage = Microfilm_Dafater_D810.Properties.Resources.play; live_now_1.Visible = false; live_now_2.Visible = false; device.AutoFocus(); device.LiveViewEnabled = true; liveViewTimer.Start(); live_btn.BackgroundImage = Microfilm_Dafater_D810.Properties.Resources.flag_red; live_now_1.Visible = true; live_now_2.Visible = true; } else { device.AutoFocus(); } } catch { MessageBox.Show("Cannot be able to auto-focus the photo"); } }