|
|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
package view;
|
|
|
|
|
|
|
|
|
|
import controller.NavigationController;
|
|
|
|
|
import controller.NavigationService; // 新增导入
|
|
|
|
|
import controller.NavigationService;
|
|
|
|
|
import controller.UserController;
|
|
|
|
|
import model.User;
|
|
|
|
|
|
|
|
|
|
@ -24,11 +24,11 @@ public class MainView extends JFrame {
|
|
|
|
|
private JComboBox<String> difficultyComboBox;
|
|
|
|
|
private JTextField countField;
|
|
|
|
|
private User currentUser; // 保存当前登录用户
|
|
|
|
|
private NavigationService navigationService; // 新增
|
|
|
|
|
private NavigationService navigationService;
|
|
|
|
|
|
|
|
|
|
public MainView(User user) {
|
|
|
|
|
this.currentUser = user;
|
|
|
|
|
this.navigationService = NavigationController.getInstance(); // 新增
|
|
|
|
|
this.navigationService = NavigationController.getInstance();
|
|
|
|
|
initializeUI();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -73,7 +73,7 @@ public class MainView extends JFrame {
|
|
|
|
|
|
|
|
|
|
mainPanel.add(formPanel, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
// Button panel - 添加修改密码按钮
|
|
|
|
|
|
|
|
|
|
JPanel buttonPanel = new JPanel(new FlowLayout());
|
|
|
|
|
JButton changePasswordButton = new JButton("修改密码");
|
|
|
|
|
JButton logoutButton = new JButton("退出登录");
|
|
|
|
|
|