|
|
@@ -3,10 +3,10 @@ package space.anyi.client;
|
|
|
import javafx.application.Application;
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
import javafx.scene.Scene;
|
|
|
+import javafx.scene.image.Image;
|
|
|
import javafx.stage.Stage;
|
|
|
-import space.anyi.client.util.LoginUserHolder;
|
|
|
|
|
|
-public class App extends Application {
|
|
|
+public class UIApplication extends Application {
|
|
|
|
|
|
private static Stage primaryStage;
|
|
|
|
|
|
@@ -15,6 +15,7 @@ public class App extends Application {
|
|
|
primaryStage = stage;
|
|
|
showLoginScene();
|
|
|
stage.setTitle("校园二手书交易系统");
|
|
|
+ stage.getIcons().add(new Image(UIApplication.class.getResourceAsStream("/favicon.png")));
|
|
|
stage.show();
|
|
|
}
|
|
|
|
|
|
@@ -24,7 +25,7 @@ public class App extends Application {
|
|
|
}
|
|
|
|
|
|
public static void showLoginScene() throws Exception {
|
|
|
- FXMLLoader loader = new FXMLLoader(App.class.getResource("/fxml/login.fxml"));
|
|
|
+ FXMLLoader loader = new FXMLLoader(UIApplication.class.getResource("/fxml/login.fxml"));
|
|
|
Scene scene = new Scene(loader.load());
|
|
|
addStylesheets(scene);
|
|
|
primaryStage.setScene(scene);
|
|
|
@@ -32,7 +33,7 @@ public class App extends Application {
|
|
|
}
|
|
|
|
|
|
public static void showRegisterScene() throws Exception {
|
|
|
- FXMLLoader loader = new FXMLLoader(App.class.getResource("/fxml/register.fxml"));
|
|
|
+ FXMLLoader loader = new FXMLLoader(UIApplication.class.getResource("/fxml/register.fxml"));
|
|
|
Scene scene = new Scene(loader.load());
|
|
|
addStylesheets(scene);
|
|
|
primaryStage.setScene(scene);
|
|
|
@@ -40,7 +41,7 @@ public class App extends Application {
|
|
|
}
|
|
|
|
|
|
public static void showMainScene() throws Exception {
|
|
|
- FXMLLoader loader = new FXMLLoader(App.class.getResource("/fxml/main.fxml"));
|
|
|
+ FXMLLoader loader = new FXMLLoader(UIApplication.class.getResource("/fxml/main.fxml"));
|
|
|
Scene scene = new Scene(loader.load());
|
|
|
addStylesheets(scene);
|
|
|
primaryStage.setScene(scene);
|