This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
src/main/java/com/civitasv/spider/controller/DonateController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.civitasv.spider.controller; | ||
|
||
import com.civitasv.spider.MainApplication; | ||
import javafx.fxml.FXMLLoader; | ||
import javafx.scene.Parent; | ||
import javafx.scene.Scene; | ||
import javafx.scene.image.Image; | ||
import javafx.scene.image.ImageView; | ||
import javafx.stage.Stage; | ||
|
||
import java.io.IOException; | ||
|
||
public class DonateController { | ||
public ImageView about; | ||
|
||
public void show() throws IOException { | ||
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("donate.fxml")); | ||
Parent root = fxmlLoader.load(); | ||
DonateController controller = fxmlLoader.getController(); | ||
controller.init(); | ||
Stage stage = new Stage(); | ||
stage.setResizable(false); | ||
stage.setTitle("捐赠"); | ||
Scene scene = new Scene(root); | ||
scene.getStylesheets().add(MainApplication.class.getResource("styles.css").toString()); | ||
stage.setScene(scene); | ||
stage.getIcons().add(new Image(MainApplication.class.getResourceAsStream("icon/icon.png"))); | ||
stage.show(); | ||
} | ||
|
||
private void init() { | ||
Image image = new Image(MainApplication.class.getResourceAsStream("icon/zhifubao.jpg")); | ||
about.setImage(image); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.geometry.*?> | ||
<?import javafx.scene.image.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" styleClass="main" | ||
xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" | ||
fx:controller="com.civitasv.spider.controller.DonateController"> | ||
|
||
<padding> | ||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/> | ||
</padding> | ||
|
||
|
||
<ImageView fx:id="about" fitHeight="300" fitWidth="300.0" pickOnBounds="true" preserveRatio="true"/> | ||
</VBox> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters