2018-01-03 13:18:01 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace Bonhomme02
|
|
|
|
|
{
|
|
|
|
|
class BaseDessin
|
|
|
|
|
{
|
|
|
|
|
#region Données membres
|
2018-01-05 15:45:35 +01:00
|
|
|
|
|
2018-01-03 13:18:01 +01:00
|
|
|
|
private bool _Visible = true;
|
|
|
|
|
private PictureBox _Hebergeur;
|
2018-01-05 15:29:45 +01:00
|
|
|
|
private Color _Fond = Color.Blue;
|
2018-01-03 13:18:01 +01:00
|
|
|
|
private Color _Crayon = Color.Black;
|
|
|
|
|
private Boolean remplir = true;
|
|
|
|
|
public double eppaisseurContour = 5;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Constructeurs
|
|
|
|
|
public BaseDessin()
|
|
|
|
|
{
|
|
|
|
|
this._Hebergeur = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BaseDessin(PictureBox hebergeur)
|
|
|
|
|
{
|
|
|
|
|
this._Hebergeur = hebergeur;
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-05 15:45:35 +01:00
|
|
|
|
public BaseDessin(PictureBox hebergeur, Color crayon, Color Fond) : this(hebergeur)
|
2018-01-03 13:18:01 +01:00
|
|
|
|
{
|
|
|
|
|
Crayon = crayon;
|
2018-01-05 15:45:35 +01:00
|
|
|
|
this.Fond = Fond;
|
2018-01-03 13:18:01 +01:00
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Accesseurs
|
2018-01-05 15:45:35 +01:00
|
|
|
|
|
2018-01-05 01:51:12 +01:00
|
|
|
|
|
2018-01-05 15:45:35 +01:00
|
|
|
|
|
2018-01-03 13:18:01 +01:00
|
|
|
|
|
|
|
|
|
public bool Visible
|
|
|
|
|
{
|
|
|
|
|
get { return _Visible; }
|
|
|
|
|
set { _Visible = value; }
|
|
|
|
|
}
|
|
|
|
|
public bool Remplir
|
|
|
|
|
{
|
|
|
|
|
get { return remplir; }
|
|
|
|
|
set { remplir = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Color Fond
|
|
|
|
|
{
|
|
|
|
|
get { return _Fond; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
try { _Fond = value; }
|
|
|
|
|
catch (Exception e) { Console.WriteLine("Erreur couleur invalide : " + e.ToString());}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Color Crayon
|
|
|
|
|
{
|
|
|
|
|
get { return _Crayon; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
try { _Crayon = value; }
|
|
|
|
|
catch (Exception e) { Console.WriteLine("Erreur couleur invalide : " + e.ToString()); }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public PictureBox Hebergeur
|
|
|
|
|
{
|
|
|
|
|
get { return _Hebergeur; }
|
|
|
|
|
set { _Hebergeur = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Méthodes
|
2018-01-05 15:45:35 +01:00
|
|
|
|
|
2018-01-03 13:18:01 +01:00
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|