Example #1
0
        public Ogre(Affichage affichePlat)
        {
            int platManger = 0;

            Nom           = "Shrek";
            afficherPlat += affichePlat;
            platContexte  = new PlatBDContext();
        }
Example #2
0
        public Window1()
        {
            InitializeComponent();

            this.route = new Route(25, 25, 250, 2);
            Affichage action = new Affichage(Affiche);

            this.Lancement();
        }
Example #3
0
 public CAD()
 {
     this.cnx          = "Data Source=DESKTOP-7H2944G;Initial Catalog=Projet_Syst;Integrated Security=True";
     this.rq_sql       = null;
     this.dataAdapter  = new SqlDataAdapter();
     this.sqlconnexion = new SqlConnection(cnx);
     this.sqlcommand   = new SqlCommand();
     Dataset           = new DataSet();
     afficher          = new Affichage();
 }
Example #4
0
        static void Main(string[] args)
        {
            Affichage affichage = new Affichage();

            //affichage.Authentification();

            affichage.Menu();

            affichage.Actions();

            Environment.Exit(0);
        }
Example #5
0
        /* Constructeur */
        public Poeme(string name, int stropheNum)
        {
            stropheNumber = stropheNum;
            poemeName     = name;

            Affichage menu = new Affichage();

            stropheLength = menu.StropheLength();

            stropheList = new Strophe[stropheNumber];

            int i = 0;

            while (i < stropheNumber)
            {
                Strophe strophe = new Strophe(stropheLength, i);
                stropheList[i] = strophe;
                i++;
            }

            Console.WriteLine("Poeme crée");
        }
Example #6
0
        static void Main(string[] args)
        {
            afficher = new Affichage();

            HallInterface salle = Hall.hallInstance();

            MHotel = MaîtreHôtel.maîtreHôtelInstance();

            CutleryDesk.cutleryDeskInstance();
            OrderDesk.orderDeskInstance();


            string rep = Console.ReadLine();


            Thread threadClient = new Thread(() => ArriverClient(rep));

            new Pause().AddThread(threadClient);
            threadClient.Start();


            Thread threadAccueilMaitreHotel = new Thread(() => AccueilMaitreHotel());

            new Pause().AddThread(threadAccueilMaitreHotel);
            threadAccueilMaitreHotel.Start();

            while (true)
            {
                char key = Console.ReadKey().KeyChar;
                if (key.Equals('w'))
                {
                    new Pause().PauseThreads();
                }
                else if (key.Equals('x'))
                {
                    new Pause().Resume();
                }
            }
        }
Example #7
0
        static public Affichage ConvertirAffichage(string affichage)
        {
            Affichage resultat = Affichage.etirer;

            affichage = affichage.ToLower();

            if (affichage == "etirer" || affichage == "étirer" || affichage == "stretch")
            {
                resultat = Affichage.etirer;
            }
            else if (affichage == "ajuster" || affichage == "ajust")
            {
                resultat = Affichage.ajuster;
            }
            else if (affichage == "centrer" || affichage == "center")
            {
                resultat = Affichage.centrer;
            }
            else if (affichage == "mosaïque" || affichage == "mosaique")
            {
                resultat = Affichage.mosaique;
            }
            else if (affichage == "remplir" || affichage == "fill")
            {
                resultat = Affichage.remplir;
            }
            else if (affichage == "etendre" || affichage == "étendre" || affichage == "extend")
            {
                resultat = Affichage.etendre;
            }
            else
            {
                resultat = Affichage.etirer;
            }

            return(resultat);
        }
Example #8
0
        public Menu()
        {
            Affichage affichage = new Affichage();

            affichage.Welcome();

            /* Choix lecture ou écriture */
            string option = affichage.ReadOrWrite();

            /* Affichage des poèmes */
            if (option == "read")
            {
                affichage.Read();
                Content       content   = Content.Instance;
                IList <Poeme> poemeList = content.PoemeList;

                int a = poemeList.Count;
                if (a < 1)
                {
                    Console.WriteLine("Il n'y a pas de poèmes enregistrés");
                    Menu menus = new Menu();
                }

                int i = 0;

                foreach (Poeme poeme in poemeList)
                {
                    string name = poeme.PoemeName;
                    Console.WriteLine("[" + i + "] " + name);
                    i++;
                }

                /* Lecture d'un poeme */
                int poemeRank = affichage.ChoosePoeme();
                option = affichage.ReadOrAnalyse();

                if (option == "read")
                {
                    Poeme poeme = poemeList[poemeRank];
                    foreach (Strophe strophe in poeme.stropheList)
                    {
                        foreach (Vers ver in strophe.VersList)
                        {
                            string verString = ver.Content;
                            Console.WriteLine(verString);
                        }
                    }
                }

                /* Affichage du schéma rimique*/
                else if (option == "analyse")
                {
                    Poeme poeme = poemeList[poemeRank];
                    int   b     = 1;
                    foreach (Strophe strophe in poeme.stropheList)
                    {
                        SchemaRimique schemaRimique = new SchemaRimique();
                        string        result        = schemaRimique.getRimique(strophe);
                        Console.WriteLine("Le schema rimique de la strophe n°" + b);
                        Console.WriteLine(result);
                        b++;
                    }
                }

                /* Retour */
                Menu menu = new Menu();
            }

            /* Ecriture */
            else if (option == "write")
            {
                Poeme   poeme   = new Poeme(affichage.PoemeName(), affichage.Write());
                Content content = Content.Instance;
                content.addPoeme(poeme);
                Console.WriteLine("Poème enregistré");

                /* Retour */
                Menu menu = new Menu();
            }
        }
