Skip to content

Commit

Permalink
Merge pull request #40 from btssn-lasalle-84/POOL2023-51-livraison-1-0
Browse files Browse the repository at this point in the history
Pool2023 51 livraison 1 0
  • Loading branch information
tvaira committed May 28, 2023
2 parents b3a2b3a + cc493a4 commit 0ccf01f
Show file tree
Hide file tree
Showing 358 changed files with 8,274 additions and 4,449 deletions.
1,805 changes: 1,563 additions & 242 deletions Bouml/MobilePool/128050

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Bouml/MobilePool/134570.diagram
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ msg 132010 synchronous
msg 132266 synchronous
from durationcanvas_ref 130730
to durationcanvas_ref 132138
yz 692 2025 msg operation_ref 142890 // "getInstance() : Communication"
yz 692 2025 explicitmsg "getInstance"
show_full_operations_definition default show_class_of_operation default drawing_language default show_context_mode default
label_xy 1751 659
reflexivemsg 132522 synchronous
Expand Down Expand Up @@ -238,7 +238,7 @@ msg 135594 synchronous
label_xy 1500 1612
reflexivemsg 135978 synchronous
to durationcanvas_ref 135850
yz 1734 2025 msg operation_ref 146474 // "parametrerActiviteManche() : Intent"
yz 1734 2025 msg operation_ref 146474 // "parametrerActiviteManche(in nomJoueur1 : String, in nomJoueur2 : String) : Intent"
show_full_operations_definition default show_class_of_operation default drawing_language default show_context_mode default
label_xy 932 1704
reflexivemsg 136234 synchronous
Expand Down
62 changes: 23 additions & 39 deletions Bouml/MobilePool/134698.bodies
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,26 @@ class ConfigurationManche
!!!134698.java!!! initialiserAttributs() : void
baseDonnees = BaseDeDonnees.getInstance(this);
nomsJoueurs = baseDonnees.getNomsJoueurs();
communication = Communication.getInstance(handler);
communication = Communication.getInstance(handler, Communication.TABLE);
adaptateurNomsJoueurs =
new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, nomsJoueurs);
filtresNom = new InputFilter[] { new InputFilter() {
public CharSequence
filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend){
if(source.length() < 1) return null;
for(int i = start; i < end; i++)
filtresNom = new InputFilter[] {
new InputFilter() {
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend)
{
char lettre = source.charAt(i);
if(!(Character.isLetter(lettre) || lettre == ' '))
if(source.length() < 1) return null;
for(int i = start; i < end; i++)
{
return "";
char lettre = source.charAt(i);
if(!(Character.isLetter(lettre) || (lettre == ' ' && i != 0)))
{
return "";
}
}
return null;
}
return null;
}
}
, new InputFilter() {
public CharSequence filter(CharSequence source,
int start,
int end,
Spanned dest,
int dstart,
int dend)
{
if(source.length() < 1)
return null;
char premiereLettre = source.charAt(0);
if(premiereLettre == ' ')
{
return "";
}
return null;
}
}
};
};
!!!134826.java!!! initialiserRessources() : void
choixNomsJoueur1 = (Spinner)findViewById(R.id.joueur1Spinner);
choixNomsJoueur2 = (Spinner)findViewById(R.id.joueur2Spinner);
Expand Down Expand Up @@ -117,9 +100,7 @@ class ConfigurationManche
RadioButton boutonTable = (RadioButton)findViewById(groupe.getCheckedRadioButtonId());
choixNomTable = boutonTable.getText().toString();
Log.d(TAG, "clic choixTable : " + choixNomTable);
//!< @todo seConnecter() à choixNomTable
communication.seConnecter("pool-1");
// connexionTable = true; // Provisoire pour les tests
communication.seConnecter(choixNomTable);
}
});

Expand All @@ -135,8 +116,10 @@ class ConfigurationManche
Log.d(TAG, "Table : " + choixNomTable);
String nomJoueur1 = editionNomJoueur1.getText().toString();
String nomJoueur2 = editionNomJoueur2.getText().toString();

ajouterNomsJoueurs(nomJoueur1, nomJoueur2);
Intent activiteManche = parametrerActiviteManche();
Intent activiteManche = parametrerActiviteManche(nomJoueur1, nomJoueur2);

startActivity(activiteManche);
Log.d(TAG, "DEBUG startActivity(activiteManche) Activite demarree avec succes");
}
Expand All @@ -149,15 +132,16 @@ class ConfigurationManche
!!!146346.java!!! ajouterNomsJoueurs(in nomJoueur1 : String, in nomJoueur2 : String) : void
baseDonnees.ajouterNom(nomJoueur1);
baseDonnees.ajouterNom(nomJoueur2);
!!!146474.java!!! parametrerActiviteManche() : Intent
!!!146474.java!!! parametrerActiviteManche(in nomJoueur1 : String, in nomJoueur2 : String) : Intent
Intent activiteManche = new Intent(ConfigurationManche.this, Manche.class);
activiteManche.putExtra("joueur1", nomJoueur1);
activiteManche.putExtra("joueur2", nomJoueur2);
activiteManche.putExtra("connexionTable", connexionTable);
activiteManche.putExtra("connexionTable", connexion);
activiteManche.putExtra("choixNomTable", choixNomTable);
return activiteManche;
!!!134954.java!!! estConfiguree() : Boolean
Log.d(TAG, "estConfiguree() connexionTable = " + connexionTable);
if(!connexionTable)
Log.d(TAG, "estConfiguree() connexionTable = " + connexion);
if(!connexion)
return false;
Log.d(TAG,
"estConfiguree() joueur1 = " + !editionNomJoueur1.getText().toString().isEmpty() +
Expand Down Expand Up @@ -197,4 +181,4 @@ class ConfigurationManche
}
};
!!!146602.java!!! actualiserEtatConnexionTable(inout etat : boolean) : void
connexionTable = etat;
connexion = etat;
5 changes: 3 additions & 2 deletions Bouml/MobilePool/134706.bodies
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ class EcranPrincipal
super.onDestroy();
Log.d(TAG, "onDestroy()");
!!!128818.java!!! initialiserRessources() : void
boutonStatistiques = (Button)findViewById(R.id.boutonStatistiques);
boutonStatistiques = (Button)findViewById(R.id.boutonHistorique);
boutonJouer = (Button)findViewById(R.id.boutonJouer);

boutonStatistiques.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
Log.d(TAG, "clic boutonStatistiques");
//!< @todo
Intent activiteHistorique = new Intent(EcranPrincipal.this, Historique.class);
startActivity(activiteHistorique);
}
});
boutonJouer.setOnClickListener(new View.OnClickListener()
Expand Down
Loading

0 comments on commit 0ccf01f

Please sign in to comment.