MAJ V4.5.0

This commit is contained in:
pablo rodriguez 2024-05-21 22:02:42 +02:00
parent 4aa0d0ef74
commit be2d294308
6 changed files with 34 additions and 20 deletions

Binary file not shown.

Binary file not shown.

View File

@ -41,7 +41,7 @@ public class commandes {
public static node nodeCSV = null;
//** Version
public static String version ="V4.5.0"; // La version actuelle
public static String version ="V4.3.0"; // La version actuelle
public static String versionEvaluation = "";
public static String branch = "Origin";
public static String Annee ="2024";

View File

@ -10,9 +10,6 @@ import java.nio.file.Paths;
import java.text.ParseException;
import java.util.Date;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import MEPTL.commandes;
/**
@ -46,11 +43,8 @@ public class CreerBaseParDefautEvaluation {
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
try {
fichier.write("<evaluations date=\""+ calcul.formatDateWriter.DateLibreOffice(aujourdhui) +"\" version=\""+commandes.version +"\"></evaluations>");
fichier.close();
fichier.close();
System.out.println("Fermeture du fichier de la base de données des évaluations.");
JLabel texte = new JLabel("<html><p>La base de données des évaluations a été créée.</p><br>"
+"<p>Elle se trouve dans le dossier \"" + directoryName +".</p></html>");
JOptionPane.showMessageDialog(null, texte);
return false;
} catch (IOException e) {
e.printStackTrace();

View File

@ -0,0 +1,14 @@
package baseEvaluations;
import MEPTL.commandes;
public class validatorBaseEvaluation {
public static Boolean isVide() {
if(commandes.evaluationsBase==null) return true;
if(commandes.evaluationsBase.isVide()) return true;
if(commandes.evaluationsBase.getNodes().size()==0) return true;
return false;
}
}

View File

@ -6,6 +6,7 @@ import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.nio.file.Paths;
import javax.swing.ImageIcon;
import javax.swing.JButton;
@ -19,6 +20,7 @@ import OnLineVersions.verificationNewVersion;
import action.actAbout;
import baseEvaluations.CreerBaseParDefautEvaluation;
import baseEvaluations.recupeNodeBaseEvaluations;
import baseEvaluations.validatorBaseEvaluation;
import baseListesEtudiants.CreerBaseParDefautListesEtudiants;
public class mainApp extends JFrame implements ActionListener{
@ -84,7 +86,7 @@ public class mainApp extends JFrame implements ActionListener{
frmEvalwriter = new JFrame();
frmEvalwriter.setResizable(false);
frmEvalwriter.setBounds(100, 100, 500, 371);
frmEvalwriter.setBounds(100, 100, 530, 380);
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
frmEvalwriter.setLocation(( (screenWidth) - frmEvalwriter.getWidth()) / 2, (screenHeight - frmEvalwriter.getHeight()) / 2);
@ -102,7 +104,7 @@ public class mainApp extends JFrame implements ActionListener{
btnCreate.setFont(new Font("Arial", Font.BOLD, 16));
btnCreate.addActionListener(this);
btnCreate.setBounds(34, 181, 420, 60);
btnCreate.setBounds(10, 181, 494, 60);
frmEvalwriter.getContentPane().add(btnCreate);
actCharge = new JButton("Evaluer les fichiers des étudiants");
@ -112,9 +114,13 @@ public class mainApp extends JFrame implements ActionListener{
actCharge.setIcon(new ImageIcon(mainApp.class.getResource("/resources/evaluate.png")));
actCharge.setBackground(SystemColor.inactiveCaption);
actCharge.setFont(new Font("Arial", Font.BOLD, 16));
actCharge.setBounds(34, 110, 420, 60);
actCharge.setBounds(10, 110, 494, 60);
frmEvalwriter.getContentPane().add(actCharge);
actCharge.setEnabled(LaBaseEvaluationsExiste);
if(LaBaseEvaluationsExiste) {
actCharge.setEnabled(!validatorBaseEvaluation.isVide());
}else {
actCharge.setEnabled(LaBaseEvaluationsExiste);
}
JLabel lblNewLabel = new JLabel();
ImageIcon img2 = new ImageIcon(getClass().getResource("/accueil.png") );
@ -125,7 +131,7 @@ public class mainApp extends JFrame implements ActionListener{
lblNewLabel.setIcon(img2);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
lblNewLabel.setBounds(0, 0, 484, 111);
lblNewLabel.setBounds(0, 0, 514, 111);
frmEvalwriter.getContentPane().add(lblNewLabel);
JButton btnNewButton = new JButton(new actAbout());
@ -134,7 +140,7 @@ public class mainApp extends JFrame implements ActionListener{
btnNewButton.setHorizontalAlignment(SwingConstants.LEFT);
btnNewButton.setFont(new Font("Arial", Font.PLAIN, 14));
btnNewButton.setIcon(new ImageIcon(mainApp.class.getResource("/resources/apropos.png")));
btnNewButton.setBounds(34, 252, 200, 60);
btnNewButton.setBounds(10, 252, 240, 60);
frmEvalwriter.getContentPane().add(btnNewButton);
JButton btnTutoriels = new JButton();
@ -155,10 +161,14 @@ public class mainApp extends JFrame implements ActionListener{
btnTutoriels.setIcon(new ImageIcon(mainApp.class.getResource("/resources/documentation.png")));
btnTutoriels.setHorizontalAlignment(SwingConstants.LEFT);
btnTutoriels.setFont(new Font("Arial", Font.PLAIN, 14));
btnTutoriels.setBounds(254, 252, 200, 60);
btnTutoriels.setBounds(260, 252, 240, 60);
frmEvalwriter.getContentPane().add(btnTutoriels);
JLabel lblpath = new JLabel(Paths.get("").toAbsolutePath().toString());
lblpath.setFont(new Font("Tahoma", Font.PLAIN, 9));
lblpath.setBounds(10, 311, 494, 30);
frmEvalwriter.getContentPane().add(lblpath);
actCharge.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new recupeNodeBaseEvaluations();
@ -182,8 +192,4 @@ public class mainApp extends JFrame implements ActionListener{
frmEvalwriter.dispose();
}
}
}