Example #9
0
 public Loup(Affichage affichePlat) : base(affichePlat)
 {
     Nom = "Croc Blanc";
 }
Example #10
0
 public Ours(Affichage affichePlat) : base(affichePlat)
 {
     Nom = "Winnie";
 }
Example #11
0
        /// <summary>
        /// Réception d'un octet
        /// </summary>
        /// <returns></returns>
        private async Task Listen()
        {
            // Buffer de réception
            const int NUMBER_OF_BYTES_TO_RECEIVE = 1024;

            byte[]    ReceiveData;
            UInt32    bytesRead;
            Affichage affichage = new Affichage();

            try
            {
                if (UartPort != null)
                {
                    while (true)
                    {
                        //###### WINDOWS IoT MEMORY LEAK BUG 2017-03 - USING CancellationToken WITH LoadAsync() CAUSES A BAD MEMORY LEAK.  WORKAROUND IS
                        //TO BUILD RELEASE WITHOUT USING THE .NET NATIVE TOOLCHAIN OR TO NOT USE A CancellationToken IN THE CALL #####
                        //bytesRead = await DataReaderObject.LoadAsync(NUMBER_OF_BYTES_TO_RECEIVE).AsTask(ReadCancellationTokenSource.Token);	//Wait until buffer is full
                        bytesRead = await DataReaderObject.LoadAsync(NUMBER_OF_BYTES_TO_RECEIVE).AsTask();  //Wait until buffer is full

                        if ((ReadCancellationTokenSource.Token.IsCancellationRequested) || (UartPort == null))
                        {
                            break;
                        }

                        if (bytesRead > 0)
                        {
                            ReceiveData = new byte[NUMBER_OF_BYTES_TO_RECEIVE];
                            DataReaderObject.ReadBytes(ReceiveData);

                            string message       = "";
                            bool   premiereTrame = true;
                            // Ecriture des données dans les zones de texte à l'écran
                            foreach (byte Data in ReceiveData)
                            {
                                // Décodage des trames pour récupérer les informations voules et les afficher
                                if (Convert.ToChar(Data).ToString() == "$")
                                {
                                    if (premiereTrame)
                                    {
                                        premiereTrame = false;
                                    }
                                    else
                                    {
                                        switch (message.Split(',')[0])
                                        {
                                        case "$GPGGA":
                                            affichage.setGPGGA(message);
                                            break;

                                        case "$GPGLL":
                                            affichage.setGPGLL(message);
                                            break;

                                        case "$GPGSA":
                                            affichage.setGPGSA(message);
                                            break;

                                        case "$GPGSV":
                                            affichage.setGPGSV(message);
                                            break;

                                        case "$GPVTG":
                                            affichage.setGPVTG(message);
                                            break;

                                        case "$GPRMC":
                                            affichage.setGPRMC(message);
                                            break;
                                        }
                                        heure.Text     = affichage.getHeure();
                                        date.Text      = affichage.getDate();
                                        latitude.Text  = affichage.getLatitude();
                                        longitude.Text = affichage.getLongitude();
                                        vitesse.Text   = affichage.getVitesse();
                                        cap.Text       = affichage.getCap();
                                        distance.Text  = affichage.getDistance();
                                        altitude.Text  = affichage.getAltitude();
                                    }
                                    message = "$";
                                }
                                else
                                {
                                    message += Convert.ToChar(Data);
                                }
                            } // foreach (byte Data in ReceiveData)
                        }     //if (bytesRead > 0)
                    }         //  while (true)
                }             //if (UartPort != null)
            }
            catch (Exception e)
            {
                //We will get here often if the USB serial cable is removed so reset ready for a new connection (otherwise a never ending error occurs)
                if (ReadCancellationTokenSource != null)
                {
                    ReadCancellationTokenSource.Cancel();
                }
                System.Diagnostics.Debug.WriteLine("UART ReadAsync Exception: {0}", e.Message);
            }
        }
Example #12
0
 /// <summary>
 /// Constructeur de Wallpaper
 /// </summary>
 /// <param name="fichier">Nom du fichier image</param>
 /// <param name="affich">Type d'affichage</param>
 /// <param name="fond">Couleur du fond</param>
 public Wallpaper(string fichier, Affichage affich, Color fond)
 {
     this.nomfichier  = fichier;
     this.affichage   = affich;
     this.couleurFond = fond;
 }
Example #13
0
 private CommisWaiter()
 {
     afficher = new Affichage();
 }
Example #14
0
 public Daim(Affichage affichePlat) : base(affichePlat)
 {
     Nom = "Bambie";
 }
Example #15
0
 public Serpent(Affichage affichePlat) : base(affichePlat)
 {
     Nom = "Kaa";
 }