public IHM_AvecItemsClickables(CommunicationSerie communicationSerie, bool afficherAccueil = true)
        {
            InitializeComponent();
            this.communicationSerie = communicationSerie;

            this.FormBorderStyle = FormBorderStyle.None;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Size = new Size(1000, 735);

            this.panel_background = new Panel();
            this.panel_background.Dock = DockStyle.Fill;

            this.pictureBox_acceuil = new PictureBox();
            this.pictureBox_acceuil.Location = new Point(LOCATION_X_BOUTON_ACCUEIL, LOCATION_Y_BOUTON_ACCUEIL);
            this.pictureBox_acceuil.Size = new Size(LARGEUR_BOUTON_ACCUEIL, HAUTEUR_BOUTON_ACCUEIL);

            if (!afficherAccueil)
                this.pictureBox_acceuil.Visible = false;

            this.pictureBox_boutonEnvoyer = new PictureBox();
            this.pictureBox_boutonEnvoyer.Size = new Size(LARGEUR_BOUTON_ENVOYER, HAUTEUR_BOUTON_ENVOYER);

            this.labelSomme = new Label();
            this.labelSomme.BackColor = Color.Transparent;
            this.labelSomme.Font = new Font("Microsoft Sans Serif", 18);
            this.labelSomme.Text = "0";

            this.listeDePictureBox = new List<PictureBoxAvecEtatClickEtNumeroPuissanceDeDeux>();

            this.Load += new EventHandler(onLoad);
        }
예제 #2
0
        public IHM_Carrefour(CommunicationSerie communicationSerie, bool afficherAccueil = true)
        {
            InitializeComponent();

            this.communicationSerie = communicationSerie;

            this.backgroundWorker = new BackgroundWorker();
            this.backgroundWorker.WorkerSupportsCancellation = true;
            this.backgroundWorker.WorkerReportsProgress = true;
            this.backgroundWorker.DoWork += new DoWorkEventHandler(backgroundWorker_lancerSequence);
            this.backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker_allumerElement);
            this.backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker_sequenceFinie);


            this.button_jour.Click += new EventHandler(button_jour_Click);
            this.button_nuit.Click += new EventHandler(button_nuit_Click);
            this.button_complet.Click += new EventHandler(button_complet_Click);

            this.pictureBox_ajouterLigneJour.Click += new EventHandler(pictureBox_ajouterLigneJour_Click);
            this.pictureBox_ajouterLigneNuit.Click += new EventHandler(pictureBox_ajouterLigneNuit_Click);
            this.pictureBox_supprimerLigneJour.Click += new EventHandler(pictureBox_supprimerLigneJour_Click);
            this.pictureBox_supprimerLigneNuit.Click += new EventHandler(pictureBox_supprimerLigneNuit_Click);

            this.estLance = false;
            this.fenetreDoitEtreFermee = false;

            if (!afficherAccueil)
                this.pictureBox_accueil.Visible = false;
        }
        public IHM_LED_allumerUnOuPlusieursElements(CommunicationSerie communicationSerie, bool afficherAccueil = true) : base (communicationSerie, afficherAccueil)
        {
            InitializeComponent();

            this.pictureBox_boutonEnvoyer.Location = new Point(LOCATION_X_BOUTON_ENVOYER, LOCATION_Y_BOUTON_ENVOYER);

            for (int i = 0; i < 8; i++)
                this.listeDePictureBox.Add(new PictureBoxLED(new Point(DEMARRAGE_X_PICTUREBOX_LED + i * (PictureBoxLED.LARGEUR_IMAGE_LED + ESPACEMENT_ENTRE_DEUX_LED),280), 7 - i));
        }
 public Form_AfficheurDeSujet(Sujet sujet, CommunicationSerie communicationSerie, FenetrePrincipale parent)
 {
     InitializeComponent();
     this.sujet = sujet;
     this.indiceEtapeCourante = 0;
     this.fenetreCourante = null;
     this.communicationSerie = communicationSerie;
     this.parent = parent;
     this.laFermetureEstUnChoix = true;
 }
