2023年10月8日16:20:10
parent
3853e1dd43
commit
7a6ab44ee3
|
|
@ -173,10 +173,22 @@ public class MonacoWebView extends AnchorPane {
|
||||||
|
|
||||||
if (event.isControlDown() && event.getCode() == KeyCode.S) {//保存
|
if (event.isControlDown() && event.getCode() == KeyCode.S) {//保存
|
||||||
event.consume();
|
event.consume();
|
||||||
|
if (file != null){
|
||||||
|
try {
|
||||||
|
FileWriter writer = new FileWriter(file);
|
||||||
|
writer.write(text_code.getValue());
|
||||||
|
writer.flush();
|
||||||
|
writer.close();
|
||||||
|
} catch (IOException ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
//
|
||||||
|
}
|
||||||
AlertUtils.alert_warning("保存成功!");
|
AlertUtils.alert_warning("保存成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.isControlDown() && event.getCode() == KeyCode.CONTROL) {//注释
|
if (event.isControlDown() && event.getCode() == KeyCode.DIVIDE) {//注释
|
||||||
event.consume();
|
event.consume();
|
||||||
window.call("commentLine");
|
window.call("commentLine");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue