mirror of
				https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
				synced 2025-10-31 09:03:08 +00:00 
			
		
		
		
	[CLIENT] #18 : Le soft se ferme désormais complêtement lorsque la croix rouge est utilisée. Amélioration du comportement de fermeture (prise en compte des ImplicitExit)
This commit is contained in:
		| @@ -2,6 +2,7 @@ package com.pqt.client; | |||||||
|  |  | ||||||
| import com.pqt.client.gui.FrameManager; | import com.pqt.client.gui.FrameManager; | ||||||
| import javafx.application.Application; | import javafx.application.Application; | ||||||
|  | import javafx.application.Platform; | ||||||
| import javafx.stage.Stage; | import javafx.stage.Stage; | ||||||
|  |  | ||||||
| public class Main extends Application{ | public class Main extends Application{ | ||||||
| @@ -10,12 +11,20 @@ public class Main extends Application{ | |||||||
|         launch(args); |         launch(args); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     private FrameManager fm; | ||||||
|     public void start(Stage primaryStage) throws Exception { |  | ||||||
|         FrameManager fm = new FrameManager(primaryStage); |  | ||||||
|  |  | ||||||
|         primaryStage.setOnCloseRequest(event->fm.onCloseEvent()); |     @Override | ||||||
|  |     public void start(Stage primaryStage) { | ||||||
|  |         fm = new FrameManager(primaryStage); | ||||||
|  |  | ||||||
|  |         primaryStage.setOnCloseRequest(event-> Platform.exit()); | ||||||
|  |  | ||||||
|         fm.show(); |         fm.show(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     public void stop(){ | ||||||
|  |         if(fm!=null) | ||||||
|  |             fm.onCloseEvent(); | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user