90 lines
1.9 KiB
C#
90 lines
1.9 KiB
C#
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
|
|
|
|
private bool _Visible = true;
|
|
private PictureBox _Hebergeur;
|
|
private Color _Fond = Color.Blue;
|
|
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;
|
|
}
|
|
|
|
public BaseDessin(PictureBox hebergeur, Color crayon, Color Fond) : this(hebergeur)
|
|
{
|
|
Crayon = crayon;
|
|
this.Fond = Fond;
|
|
}
|
|
#endregion
|
|
|
|
#region Accesseurs
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
#endregion
|
|
}
|
|
}
|