Beispiel #1
0
        public MenuMontre(FenJeuMontre parent)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //

            this.parent       = parent;
            this.folderSnake  = parent.getFolderSnake();
            this.folderConfig = parent.getFolderConfig();
            this.filsConfig   = parent.getFilsConfig();

            if (parent.verifExistFile(filsConfig))
            {
                using (StreamReader strmReader = new StreamReader(filsConfig)) {
                    String   ligne = strmReader.ReadLine();
                    String[] tabConfig;

                    if (ligne != null)
                    {
                        tabConfig = ligne.Split(';');

                        saisieHauteJeu.Text = tabConfig[0];
                        saisieLargJeu.Text  = tabConfig[1];
                        saisieTempsJeu.Text = tabConfig[2];
                        saisieVit.Text      = tabConfig[3];
                    }
                }
            }
        }
Beispiel #2
0
        static void lanceFenJeu(int typeJeu)
        {
            FenJeu fen = null;

            switch (typeJeu)
            {
            case 0:
                fen = new FenJeuNiv();
                break;

            case 1:
                fen = new FenJeuMontre();
                break;

            case 2:
                fen = new FenJeuSurvie();
                break;
            }

            if (fen != null)
            {
                Application.Run(fen);
                if (fen != null && fen.getRevenirDebut())
                {
                    lanceFenDepart();
                }
            }

            Environment.Exit(0);
        }
        public StatistiqueMontre(FenJeuMontre parent)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //

            this.parent      = parent;
            this.folderSnake = parent.getFolderSnake();
            this.filsSave    = parent.getFilsSave();

            lireRecordMontres();
        }