diff --git a/src/fxml/Change_accountname.fxml b/src/fxml/Change_accountname.fxml
deleted file mode 100644
index 76e60245395d321acd3a1c46adcbb09c59072bd5..0000000000000000000000000000000000000000
--- a/src/fxml/Change_accountname.fxml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/fxml/Change_tel.fxml b/src/fxml/Change_tel.fxml
new file mode 100644
index 0000000000000000000000000000000000000000..49a9a6c3519082ad3861ad615644877a9ad3e253
--- /dev/null
+++ b/src/fxml/Change_tel.fxml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/fxml/Personal.fxml b/src/fxml/Personal.fxml
index 451ea33b840a2bb9998dfbc503c53d8bc0e8f9d6..00c6008ea15ee52f1b5cfe6514b226d8a0a0e003 100644
--- a/src/fxml/Personal.fxml
+++ b/src/fxml/Personal.fxml
@@ -1,5 +1,6 @@
+
@@ -38,26 +39,22 @@
-
-
-
-
-
-
-
+
+
+
+
diff --git a/src/fxml/Pricepane(none).fxml b/src/fxml/Pricepane(none).fxml
index 428a7a1f7c4aa99bf1bc16be5e2e1a6913edb1db..4d144ad34dad0dbb9325fb19bd902ea9ac2dea77 100644
--- a/src/fxml/Pricepane(none).fxml
+++ b/src/fxml/Pricepane(none).fxml
@@ -36,7 +36,7 @@
-
+
@@ -97,7 +97,7 @@
-
+
@@ -189,7 +189,7 @@
-
+
diff --git a/src/fxml/Pricepane.fxml b/src/fxml/Pricepane.fxml
index d82855fb3b94a708ee80c94c5264bd55632f63a5..2f10087b24b57d8fa51c5c2e8732d426e50956d8 100644
--- a/src/fxml/Pricepane.fxml
+++ b/src/fxml/Pricepane.fxml
@@ -52,7 +52,7 @@
-
+
@@ -113,7 +113,7 @@
-
+
@@ -205,7 +205,7 @@
-
+
diff --git a/src/imgzip/mainpane/Change_acccountname.java b/src/imgzip/mainpane/Change_acccountname.java
deleted file mode 100644
index bfdf2f646399bda0cca53fe99241b3b0eeaee3ee..0000000000000000000000000000000000000000
--- a/src/imgzip/mainpane/Change_acccountname.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package imgzip.mainpane;
-
-public class Change_acccountname {
-}
diff --git a/src/imgzip/mainpane/Change_accountnameController.java b/src/imgzip/mainpane/Change_accountnameController.java
deleted file mode 100644
index 076be92982d8305853eb44c37f301f10b0ec39c6..0000000000000000000000000000000000000000
--- a/src/imgzip/mainpane/Change_accountnameController.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package imgzip.mainpane;
-
-public class Change_accountnameController {
-}
diff --git a/src/imgzip/mainpane/Change_emailController.java b/src/imgzip/mainpane/Change_emailController.java
index 5b7b5f75c609b2f8a5ccc1edc8d3a754506922dc..8d6b25c741f4ac017f45ba15469b6ca3211467b2 100644
--- a/src/imgzip/mainpane/Change_emailController.java
+++ b/src/imgzip/mainpane/Change_emailController.java
@@ -37,7 +37,7 @@ public class Change_emailController implements Initializable {
// }
certain.setOnAction(e -> {
a = text.getText();
- GlobalStringManager.setEmial(a);
+// GlobalStringManager.setEmial(a);
DataBaseController loginInstruction = new DataBaseController();
ResultSet rs = null;
String currentInstruction = "UPDATE login SET email=" + "'" + a + "'" + "WHERE username=" + "'" + GlobalStringManager.getAccount() + "'";
diff --git a/src/imgzip/mainpane/Change_tel.java b/src/imgzip/mainpane/Change_tel.java
new file mode 100644
index 0000000000000000000000000000000000000000..ac22bd9faaaf4f847dbf09e137f0403728e2fc63
--- /dev/null
+++ b/src/imgzip/mainpane/Change_tel.java
@@ -0,0 +1,24 @@
+package imgzip.mainpane;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+/**
+ @Author: 吴泳仪
+ @Date: 2019.12.19
+ */
+public class Change_tel {
+ public Change_tel(){
+ try {
+ Parent root = FXMLLoader.load(getClass().getResource("/fxml/Change_tel.fxml"));
+ Stage primaryStage = new Stage();
+ primaryStage.setTitle("修改电话号码");
+ primaryStage.setScene(new Scene(root, 400, 300));
+ primaryStage.show();
+
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/imgzip/mainpane/Change_telController.java b/src/imgzip/mainpane/Change_telController.java
new file mode 100644
index 0000000000000000000000000000000000000000..e80eb120cc8adb242facd55405ecdae11e5655cc
--- /dev/null
+++ b/src/imgzip/mainpane/Change_telController.java
@@ -0,0 +1,45 @@
+package imgzip.mainpane;
+
+import imgzip.LoginSignIn.DataBaseController;
+import imgzip.LoginSignIn.GlobalStringManager;
+import javafx.fxml.FXML;
+import javafx.fxml.Initializable;
+import javafx.scene.control.Button;
+import javafx.scene.control.TextField;
+import javafx.stage.Stage;
+
+import java.net.URL;
+import java.sql.ResultSet;
+import java.util.ResourceBundle;
+
+public class Change_telController implements Initializable {
+ public String b;
+ @FXML
+ private Button certain;
+ @FXML
+ private TextField text;
+
+ public void initialize(URL lacation, ResourceBundle resources){
+
+// if(a.length() != 0) {
+// certain.setDisable(true);
+//
+// }else{
+// certain.setDisable(false);
+// }
+ certain.setOnAction(e -> {
+ b = text.getText();
+// GlobalStringManager.setEmial(b);
+ DataBaseController loginInstruction = new DataBaseController();
+ ResultSet rs = null;
+ String currentInstruction = "UPDATE login SET tel=" + "'" + b + "'" + "WHERE username=" + "'" + GlobalStringManager.getAccount() + "'";
+ loginInstruction.queryUpdate(currentInstruction);
+ loginInstruction.close();
+ GlobalStringManager.setEmial(b);
+ new Personal();
+ Stage stage = (Stage) certain.getScene().getWindow();
+ stage.close();
+ });
+
+ }
+}
diff --git a/src/imgzip/mainpane/Personal.java b/src/imgzip/mainpane/Personal.java
index 5e957136e6268fbb899c3a3a3c9eb83e4b37cec0..637955fdd9e3392a3658cc613a7164b0e9b8b08c 100644
--- a/src/imgzip/mainpane/Personal.java
+++ b/src/imgzip/mainpane/Personal.java
@@ -49,10 +49,6 @@ public class Personal {
Parent root = FXMLLoader.load(getClass().getResource("/fxml/Personal.fxml"));
-// Label account = (Label) root.lookup("#account");
-// Label email = (Label)root.lookup("#email");
-// Label tel = (Label)root.lookup("#tel");
-
Pane accountp = (Pane)root.lookup("#accountp");
Pane emailp = (Pane)root.lookup("#emailp");
Pane telp= (Pane)root.lookup("#telp");
@@ -64,15 +60,19 @@ public class Personal {
rs = loginInstruction.queryExcecute(currentInstruction);
if (rs.next()) {
-// account.setFont(Font.font(rs.getString(1)));
-// email.setFont(Font.font(rs.getString(3)));
-// tel.setFont(Font.font(rs.getString(4)));
Label a = new Label(rs.getString(1));
+ a.setStyle("-fx-font-family: 'FangSong';-fx-font-size: 20;");
accountp.getChildren().add(a);
+ GlobalStringManager.setAccount(rs.getString(1));
+
Label e = new Label(rs.getString(3));
+ e.setStyle("-fx-font-family: 'FangSong';-fx-font-size: 20;");
emailp.getChildren().add(e);
+ GlobalStringManager.setEmial(rs.getString(3));
+
Label t = new Label(rs.getString(4));
+ t.setStyle("-fx-font-family: 'FangSong';-fx-font-size: 20;");
telp.getChildren().add(t);
}
@@ -83,10 +83,6 @@ public class Personal {
}finally {
loginInstruction.close();
}
-
-
-
-
Stage primaryStage = new Stage();
primaryStage.setTitle("Personal");
primaryStage.setScene(new Scene(root, 939, 685));
diff --git a/src/imgzip/mainpane/PersonalController.java b/src/imgzip/mainpane/PersonalController.java
index 591310a9b155cbceb1c7e9908513f35b1d8e1cba..71d91b53724d36fa1f1ba4ddd6aaaa6a41f334ed 100644
--- a/src/imgzip/mainpane/PersonalController.java
+++ b/src/imgzip/mainpane/PersonalController.java
@@ -30,17 +30,16 @@ public class PersonalController implements Initializable {
@FXML
private Button functionpage;
@FXML
- private Button changename;
- @FXML
private Button changeemail;
@FXML
- private Button changepw;
- @FXML
- public static Pane accountp;
+ private Button changetel;
@FXML
- private Pane emailp;
+ private Button changepw;
+// @FXML
+// public static Pane accountp;
+// @FXML
+// private Pane emailp;
- @Override
public void initialize(URL lacation, ResourceBundle resources){
/**
本页面连接到homepage
@@ -78,12 +77,6 @@ public class PersonalController implements Initializable {
stage.close();
});
- /**
- 修改用户名称
- */
-// changename.setOnAction(e -> {
-//
-// });
/**
修改邮箱
@@ -94,6 +87,15 @@ public class PersonalController implements Initializable {
stage.close();
});
+ /**
+ 修改电话号
+ */
+ changetel.setOnAction(e -> {
+ new Change_tel();
+ Stage stage = (Stage) changetel.getScene().getWindow();
+ stage.close();
+ });
+
/**
修改密码
*/
diff --git a/txtFile/RememberAccount&Password.txt b/txtFile/RememberAccount&Password.txt
index 5a087e8086e7a872c55dc78cd2b9b3fe07fc9c70..6029f262eae5a78d10984189adeeaa86e76c3b80 100644
--- a/txtFile/RememberAccount&Password.txt
+++ b/txtFile/RememberAccount&Password.txt
@@ -1 +1 @@
-qwert|qwert|true
+asdfg|asdfg|true