Startup
This commit is contained in:
@@ -2839,25 +2839,37 @@ public class ScreenPanel extends Panel {
|
||||
private void buttonGrabBackgroundActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGrabBackgroundActionPerformed
|
||||
try {
|
||||
if (camera != null) {
|
||||
if (SwingUtils.showOption(getTopLevel(), "Background", "Do you want to capture background now?", OptionType.YesNo) == OptionResult.Yes) {
|
||||
boolean laserOn = getLaserState();
|
||||
if (laserOn) {
|
||||
setLaserState(false);
|
||||
boolean laserOn = getLaserState();
|
||||
OptionResult ret = null;
|
||||
if (laserOn){
|
||||
ret = SwingUtils.showOption(getTopLevel(), "Capture Background", "Do you want to put laser on delay for capturing background?", OptionType.YesNoCancel);
|
||||
if (ret == OptionResult.No){
|
||||
laserOn = false;
|
||||
}
|
||||
try {
|
||||
System.out.println("Grabbing background for: " + cameraName);
|
||||
if (server != null) {
|
||||
server.captureBackground(5);
|
||||
} else {
|
||||
camera.captureBackground(5, 0);
|
||||
}
|
||||
} finally {
|
||||
if (laserOn) {
|
||||
setLaserState(true);
|
||||
}
|
||||
}
|
||||
SwingUtils.showMessage(getTopLevel(), "Success", "Success capturing background", 5000);
|
||||
} else {
|
||||
ret = SwingUtils.showOption(getTopLevel(), "Capture Background", "Do you want to capture background now?", OptionType.OkCancel);
|
||||
}
|
||||
|
||||
if (ret == OptionResult.Cancel){
|
||||
return;
|
||||
}
|
||||
|
||||
if (laserOn) {
|
||||
setLaserState(false);
|
||||
}
|
||||
try {
|
||||
System.out.println("Grabbing background for: " + cameraName);
|
||||
if (server != null) {
|
||||
server.captureBackground(5);
|
||||
} else {
|
||||
camera.captureBackground(5, 0);
|
||||
}
|
||||
} finally {
|
||||
if (laserOn) {
|
||||
setLaserState(true);
|
||||
}
|
||||
}
|
||||
SwingUtils.showMessage(getTopLevel(), "Success", "Success capturing background", 5000);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
|
||||
Reference in New Issue
Block a user