public WindowRecord(Journee jour, AppliMars.WindowLevel2 w2) : this() { _win2 = w2; _jour = jour; tB_CR.Clear(); this.Text = "Compte-rendu du jour "+(jour.monNumero).ToString(); labelCompteRendu.Text = "Compte-rendu du jour " + (jour.monNumero).ToString(); tB_CR.Text = _jour.monCompteRendu; // Vérifier si le jour est passé ou pas if (_jour.monNumero < _jour.maMission.monJourJ) { journeePasse = true; tB_CR.ReadOnly = true; string s1 = "Le compte rendu contient "; string s2 = " caractères."; int i0 = tB_CR.TextLength; labelCarRest.Text = s1 + i0.ToString() + s2; } else { journeePasse = false; tB_CR.ReadOnly = false; string s1 = "Vous pouvez taper encore "; string s2 = " caractères."; int i0 = tB_CR.TextLength; int i1 = 1000 - i0; labelCarRest.Text = s1 + i1.ToString() + s2; } }
public WindowLevel2(Journee jour, AppliMars.WindowLevel1 w1) : this() { maFenetrePrec = w1; maJournee = jour; refreshPage(); monIdAstronaute = 0; }
// Depuis la recherche public WindowRecord(Journee jour, AppliMars.WindowResultSearch w2) : this() { _winS = w2; _jour = jour; this.Text = "Compte-rendu du jour " + (jour.monNumero).ToString(); labelCompteRendu.Text = "Compte-rendu du jour " + (jour.monNumero).ToString(); tB_CR.Text = _jour.monCompteRendu; tB_CR.ReadOnly = true; b_retourSearch.Visible = true; buttonRetourJournee.Visible = false; }
public WindowResultSearch(AppliMars.WindowLevel1 w1, string aRechercher, string debutRecherche, string finRecherche, bool CRJours, bool DescrAct, bool Acts) : this() { maFenetrePrec = w1; labelRecherche.Text = aRechercher; listBoxNom.Items.Clear(); listBoxCompteRendu.Items.Clear(); listBoxDescription.Items.Clear(); int indexOccNom, indexOccDescription, indexOccCompteRendu; for (int i = int.Parse(debutRecherche); i <= int.Parse(finRecherche); i++) { Journee jour = maFenetrePrec.maMission.monPlanning.monTableauJournees[i-1]; indexOccCompteRendu = jour.monCompteRendu.IndexOf(aRechercher); if (CRJours == true) { if (indexOccCompteRendu != -1) { string stringActivite = "Jour " + jour.monNumero; listBoxCompteRendu.Items.Add(stringActivite); maListeRechercheJour_CompteRendu.Add(jour); } } else { listBoxCompteRendu.Enabled = false; } foreach (Activite act in jour.maListeActivites) { indexOccNom = act.monNom.IndexOf(aRechercher); indexOccDescription = act.maDescription.IndexOf(aRechercher); if (Acts == true) { if (indexOccNom != -1) { string stringActivite = "Act " + act._idAct + " (Jour " + jour.monNumero + ")"; listBoxNom.Items.Add(stringActivite); maListeRechercheActivit_Nom.Add(act); maListeRechercheJour_Nom.Add(jour); } } else { listBoxNom.Enabled = false; } if(DescrAct == true) { if (indexOccDescription != -1) { string stringActivite = "Act " + act._idAct + " (Jour " + jour.monNumero + ")"; listBoxDescription.Items.Add(stringActivite); maListeRechercheActivit_Description.Add(act); maListeRechercheJour_Description.Add(jour); Console.WriteLine(); } } else { listBoxDescription.Enabled = false; } } } }