2018-01-03 13:18:01 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
using System.Drawing;
|
2018-01-03 13:18:01 +01:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
using System.Windows.Forms;
|
2018-01-03 13:18:01 +01:00
|
|
|
|
|
|
|
|
|
namespace Bonhomme02
|
|
|
|
|
{
|
|
|
|
|
class Bonhomme : Peau
|
|
|
|
|
{
|
2018-01-09 13:49:11 +01:00
|
|
|
|
public Tete tete;
|
2018-01-05 16:28:13 +01:00
|
|
|
|
public Jambe jambe1, jambe2;
|
|
|
|
|
public Bras bras;
|
2018-01-09 20:19:49 +01:00
|
|
|
|
public PictureBox conteneur;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
|
|
|
|
|
public Bonhomme() : base()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-09 20:19:49 +01:00
|
|
|
|
public Bonhomme(ref PictureBox hebergeur) : base( hebergeur)
|
2018-01-05 15:29:45 +01:00
|
|
|
|
{
|
2018-01-09 20:19:49 +01:00
|
|
|
|
this.conteneur = hebergeur;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
}
|
2018-01-09 20:19:49 +01:00
|
|
|
|
public Bonhomme(ref PictureBox hebergeur, double lg, double ep, double angle) : base( hebergeur, lg, ep, angle)
|
2018-01-05 15:29:45 +01:00
|
|
|
|
{
|
2018-01-09 20:19:49 +01:00
|
|
|
|
this.conteneur = hebergeur;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
}
|
2018-01-09 20:19:49 +01:00
|
|
|
|
public Bonhomme(ref PictureBox hebergeur, int xy) : base( hebergeur, xy)
|
2018-01-05 15:29:45 +01:00
|
|
|
|
{
|
2018-01-09 20:19:49 +01:00
|
|
|
|
this.conteneur = hebergeur;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
}
|
|
|
|
|
|
2018-01-09 20:19:49 +01:00
|
|
|
|
public Bonhomme(ref PictureBox hebergeur, int x, int y, double lg, double ep, double angle) : base( hebergeur, x, y, lg, ep, angle)
|
2018-01-05 15:29:45 +01:00
|
|
|
|
{
|
2018-01-09 20:19:49 +01:00
|
|
|
|
this.conteneur = hebergeur;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
Peau me = this;
|
2018-01-11 14:33:44 +01:00
|
|
|
|
jambe1 = new Jambe(hebergeur, ref me, lg, ep/4, Math.PI / 2);
|
|
|
|
|
jambe2 = new Jambe(hebergeur, ref me, lg, ep / 4, Math.PI / 2);
|
|
|
|
|
tete = new Tete(hebergeur, ref me, (int)(ep*3.5/4));
|
2018-01-05 16:28:13 +01:00
|
|
|
|
bras = new Bras(hebergeur, ref me, lg, ep/4, Math.PI / 2);
|
2018-01-05 15:29:45 +01:00
|
|
|
|
}
|
2018-01-09 20:19:49 +01:00
|
|
|
|
public Bonhomme(ref PictureBox hebergeur, ref Peau parent, double lg, double ep, double angle) : base( hebergeur, ref parent, lg, ep, angle)
|
2018-01-05 15:29:45 +01:00
|
|
|
|
{
|
2018-01-09 20:19:49 +01:00
|
|
|
|
this.conteneur = hebergeur;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
}
|
|
|
|
|
public new void Afficher(IntPtr handle)
|
|
|
|
|
{
|
|
|
|
|
base.Afficher(handle);
|
|
|
|
|
tete.Afficher(handle);
|
2018-01-05 16:28:13 +01:00
|
|
|
|
jambe1.Afficher(handle);
|
|
|
|
|
jambe2.Afficher(handle);
|
|
|
|
|
bras.Afficher(handle);
|
2018-01-05 15:29:45 +01:00
|
|
|
|
}
|
2018-01-09 20:19:49 +01:00
|
|
|
|
public new void Afficher(Graphics gr)
|
|
|
|
|
{
|
|
|
|
|
base.Afficher(gr);
|
|
|
|
|
tete.Afficher(gr);
|
|
|
|
|
jambe1.Afficher(gr);
|
|
|
|
|
jambe2.Afficher(gr);
|
|
|
|
|
bras.Afficher(gr);
|
|
|
|
|
}
|
|
|
|
|
public void Afficher()
|
|
|
|
|
{
|
|
|
|
|
Afficher(conteneur.Handle);
|
|
|
|
|
}
|
|
|
|
|
public new void Cacher(Graphics gr)
|
|
|
|
|
{
|
|
|
|
|
base.Cacher(gr);
|
|
|
|
|
tete.Cacher(gr);
|
|
|
|
|
jambe1.Cacher(gr);
|
|
|
|
|
jambe2.Cacher(gr);
|
|
|
|
|
bras.Cacher(gr);
|
|
|
|
|
}
|
|
|
|
|
public void Cacher()
|
2018-01-05 15:29:45 +01:00
|
|
|
|
{
|
2018-01-09 20:19:49 +01:00
|
|
|
|
Cacher(conteneur.Handle);
|
2018-01-05 15:29:45 +01:00
|
|
|
|
}
|
2018-01-06 16:56:46 +01:00
|
|
|
|
public void InterevrtirJambe()
|
|
|
|
|
{
|
|
|
|
|
Jambe tmp;
|
|
|
|
|
tmp = jambe1;
|
|
|
|
|
jambe1 = jambe2;
|
|
|
|
|
jambe2 = tmp;
|
|
|
|
|
}
|
2018-01-03 13:18:01 +01:00
|
|
|
|
}
|
|
|
|
|
}
|