MAJ
1
bin/.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/fenetres/
|
||||
/resources/
|
||||
/analyseWriter/
|
||||
/baseListesEtudiants/
|
||||
|
@ -2,7 +2,6 @@ package actions;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -48,7 +47,6 @@ public class actSave extends AbstractAction{
|
||||
int input = JOptionPane.showConfirmDialog(null, message);
|
||||
|
||||
if(input==0) {
|
||||
try {
|
||||
// verificationFichierAnalyse.MiseAJourHashNomFichierAnalyse(calc.commandes.nameSujet);
|
||||
if(calc.commandes.sujet.retourneFirstEnfant("settings")==null) {
|
||||
calc.commandes.sujet = ecritureFileXML.addSetting(calc.commandes.sujet);
|
||||
@ -64,10 +62,6 @@ public class actSave extends AbstractAction{
|
||||
fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + ".xml\" a été réenregistré.\n\n"
|
||||
+ "Il se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
|
||||
}
|
||||
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ package actions;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -46,10 +45,6 @@ public class actSaveAs extends AbstractAction{
|
||||
|
||||
if (userSelection == JFileChooser.APPROVE_OPTION) {
|
||||
File fileToSave = fileChooser.getSelectedFile();
|
||||
try {
|
||||
|
||||
// verificationFichierAnalyse.MiseAJourHashNomFichierAnalyse(fileToSave.getName());
|
||||
|
||||
if(calc.commandes.sujet.retourneFirstEnfant("settings")==null) {
|
||||
calc.commandes.sujet = ecritureFileXML.addSetting(calc.commandes.sujet);
|
||||
}
|
||||
@ -70,11 +65,6 @@ public class actSaveAs extends AbstractAction{
|
||||
file = new File(calc.commandes.PathFilenameAnalysis + "\\" + calc.commandes.nameSujet + ".xml");
|
||||
fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + ".xml\" a été renregistré.\n\nIl se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
|
||||
}
|
||||
|
||||
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
System.out.println("Save as file: " + fileToSave.getAbsolutePath());
|
||||
}
|
||||
System.out.println( "Save as" );
|
||||
|
@ -1,52 +0,0 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
|
||||
import calc.commandes;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Création de la base de données des listes des étudiants.<br>
|
||||
* Et/Ou vérification de la présence de de la base de données.
|
||||
* @author pabr6
|
||||
*
|
||||
*/
|
||||
public class CreerBaseParDefautListesEtudiants {
|
||||
public Boolean isExist() throws IOException {
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
}
|
||||
|
||||
if(!file.exists()) {
|
||||
Date aujourdhui = new Date();
|
||||
Path outputFilePath = file.toPath();
|
||||
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||
try {
|
||||
fichier.write("<ListesEtudiants date=\""+ calcul.formatDateWriter.DateLibreOffice(aujourdhui) +"\" version=\""+commandes.version +"\"></ListesEtudiants>");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
fichier.close();
|
||||
return false;
|
||||
}
|
||||
return new recupeNodeBaseListesEtudiants().isHasliste();
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
|
||||
import calc.commandes;
|
||||
|
||||
public class chargeListeEtudiants {
|
||||
|
||||
public static void chargeDansleNodeCSVListeEtudiants(Integer index) {
|
||||
if(commandes.listesEtudiants!=null) {
|
||||
if(commandes.listesEtudiants.getEnfants().size()>index && index >= 0 ) {
|
||||
commandes.nodeCSV = commandes.listesEtudiants.getEnfants().get(index);
|
||||
commandes.fourniCSV=true;
|
||||
}else {
|
||||
commandes.nodeCSV = null;
|
||||
commandes.fourniCSV=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void chargeDansLeNodeCSVListeEtudiants(String nameListe) {
|
||||
if(commandes.listesEtudiants!=null) {
|
||||
if(commandes.listesEtudiants.getEnfants().size()>0) {
|
||||
commandes.nodeCSV = commandes.listesEtudiants.retourneFirstEnfant("fileCSV", "nameListStudent", nameListe);
|
||||
if(commandes.nodeCSV!=null) {
|
||||
commandes.fourniCSV=true;
|
||||
}else {
|
||||
commandes.fourniCSV=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,204 +0,0 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import calc.commandes;
|
||||
import xml.node;
|
||||
|
||||
|
||||
|
||||
public class ecritureBaseListesEtudiants {
|
||||
|
||||
|
||||
private static boolean erreur = false;
|
||||
|
||||
public ecritureBaseListesEtudiants(node csv) {
|
||||
erreur = false;
|
||||
|
||||
if(csv==null) {
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||
+ "<p>Le fichier CSV est null.</p></html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
erreur=true;
|
||||
return;
|
||||
}
|
||||
|
||||
if(csv.isVide()) {
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||
+ "<p>Le fichier CSV est vide.</p></html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
erreur=true;
|
||||
return ;
|
||||
}
|
||||
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
}
|
||||
|
||||
if(!Files.isWritable(file.toPath())) {
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||
+ "<p>"+ file.getAbsolutePath() +"</p><p>Vous devez avoir des droits pour écrire dans ce dossier.</p></html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
erreur=true;
|
||||
return;
|
||||
}
|
||||
|
||||
String debut="";
|
||||
String fin="";
|
||||
String XMLBase="";
|
||||
|
||||
if(file!=null) {
|
||||
//Lecture de la base de données
|
||||
BufferedReader br;
|
||||
try {
|
||||
br = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(file.getAbsoluteFile()), "UTF-8"));
|
||||
String line;
|
||||
StringBuilder targetString = new StringBuilder();
|
||||
while ((line = br.readLine()) != null) {
|
||||
targetString.append(line);
|
||||
}
|
||||
String baseToString = targetString.toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
|
||||
|
||||
Pattern p = Pattern.compile("<\\bfileCSV\\b.{1,100}\\bnameListStudent\\b=\\\""+ csv.getAttributs().get("nameListStudent") +"\\\".*?<\\/\\bfileCSV\\b>");
|
||||
Matcher m = p.matcher(baseToString);
|
||||
|
||||
if(m.find()) {
|
||||
//Supprime le node fileCSV pour le remplacer par le nouveau.
|
||||
debut = baseToString.substring(0,m.start());
|
||||
fin = baseToString.substring(m.end());
|
||||
String codeXMLEvaluation = csv.ecritureXML().toString(); //Run.ecritureNode(csv, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
|
||||
XMLBase = debut + codeXMLEvaluation + fin;
|
||||
}else {
|
||||
//Ajoute une nouvelle liste (fileCSV) au début de la base
|
||||
p = Pattern.compile("<ListesEtudiants.*?>");
|
||||
m = p.matcher(baseToString);
|
||||
if(m.find()) {
|
||||
debut = baseToString.substring(0,m.end());
|
||||
fin = baseToString.substring(m.end());
|
||||
String codeXMLEvaluation = csv.ecritureXML().toString();//Run.ecritureNode(csv, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
|
||||
XMLBase = debut + codeXMLEvaluation + fin;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
// écriture du node
|
||||
Path outputFilePath = file.toPath();
|
||||
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||
fichier.write(XMLBase);
|
||||
fichier.close();
|
||||
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>Enregistrement réussi</h1><p>La liste <b>"+csv.getAttributs().get("nameListStudent")+ "</b> a été enregistrée dans la base de données.</p>"
|
||||
+ "<p>"+ file.getAbsolutePath() +"</p></html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
|
||||
} catch (IOException e) {
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||
+ "<p>"+e.getMessage()+"</p></html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
erreur=true;
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mise à jour de la base liste des étudiants.
|
||||
*/
|
||||
public static void majBaseListesEtudiant() {
|
||||
erreur=false;
|
||||
|
||||
if(commandes.listesEtudiants==null) {
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>La liste des étudiant est nulle.</h1>"
|
||||
+ "</html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
erreur=true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
}
|
||||
|
||||
if(!Files.isWritable(file.toPath())) {
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||
+ "<p>"+ file.getAbsolutePath() +"</p><p>Vous devez avoir des droits pour écrire dans ce dossier.</p></html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
erreur=true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// écriture du node
|
||||
|
||||
try {
|
||||
Path outputFilePath = file.toPath();
|
||||
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||
Date aujourdhui = new Date();
|
||||
commandes.listesEtudiants.getAttributs().put("date", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
|
||||
commandes.listesEtudiants.getAttributs().put("version",commandes.version);
|
||||
fichier.write(commandes.listesEtudiants.ecritureXML().toString());
|
||||
fichier.close();
|
||||
} catch (IOException | ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>L'écriture n'a pas réussi</h1>"
|
||||
+ "<p>"+e.getMessage()+"</p></html>");
|
||||
JOptionPane.showMessageDialog(frame, texte);
|
||||
erreur=true;
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static boolean isErreur() {
|
||||
return erreur;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,73 +0,0 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import calc.commandes;
|
||||
import xml.node;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pabr6
|
||||
*
|
||||
*/
|
||||
public class recupeNodeBaseListesEtudiants {
|
||||
private boolean Hasliste = false;
|
||||
|
||||
public recupeNodeBaseListesEtudiants() {
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
}
|
||||
|
||||
if(file!=null) {
|
||||
BufferedReader br;
|
||||
try {
|
||||
br = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(file.getAbsoluteFile()), "UTF-8"));
|
||||
String line;
|
||||
StringBuilder targetString = new StringBuilder();
|
||||
while ((line = br.readLine()) != null) {
|
||||
targetString.append(line);
|
||||
}
|
||||
String codeTexte = "<!-- A -->" + targetString.toString().replace("\t","").replace("\r", "").replace("\n", "");
|
||||
codeTexte = codeTexte.replaceAll(">/{1,}<", "><");
|
||||
node nodRetourne = new node(codeTexte);
|
||||
|
||||
if(nodRetourne.getNameNode().equals("fichier")) {
|
||||
nodRetourne.setNameNode("ListesEtudiants");
|
||||
}
|
||||
|
||||
commandes.listesEtudiants = nodRetourne;
|
||||
if(nodRetourne.getEnfants().size()>0) Hasliste=true;
|
||||
|
||||
}catch (Exception e) {
|
||||
JLabel texte = new JLabel("<html><p>La base de données des listes des étudiants<br>n'est pas située dans le même répertoire que celui de l'application.</p></html>");
|
||||
JOptionPane.showMessageDialog(null, texte);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean isHasliste() {
|
||||
return Hasliste;
|
||||
}
|
||||
|
||||
public void setHasliste(boolean hasliste) {
|
||||
Hasliste = hasliste;
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package baseListesEtudiants;
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -10,6 +12,9 @@ import java.nio.file.Paths;
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
|
||||
import calc.commandes;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Création de la base de données des listes des étudiants.<br>
|
||||
@ -22,7 +27,7 @@ public class CreerBaseParDefautListesEtudiants {
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(calc.commandes.os.contains("Win")) {
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
@ -33,7 +38,7 @@ public class CreerBaseParDefautListesEtudiants {
|
||||
Path outputFilePath = file.toPath();
|
||||
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||
try {
|
||||
fichier.write("<ListesEtudiants date=\""+ calcul.formatDateWriter.DateLibreOffice(aujourdhui) +"\" version=\""+calc.commandes.version +"\"></ListesEtudiants>");
|
||||
fichier.write("<ListesEtudiants date=\""+ calcul.formatDateWriter.DateLibreOffice(aujourdhui) +"\" version=\""+commandes.version +"\"></ListesEtudiants>");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
package baseListesEtudiants;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
@ -1,6 +1,7 @@
|
||||
package baseListesEtudiants;
|
||||
|
||||
import calc.*;
|
||||
import calc.commandes;
|
||||
|
||||
public class chargeListeEtudiants {
|
||||
|
||||
public static void chargeDansleNodeCSVListeEtudiants(Integer index) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
package baseListesEtudiants;
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
@ -18,8 +20,12 @@ import java.util.regex.Pattern;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import calc.commandes;
|
||||
import xml.node;
|
||||
|
||||
|
||||
|
||||
public class ecritureBaseListesEtudiants {
|
||||
|
||||
|
||||
@ -49,7 +55,7 @@ public class ecritureBaseListesEtudiants {
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(calc.commandes.os.contains("Win")) {
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
@ -89,7 +95,8 @@ public class ecritureBaseListesEtudiants {
|
||||
//Supprime le node fileCSV pour le remplacer par le nouveau.
|
||||
debut = baseToString.substring(0,m.start());
|
||||
fin = baseToString.substring(m.end());
|
||||
XMLBase = debut + csv.ecritureXML().toString() + fin;
|
||||
String codeXMLEvaluation = csv.ecritureXML().toString(); //Run.ecritureNode(csv, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
|
||||
XMLBase = debut + codeXMLEvaluation + fin;
|
||||
}else {
|
||||
//Ajoute une nouvelle liste (fileCSV) au début de la base
|
||||
p = Pattern.compile("<ListesEtudiants.*?>");
|
||||
@ -97,7 +104,8 @@ public class ecritureBaseListesEtudiants {
|
||||
if(m.find()) {
|
||||
debut = baseToString.substring(0,m.end());
|
||||
fin = baseToString.substring(m.end());
|
||||
XMLBase = debut + csv.ecritureXML().toString() + fin;
|
||||
String codeXMLEvaluation = csv.ecritureXML().toString();//Run.ecritureNode(csv, 0).toString().replace("\t","").replace("\r", "").replace("\n", "").replaceAll(">/{1,}<","><");
|
||||
XMLBase = debut + codeXMLEvaluation + fin;
|
||||
}
|
||||
|
||||
}
|
||||
@ -136,7 +144,7 @@ public class ecritureBaseListesEtudiants {
|
||||
public static void majBaseListesEtudiant() {
|
||||
erreur=false;
|
||||
|
||||
if(calc.commandes.listesEtudiants==null) {
|
||||
if(commandes.listesEtudiants==null) {
|
||||
JFrame frame = new JFrame();
|
||||
JLabel texte = new JLabel("<html><h1>La liste des étudiant est nulle.</h1>"
|
||||
+ "</html>");
|
||||
@ -149,7 +157,7 @@ public class ecritureBaseListesEtudiants {
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(calc.commandes.os.contains("Win")) {
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
@ -171,9 +179,9 @@ public class ecritureBaseListesEtudiants {
|
||||
Path outputFilePath = file.toPath();
|
||||
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||
Date aujourdhui = new Date();
|
||||
calc.commandes.listesEtudiants.getAttributs().put("date", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
|
||||
calc.commandes.listesEtudiants.getAttributs().put("version",calc.commandes.version);
|
||||
fichier.write(calc.commandes.listesEtudiants.ecritureXML().toString());
|
||||
commandes.listesEtudiants.getAttributs().put("date", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
|
||||
commandes.listesEtudiants.getAttributs().put("version",commandes.version);
|
||||
fichier.write(commandes.listesEtudiants.ecritureXML().toString());
|
||||
fichier.close();
|
||||
} catch (IOException | ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
@ -1,4 +1,4 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
package baseListesEtudiants;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
@ -1,4 +1,4 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
package baseListesEtudiants;
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
package baseListesEtudiants;
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package analyseWriter.baseListesEtudiants;
|
||||
package baseListesEtudiants;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
@ -1,5 +1,7 @@
|
||||
package baseListesEtudiants;
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -9,6 +11,7 @@ import java.nio.file.Paths;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import calc.commandes;
|
||||
import xml.node;
|
||||
|
||||
/**
|
||||
@ -23,7 +26,7 @@ public class recupeNodeBaseListesEtudiants {
|
||||
File file = null;
|
||||
String directoryName = Paths.get("").toAbsolutePath().toString();
|
||||
|
||||
if(calc.commandes.os.contains("Win")) {
|
||||
if(commandes.os.contains("Win")) {
|
||||
file = new File(directoryName + "\\" + "base_listes_etudiants.xml");
|
||||
}else {
|
||||
file = new File(directoryName + "/" + "base_listes_etudiants.xml");
|
||||
@ -48,7 +51,7 @@ public class recupeNodeBaseListesEtudiants {
|
||||
nodRetourne.setNameNode("ListesEtudiants");
|
||||
}
|
||||
|
||||
calc.commandes.listesEtudiants = nodRetourne;
|
||||
commandes.listesEtudiants = nodRetourne;
|
||||
if(nodRetourne.getEnfants().size()>0) Hasliste=true;
|
||||
|
||||
}catch (Exception e) {
|
||||
|
@ -19,7 +19,7 @@ import javax.swing.JTextField;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
|
||||
import analyseWriter.baseListesEtudiants.ecritureBaseListesEtudiants;
|
||||
import baseListesEtudiants.ecritureBaseListesEtudiants;
|
||||
import calc.commandes;
|
||||
import xml.node;
|
||||
|
||||
|
@ -24,13 +24,13 @@ import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.table.TableColumnModel;
|
||||
|
||||
import analyseWriter.baseListesEtudiants.EmailValidator;
|
||||
import analyseWriter.baseListesEtudiants.chargeListeEtudiants;
|
||||
import analyseWriter.baseListesEtudiants.ecritureBaseListesEtudiants;
|
||||
import analyseWriter.baseListesEtudiants.idValidator;
|
||||
import analyseWriter.baseListesEtudiants.myTableBaseListesEtudiants;
|
||||
import analyseWriter.baseListesEtudiants.myTableStudent;
|
||||
import analyseWriter.baseListesEtudiants.nameStudentValidator;
|
||||
import baseListesEtudiants.EmailValidator;
|
||||
import baseListesEtudiants.chargeListeEtudiants;
|
||||
import baseListesEtudiants.ecritureBaseListesEtudiants;
|
||||
import baseListesEtudiants.idValidator;
|
||||
import baseListesEtudiants.myTableBaseListesEtudiants;
|
||||
import baseListesEtudiants.myTableStudent;
|
||||
import baseListesEtudiants.nameStudentValidator;
|
||||
import calc.commandes;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import xml.node;
|
||||
|
BIN
src/resources/accueilBaseListesEtudiants.png
Normal file
After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 28 KiB |
BIN
src/resources/addStudentbaselisteetudiant.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
src/resources/addStudentbaselisteetudiantmini.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/resources/addnewstudent.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/resources/addnewstudentmini.png
Normal file
After Width: | Height: | Size: 1016 B |
BIN
src/resources/csvstudent.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/resources/csvstudentmini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/resources/fichieretudiant.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/resources/fichieretudiantmini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/resources/quitteliste.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
src/resources/quittelistemini.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/resources/removeListe.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
src/resources/removeListemini.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/resources/verifhistoriquestudent.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
src/resources/verifhistoriquestudentmini.png
Normal file
After Width: | Height: | Size: 1.4 KiB |