Closedown
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user