コード例 #1
0
        public void notifierActionClicDessin(int x, int y)
        {
            switch (formeActive)
            {
            case FORME.CERCLE:
                Debug.WriteLine("FORME.CERCLE");
                Cercle cercle = new Cercle(x, y, new Forme.Couleur(0, 0, 0));
                this.dessin.ajouterForme(cercle);
                this.vuePlancheDessin.afficherCercle(cercle);
                this.vuePlancheDessin.desactiverBoutonCercle();
                break;

            case FORME.CARRE:
                Debug.WriteLine("FORME.CARRE");
                Carre carre = new Carre(x, y, new Forme.Couleur(0, 0, 0));
                this.dessin.ajouterForme(carre);
                this.vuePlancheDessin.afficherCarre(carre);
                this.vuePlancheDessin.desactiverBoutonCarre();
                break;

            case FORME.TRIANGLE:
                Debug.WriteLine("FORME.TRIANGLE");
                Triangle triangle = new Triangle(x, y, new Forme.Couleur(0, 0, 0));
                this.dessin.ajouterForme(triangle);
                this.vuePlancheDessin.afficherTriangle(triangle);
                this.vuePlancheDessin.desactiverBoutonTriangle();
                break;

            default:
                Debug.WriteLine("DEFAULT");
                break;
            }

            this.formeActive = FORME.AUCUNE;
        }
コード例 #2
0
 public void notifierActionDessinerTriangle()
 {
     this.vuePlancheDessin.activerBoutonTriangle();
     this.formeActive = FORME.TRIANGLE;
 }
コード例 #3
0
 public void notifierActionDessinerCarre()
 {
     this.vuePlancheDessin.activerBoutonCarre();
     this.formeActive = FORME.CARRE;
 }
コード例 #4
0
 public void notifierActionDessinerCercle()
 {
     this.formeActive = FORME.CERCLE;
     this.vuePlancheDessin.activerBoutonCercle();
     //this.vuePlancheDessin.illuminerActionCercle();
 }