public FormEditeurParagraphe(Jeu jeu, Livre livre)
 {
     MonJeu = jeu;
     Aventure = livre;
     InitializeComponent();
     Init();
 }
 public FormEditeurCarte(Jeu jeu, Livre livre)
 {
     MonJeu = jeu;
     LivreSelectionne = livre;
     InitializeComponent();
     Init();
 }
Esempio n. 3
0
 public FormCarte(Jeu jeu)
 {
     MonJeu = jeu;
     CaptureZoneEnCours = false;
     CapturePointEnCours = false;
     InitializeComponent();
 }
Esempio n. 4
0
        private void FormMain_Shown(object sender, EventArgs e)
        {
            FormSelectionAventure fa = new FormSelectionAventure(this);
            fa.ShowDialog();
            if (fa.LivreSelectionne == null)
            {
                return;
            }
            LivreSelectionne = fa.LivreSelectionne;

            Moi = fa.Moi;
            if (fa.Connected)
            {
                ModeEnLigne = TypeModeEnLigne.Client;
                Serveur = fa.Sender;
            }
            else
            {
                ModeEnLigne = TypeModeEnLigne.Aucun;
                Serveur = null;
            }

            MonJeu = new Jeu(LivreSelectionne.Repertoire);
            MonJeu.ChangerParagraphe(LivreSelectionne.Repertoire + "\\Paragraphes\\1.xml");
            MettreAJour();
            Carte = new FormCarte(MonJeu);
            Rec = "";

            //Test de connexion
            try
            {
                TcpListener server = new TcpListener(GetLocalIPAdress(), 9050);
                server.Start();
                server.Stop();

                //Connexion réussie
                Thread listener = new Thread(new ThreadStart(LancerEcoute));
                listener.IsBackground = true;
                listener.Start();
            }
            catch
            {
                MessageBox.Show("Impossible d'initialiser le réseau. Le mode en-ligne a été désactiver. Pour le réactiver, vérifiez vos paramètres de pare-feu et relancez l'application.");
            }
        }
Esempio n. 5
0
 private void bRecommencer_Click(object sender, EventArgs e)
 {
     MonJeu = new Jeu(LivreSelectionne.Repertoire);
     MonJeu.ChangerParagraphe(LivreSelectionne.Repertoire + "\\Paragraphes\\1.xml");
     tbLog.Text = "";
     Carte.MonJeu = MonJeu;
     MettreAJour();
 }