Skip to content

Commit acaf0a4

Browse files
committed
添加添加统计功能
1 parent 109ab0b commit acaf0a4

5 files changed

Lines changed: 37 additions & 11 deletions

File tree

src/main/java/com/xwintop/xJavaFxTool/controller/IndexController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public void initialize(URL location, ResourceBundle resources) {
7272
initService();
7373
addNodepadAction(null);
7474
indexService.addWebView("欢迎吐槽", "https://support.qq.com/product/127577", null);
75+
tongjiWebView.getEngine().load("https://xwintop.gitee.io/maven/tongji/xJavaFxTool.html");
7576
}
7677

7778
private void initView() {
@@ -300,4 +301,9 @@ private void openPluginFolderAction(ActionEvent event) throws Exception {
300301
private void xwintopLinkOnAction(ActionEvent event) throws Exception {
301302
HttpClientUtil.openBrowseURLThrowsException("https://gitee.com/xwintop/xJavaFxTool");
302303
}
304+
305+
@FXML
306+
private void userSupportAction(ActionEvent event) throws Exception {
307+
HttpClientUtil.openBrowseURLThrowsException("https://support.qq.com/product/127577");
308+
}
303309
}

src/main/java/com/xwintop/xJavaFxTool/view/IndexView.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import javafx.scene.control.MenuBar;
1111
import javafx.scene.control.TabPane;
1212
import javafx.scene.control.TextField;
13+
import javafx.scene.web.WebView;
1314
import lombok.Getter;
1415
import lombok.Setter;
1516

@@ -39,4 +40,7 @@ public abstract class IndexView implements Initializable {
3940
protected Menu moreToolsMenu;
4041
@FXML
4142
protected Menu helpMenu;
43+
44+
@FXML
45+
protected WebView tongjiWebView;
4246
}

src/main/resources/com/xwintop/xJavaFxTool/fxmlView/Index.fxml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<?import javafx.geometry.Insets?>
4-
<?import javafx.scene.control.*?>
5-
<?import javafx.scene.layout.*?>
4+
<?import javafx.scene.control.Button?>
5+
<?import javafx.scene.control.CheckBox?>
6+
<?import javafx.scene.control.Hyperlink?>
7+
<?import javafx.scene.control.Menu?>
8+
<?import javafx.scene.control.MenuBar?>
9+
<?import javafx.scene.control.MenuItem?>
10+
<?import javafx.scene.control.SeparatorMenuItem?>
11+
<?import javafx.scene.control.TabPane?>
12+
<?import javafx.scene.control.TextField?>
13+
<?import javafx.scene.layout.AnchorPane?>
14+
<?import javafx.scene.layout.BorderPane?>
15+
<?import javafx.scene.layout.HBox?>
16+
<?import javafx.scene.web.WebView?>
17+
618
<AnchorPane prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.xwintop.xJavaFxTool.controller.IndexController">
719
<children>
820
<BorderPane layoutY="2.0" prefHeight="600.0" prefWidth="900.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="2.0">
@@ -18,7 +30,7 @@
1830
<MenuItem mnemonicParsing="false" onAction="#pluginManageAction" text="%plugin_manage" />
1931
<MenuItem mnemonicParsing="false" onAction="#addNodepadAction" text="%addNodepad" />
2032
<MenuItem mnemonicParsing="false" onAction="#addLogConsoleAction" text="%addLogConsole" />
21-
<SeparatorMenuItem/>
33+
<SeparatorMenuItem />
2234
<MenuItem mnemonicParsing="false" onAction="#exitAction" text="%Exit" />
2335
</items>
2436
</Menu>
@@ -29,15 +41,16 @@
2941
<MenuItem mnemonicParsing="false" onAction="#openLogFolderAction" text="%openLogFolder" />
3042
<MenuItem mnemonicParsing="false" onAction="#openConfigFolderAction" text="%openConfigFolder" />
3143
<MenuItem mnemonicParsing="false" onAction="#openPluginFolderAction" text="%openPluginFolder" />
32-
<SeparatorMenuItem/>
44+
<SeparatorMenuItem />
3345
<items>
3446
<Menu mnemonicParsing="false" text="%SetLanguage">
3547
<items>
3648
<MenuItem mnemonicParsing="false" onAction="#setLanguageAction" text="简体中文" />
3749
<MenuItem mnemonicParsing="false" onAction="#setLanguageAction" text="English" />
3850
</items>
3951
</Menu>
40-
<SeparatorMenuItem/>
52+
<SeparatorMenuItem />
53+
<MenuItem mnemonicParsing="false" onAction="#userSupportAction" text="%userSupport" />
4154
<MenuItem mnemonicParsing="false" onAction="#aboutAction" text="%About" />
4255
</items>
4356
</Menu>
@@ -54,6 +67,7 @@
5467
</HBox.margin>
5568
</Button>
5669
<CheckBox fx:id="singleWindowBootCheckBox" mnemonicParsing="false" text="%singleWindowBootCheckBox" />
70+
<WebView fx:id="tongjiWebView" prefHeight="1.0" prefWidth="1.0" visible="false" />
5771
<Hyperlink onAction="#xwintopLinkOnAction" text="http://gitee.com/xwintop/xJavaFxTool" textFill="RED" />
5872
</children>
5973
</HBox>

src/main/resources/locale/Menu.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Dorian.properties\u662F\u9ED8\u8BA4\u7684"Dorian"\u8D44\u6E90\u675F\u6587\u4EF6\u3002
2-
# \u4F5C\u4E3A\u4E2D\u56FD\u4EBA,\u6211\u7528\u81EA\u5DF1\u7684\u5730\u533A\u4F5C\u4E3A\u9ED8\u8BA4
1+
# Dorian.properties\u662F\u9ED8\u8BA4\u7684"Dorian"\u8D44\u6E90\u675F\u6587\u4EF6\u3002
2+
# \u4F5C\u4E3A\u4E2D\u56FD\u4EBA,\u6211\u7528\u81EA\u5DF1\u7684\u5730\u533A\u4F5C\u4E3A\u9ED8\u8BA4
33
Title=javaFx\u5DE5\u5177\u96C6\u5408
44
# MenuFiled
55
File=\u83DC\u5355
@@ -19,6 +19,7 @@ openLogFile=\u6253\u5F00\u65E5\u5FD7\u6587\u4EF6
1919
openLogFolder=\u6253\u5F00\u65E5\u5FD7\u76EE\u5F55
2020
openConfigFolder=\u6253\u5F00\u914D\u7F6E\u76EE\u5F55
2121
openPluginFolder=\u6253\u5F00\u63D2\u4EF6\u76EE\u5F55
22+
userSupport=\u7528\u6237\u8BBA\u575B
2223

2324
aboutText=\u6B22\u8FCE\u4F7F\u7528JavaFx\u5DE5\u5177\u96C6\u5408\u3002\ngit\u5730\u5740\uFF1Ahttps://gitee.com/xwintop/xJavaFxTool\n\u4F5C\u8005\uFF1A\u8FFD\u98CE\n\u535A\u5BA2\uFF1Awww.xwintop.com\n\u6B22\u8FCE\u524D\u6765\u63D0\u51FA\u610F\u89C1\uFF0C\u4E00\u8D77\u5B8C\u5584\u8BE5\u5DE5\u5177\uFF0C\u8C22\u8C22\uFF01\uFF01\n\u5F53\u524D\u7248\u672C\uFF1A
2425
SetLanguageText=\u8BED\u8A00\u9009\u62E9\u8BBE\u7F6E\u6210\u529F\uFF0C\u91CD\u542F\u540E\u751F\u6548\u3002
@@ -101,4 +102,4 @@ FileUnicodeTransformationTool=\u6587\u4EF6\u7F16\u7801\u8F6C\u6362\u5DE5\u5177
101102
FileCompressTool=\u6587\u4EF6\u89E3\u538B\u7F29\u5DE5\u5177
102103
IdiomDataTool=\u6210\u8BED\u5B57\u5178\u5DE5\u5177
103104
DxpMsgTool=DxpMsgTool
104-
Sudoku=\u6570\u72EC
105+
Sudoku=\u6570\u72EC

src/main/resources/locale/Menu_en_US.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# \u6587\u4EF6Dorian_en_US.properties\uFF0C\u662F\u7F8E\u56FD\u5730\u533A\u7684\u8D44\u6E90\u675F
2-
# \u5B83\u8986\u76D6\u4E86\u9ED8\u8BA4\u8D44\u6E90\u675F
1+
# \u6587\u4EF6Dorian_en_US.properties\uFF0C\u662F\u7F8E\u56FD\u5730\u533A\u7684\u8D44\u6E90\u675F
2+
# \u5B83\u8986\u76D6\u4E86\u9ED8\u8BA4\u8D44\u6E90\u675F
33
Title=JavaFxTool
44

55
File=File
@@ -19,6 +19,7 @@ openLogFile=open Log File
1919
openLogFolder=open Log Folder
2020
openConfigFolder=open Config Folder
2121
openPluginFolder=open Plugin Folder
22+
userSupport=user Support
2223

2324
aboutText=Welcome to the JavaFx tool set.\ngitUrl:https://gitee.com/xwintop/xJavaFxTool\nAuthor:xwintop\nblog:www.xwintop.com\nWelcome to make comments and improve the tool together. Thank you!!\ncurrent version:
2425
SetLanguageText=The language selection settings have been successful and will take effect after reboot.
@@ -101,4 +102,4 @@ FileUnicodeTransformationTool=FileUnicodeTransformationTool
101102
FileCompressTool=FileCompressTool
102103
IdiomDataTool=IdiomDataTool
103104
DxpMsgTool=DxpMsgTool
104-
Sudoku=Sudoku
105+
Sudoku=Sudoku

0 commit comments

Comments
 (0)