예제 #5
0
        public InterfaceCarrefour(CommunicationSerie c) : base(c)
        {
            this.Controls.Add(this.panel_background);
            this.FormBorderStyle = FormBorderStyle.None;
            this.StartPosition = FormStartPosition.CenterScreen;

            this.labelEnvoyerUneListeDeValeurs = new Label();
            this.labelCreerUnAlgorithme = new Label();
            this.listeDeLabels.Add(this.labelEnvoyerUneListeDeValeurs);
            this.listeDeLabels.Add(labelCreerUnAlgorithme);

            this.Load += new EventHandler(a_Load);
        }
예제 #6
0
        public InterfaceLED(CommunicationSerie communicationSerie) : base(communicationSerie)
        {
            InitializeComponent();

            this.labelAllumerUnElement = new Label();
            this.labelAllumerPlusieursElements = new Label();
            this.labelEnvoyerListeDeValeur = new Label();
            this.labelCreerUnAlgorithme = new Label();

            this.listeDeLabels.Add(this.labelAllumerUnElement);
            this.listeDeLabels.Add(this.labelAllumerPlusieursElements);
            this.listeDeLabels.Add(this.labelEnvoyerListeDeValeur);
            this.listeDeLabels.Add(this.labelCreerUnAlgorithme);
        }
        public IHM_afficheur_allumerUnOuPlusieursElements(CommunicationSerie communicationSerie, bool afficherAccueil) : base(communicationSerie, afficherAccueil)
        {
            InitializeComponent();

            this.pictureBox_boutonEnvoyer.Location = new Point(LOCATION_X_BOUTON_ENVOYER, LOCATION_Y_BOUTON_ENVOYER);


            this.listeDePictureBox.Add(new PictureBoxSegment(new Point(ALLIGNEMENT_SUR_X_DES_SEGMENTS_HORIZONTAUX, 192), 0, Orientation.Horizontal));
            this.listeDePictureBox.Add(new PictureBoxSegment(new Point(ALLIGNEMENT_SUR_X_DES_SEGMENTS_HORIZONTAUX, 377), 6, Orientation.Horizontal));
            this.listeDePictureBox.Add(new PictureBoxSegment(new Point(ALLIGNEMENT_SUR_X_DES_SEGMENTS_HORIZONTAUX, 561), 3, Orientation.Horizontal));

            this.listeDePictureBox.Add(new PictureBoxSegment(new Point(ALLIGNEMENT_SUR_X_DES_SEGMENTS_VERTICAUX_COLONNE_1, 235), 5, Orientation.Vertical));
            this.listeDePictureBox.Add(new PictureBoxSegment(new Point(ALLIGNEMENT_SUR_X_DES_SEGMENTS_VERTICAUX_COLONNE_1, 419), 4, Orientation.Vertical));

            this.listeDePictureBox.Add(new PictureBoxSegment(new Point(ALLIGNEMENT_SUR_X_DES_SEGMENTS_VERTICAUX_COLONNE_2, 235), 1, Orientation.Vertical));
            this.listeDePictureBox.Add(new PictureBoxSegment(new Point(ALLIGNEMENT_SUR_X_DES_SEGMENTS_VERTICAUX_COLONNE_2, 419), 2, Orientation.Vertical));
        }
