Closedown

This commit is contained in:
gac-x12sa
2023-01-05 15:06:47 +01:00
parent 79566cb477
commit f6c1a860ae
4 changed files with 62 additions and 10 deletions

View File

@@ -349,18 +349,50 @@ public class Eiger extends Panel {
}
return ret;
});
});
}
} catch (Exception ex){
showException(ex);
}
}
}//GEN-LAST:event_buttonConfigActionPerformed
private void buttonConfigDetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonConfigDetActionPerformed
// TODO add your handling code here:
try{
if (stddaq!=null){
String title = "Detector Config";
this.evalAsync("detector.get_config()").handle((ret,ex)->{
if (ex!=null){
showException((Exception) ex);
} else {
try{
Map cfg = (Map) ret;
String json = EncoderJson.encode(cfg, true);
ScriptDialog dlg = new ScriptDialog(getWindow(), true, title, json, "json");
dlg.setVisible(true);
if (dlg.getResult()){
json = dlg.getText();
cfg = (Map) EncoderJson.decode(json, Map.class);
setGlobalVar("_detector_config", cfg);
evalAsync("detector.set_config(_detector_config)").handle((r,e)->{
if (e!=null){
showException((Exception) e);
} else {
showMessage(title, "Success updating config");
}
return ret;
});
}
} catch (Exception e){
showException(e);
}
}
return ret;
});
}
} catch (Exception ex){
showException(ex);
}
}//GEN-LAST:event_buttonConfigDetActionPerformed
private void buttonParsDetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonParsDetActionPerformed