提交 4c8c4811 编写于 作者: K keeplearn

优化代码

上级 49360b58
......@@ -10,6 +10,9 @@ import java.net.URL;
import java.util.Objects;
/**
* @author keeplearn
*/
public class Main extends Application {
@Override
......
......@@ -4,15 +4,15 @@ import cn.hutool.core.util.StrUtil;
import com.learn.biz.CreateLic;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.control.Tooltip;
/**
* @author keeplearn
*/
public class P1Controller {
@FXML
private Button myButton;
@FXML
private TextField systemSignTextField;
@FXML
......@@ -31,6 +31,8 @@ public class P1Controller {
@FXML
private void handleButtonClick(ActionEvent event){
String name = event.getEventType().getName();
System.out.println(name);
System.out.println("btn clicked!");
//systemSign系统标识串
......@@ -70,16 +72,15 @@ public class P1Controller {
return;
}
String licenseSign = "";
try {
licenseSign = CreateLic.createLicense(systemSign, generatedTimeStr,
String licenseSign = CreateLic.createLicense(systemSign, generatedTimeStr,
expiredTimeStr,
lastValidateTimeStr, version, path);
textArea2.setText(licenseSign);
System.out.println("license文件生成成功,文件路径:" + path);
}catch (Exception e){
textArea2.setPromptText("生成licenseSign失败!原因:"+e.getMessage());
e.printStackTrace();
e.fillInStackTrace();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册