예제 #8
0
        public IHM_algorithme(CommunicationSerie communicationSerie, bool afficherAccueil = true)
        {
            InitializeComponent();

            this.backgroundWorker = new BackgroundWorker();
            this.backgroundWorker.WorkerReportsProgress = false;
            this.backgroundWorker.WorkerSupportsCancellation = true;
            this.backgroundWorker.DoWork += new DoWorkEventHandler(bwProgress_DoWork);

            this.algorithme = new Algorithme2(this, this.backgroundWorker);
            this.communicationSerie = communicationSerie;

            this.estLance = false;
            this.fenetreDoitEtreFermee = false;

            this.listeDesLabelsDInstruction = new List<Label>();
            this.listeDesLabelsDEdition = new List<Label>();
            this.listeDesLabelsDeVariables = new List<Label>();

            this.listeDesLabelsDeVariables.Add(this.label_ajouterVariable);
            this.listeDesLabelsDeVariables.Add(this.label_supprimerVariable);

            this.listeDesLabelsDEdition.Add(this.label_supprimerBloc);
            this.listeDesLabelsDEdition.Add(this.label_ajouterLigne);

            this.listeDesLabelsDInstruction.Add(this.label_affecterVariable);
            this.listeDesLabelsDInstruction.Add(this.label_ajouterSi);
            this.listeDesLabelsDInstruction.Add(this.label_ajouterTantQue);
            this.listeDesLabelsDInstruction.Add(this.label_lireVariable);
            this.listeDesLabelsDInstruction.Add(this.label_envoyerValeur);

            this.activerDesactiverTousLesBoutonsDInstruction(false);
            this.activerDesactiverTousLesBoutonsDEdition(true, false);
            //this.bwProgress.ProgressChanged += new ProgressChangedEventHandler(bwProgress_ProgressChanged);
            this.backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker_RunWorkerCompleted);

            if (!afficherAccueil)
                this.pictureBox_accueil.Visible = false;
        }
        public IHM_EnvoyerListeDeValeurs(CommunicationSerie communicationSerie, bool afficherAccueil = true)
        {
            InitializeComponent();
            this.communicationSerie = communicationSerie;
            this.communicationSerie.envoyerDonnees(GenerateurDePaquet.eteindreTout());

            this.backgroundWorker = new BackgroundWorker();
            this.backgroundWorker.WorkerSupportsCancellation = true;
            this.backgroundWorker.WorkerReportsProgress = true;
            this.backgroundWorker.DoWork += new DoWorkEventHandler(backgroundWorker_lancerSequence);
            this.backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker_allumerElement);
            this.backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker_sequenceFinie);

            this.pictureBox_ajouterLigne.Click += new EventHandler(pictureBox_ajouterLigne_Click);
            this.pictureBox_supprimerLigne.Click += new EventHandler(pictureBox_supprimerLigne_Click);
            this.pictureBox_lancerLaSequence.Click += new EventHandler(pictureBox_lancerLaSequence_Click);

            if (!afficherAccueil)
                this.pictureBox_accueil.Visible = false;

            this.fenetreDoitEtreFermee = false;
            this.estLance = false;
        }
        public InterfaceDePresentationDeModule(CommunicationSerie communicationSerie)
        {
            this.communicationSerie = communicationSerie;

            this.listeDeLabels = new List<Label>();

            this.Size = new Size(LARGEUR_FENETRE, HAUTEUR_FENETRE);
            this.StartPosition = FormStartPosition.CenterScreen;

            this.pictureBox_accueil = new PictureBox();
            this.pictureBox_accueil.Location = new Point(POSITION_X_PICTUREBOX_ACCUEIL, POSITION_Y_PICTUREBOX_ACCUEIL);
            this.pictureBox_accueil.Size = new Size(LARGEUR_PICTUREBOX_ACCUEIL, HAUTEUR_PICTUREBOX_ACCUEIL);
            this.pictureBox_accueil.Image = Image.FromFile(Form_principale.cheminDossier + "abeille_accueil.png");
            this.pictureBox_accueil.Click += new EventHandler(pictureBoxAccueilClick);

            this.panel_background = new Panel();
            this.panel_background.Dock = DockStyle.Fill;
            this.panel_background.Location = new Point(0, 0);
            this.panel_background.Size = new Size(1000, 735);

            this.panel_background.Controls.Add(this.pictureBox_accueil);

            this.ShowInTaskbar = false;
        }
예제 #11
0
 public Form_principale()
 {
     InitializeComponent();
     this.communicationSerie = new CommunicationSerie();
 }
 public IHM_LED_allumerPlusieursElements(CommunicationSerie communicationSerie, bool afficherAccueil = true) : base (communicationSerie, afficherAccueil)
 {
     this.panel_background.BackgroundImage = Image.FromFile(Form_principale.cheminDossier + "Allumer_2_LEDs_rectangle.png");
 }
예제 #13
0
 private void clickSurBoutonDeLancement(CommunicationSerie.modes mode, Control control)
 {
     if (!this.estLance)
     {
         this.modeSelectionne = mode;
         this.verrouillerTousLesComposantsSauf(control);
         this.backgroundWorker.RunWorkerAsync();
         this.estLance = true;
     }
     else
     {
         this.backgroundWorker.CancelAsync();
     }
 }
 public IHM_afficheur_allumerUnElement(CommunicationSerie communicationSerie, bool afficherAccueil = true) : base(communicationSerie, afficherAccueil)
 {
     this.panel_background.BackgroundImage = Image.FromFile(Form_principale.cheminDossier + "Allumer_1_segment_rectangle.png");
 }