设置窗口加入开源许可证
This commit is contained in:
parent
2cdefbd8b9
commit
864f16b0d8
Binary file not shown.
|
@ -9,7 +9,6 @@ import javafx.scene.input.KeyEvent;
|
|||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.text.Text;
|
||||
import org.rococy.roomit.config.ConfigurationManager;
|
||||
import org.rococy.roomit.constant.GlobalConsts;
|
||||
import org.rococy.roomit.constant.KeyBoardConsts;
|
||||
|
@ -142,8 +141,8 @@ public class SettingWindowController {
|
|||
|
||||
@FXML
|
||||
public void openBrowser(MouseEvent event) throws Exception {
|
||||
Text text = (Text) event.getTarget();
|
||||
Desktop.getDesktop().browse(new URL(text.getText()).toURI());
|
||||
Hyperlink hyperlink = (Hyperlink) event.getSource();
|
||||
Desktop.getDesktop().browse(new URL((String) hyperlink.getUserData()).toURI());
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
|
|
@ -53,6 +53,7 @@ public class AutoStartFile {
|
|||
}
|
||||
}
|
||||
|
||||
// 复制自启动bat文件到windows的startup目录下
|
||||
File file = new File(BAT_FILE_PATH);
|
||||
|
||||
if (!file.exists()) {
|
||||
|
@ -61,7 +62,6 @@ public class AutoStartFile {
|
|||
|
||||
FileWriter fos = new FileWriter(file);
|
||||
|
||||
|
||||
fos.write(fileContentJoiner.toString());
|
||||
fos.flush();
|
||||
fos.close();
|
||||
|
|
|
@ -192,10 +192,19 @@
|
|||
<Label styleClass="h1">关于</Label>
|
||||
<VBox style="-fx-spacing: 6px">
|
||||
<Label>作者:Rococy</Label>
|
||||
|
||||
<HBox>
|
||||
<Label style="-fx-padding: 5px 0 0">开源许可证:</Label>
|
||||
<Hyperlink style="-fx-font-size: 13px" onMouseClicked="#openBrowser"
|
||||
userData="https://gitee.com/gavaFullStack/RoomIt/blob/master/LICENSE"
|
||||
text="Apache License 2.0"/>
|
||||
</HBox>
|
||||
|
||||
<HBox>
|
||||
<Label style="-fx-padding: 5px 0 0">开源地址:</Label>
|
||||
<Hyperlink style="-fx-font-size: 13px" onMouseClicked="#openBrowser"
|
||||
text="https://www.baidu.com"/>
|
||||
userData="https://gitee.com/gavaFullStack/RoomIt"
|
||||
text="https://gitee.com/gavaFullStack/RoomIt"/>
|
||||
</HBox>
|
||||
</VBox>
|
||||
</VBox>
|
||||
|
|
Loading…
Reference in New Issue