示例#1
0
 public SchetsControl()
 {
     this.BorderStyle = BorderStyle.Fixed3D;
     this.schets = new Schets();
     this.Paint += this.teken;
     this.Resize += this.veranderAfmeting;
     this.veranderAfmeting(null, null);
 }
 public SchetsControl()
 {
     this.BorderStyle = BorderStyle.Fixed3D;
     this.BackColor = Color.White;
     this.schets = new Schets();
     this.Paint += this.teken;
     this.ResizeRedraw = true;
     this.DoubleBuffered = true;
 }
示例#3
0
 public SchetsControl()
 {
     this.BorderStyle = BorderStyle.Fixed3D;
     this.schets      = new Schets();
     this.Paint      += this.teken;
     this.Resize     += this.veranderAfmeting;
     this.veranderAfmeting(null, null);
     DoubleBuffered = true;
 }
 public SchetsControl()
 {
     penkleur         = Color.Black;
     this.BorderStyle = BorderStyle.Fixed3D;
     this.schets      = new Schets();
     this.Paint      += this.teken;
     this.Resize     += this.veranderAfmeting;
     this.veranderAfmeting(null, null);
 }
示例#5
0
    public SchetsControl()
    {
        figures          = new List <Figure>(); //initializing the figures with an empty figure list
        this.BorderStyle = BorderStyle.Fixed3D;
        this.schets      = new Schets();
        this.Paint      += this.teken;

        this.Resize += this.veranderAfmeting;
        this.veranderAfmeting(null, null);
    }
示例#6
0
 public SchetsControl()
 {
     this.BorderStyle = BorderStyle.Fixed3D;
     this.schets = new Schets();
     this.Paint += this.teken;
     this.Resize += this.veranderAfmeting;
     this.veranderAfmeting(null, null);
     this.penkleur = Color.Black;
     this.acties = new Acties();
 }
示例#7
0
 public SchetsControl()
 {
     this.BorderStyle = BorderStyle.Fixed3D;
     this.schets      = new Schets();
     this.Paint      += this.teken;
     this.Resize     += this.veranderAfmeting;
     this.veranderAfmeting(null, null);
     penkleur       = Color.Black;
     schets.Changed = false; countteken = 0; countundo = 0;
 }
 public SchetsControl()
 {
     this.BorderStyle = BorderStyle.Fixed3D;
     this.DoubleBuffered = true;
     this.schets = new Schets();
     this.kleurenKiezer = new ColorDialog();
     this.Paint += this.teken;
     this.Resize += this.veranderAfmeting;
     this.veranderAfmeting(null, null);
 }
示例#9
0
        public SchetsWin()
        {
            ISchetsTool[] deTools = { new PenTool()
                                      , new LijnTool()
                                      , new RechthoekTool()
                                      , new VolRechthoekTool()
                                      , new CirkelTool()
                                      , new VolCirkelTool()
                                      , new TekstTool()
                                      , new GumTool() };

            this.ClientSize = new Size(700, 500);
            huidigeTool     = deTools[0];

            schetscontrol          = new SchetsControl();
            schetscontrol.Location = new Point(64, 10);
            schets                   = schetscontrol.Schets;
            schets.Changed           = false;
            this.FormClosing        += afsluitenx;
            schetscontrol.MouseDown += (object o, MouseEventArgs mea) =>
            { vast = true;
              huidigeTool.MuisVast(schetscontrol, mea.Location); };
            schetscontrol.MouseMove += (object o, MouseEventArgs mea) =>
            { if (vast)
              {
                  huidigeTool.MuisDrag(schetscontrol, mea.Location);
              }
            };
            schetscontrol.MouseUp += (object o, MouseEventArgs mea) =>
            { if (vast)
              {
                  huidigeTool.MuisLos(schetscontrol, mea.Location);
              }
              vast = false; };
            schetscontrol.KeyPress += (object o, KeyPressEventArgs kpea) =>
            { huidigeTool.Letter(schetscontrol, kpea.KeyChar); };
            this.Controls.Add(schetscontrol);

            menuStrip         = new MenuStrip();
            menuStrip.Visible = false;
            this.Controls.Add(menuStrip);
            this.maakFileMenu();
            this.maakToolMenu(deTools);
            this.maakAktieMenu();
            this.maakToolButtons(deTools);
            this.maakAktieButtons();
            this.Resize += this.veranderAfmeting;
            this.veranderAfmeting(null, null);
        }
示例#10
0
 public SchetsControl(List <IDrawnShape> importShapes = null)
 {
     this.BorderStyle = BorderStyle.Fixed3D;
     this.schets      = new Schets();
     this.Paint      += this.teken;
     this.Resize     += this.veranderAfmeting;
     this.veranderAfmeting(null, null);
     this.penkleur = Color.FromArgb(255, 0, 0, 0);
     sfxPlayer     = new SoundPlayer();
     cc            = new ColorConverter();
     if (importShapes != null)
     {
         drawnShapes = importShapes;
         drawShapes();
     }
 }
示例#11
0
    public SchetsControl(List <TekenObject> getekendeObjecten = null)
    {
        this.BorderStyle = BorderStyle.Fixed3D;
        this.schets      = new Schets();
        this.Paint      += this.teken;
        this.Resize     += this.veranderAfmeting;
        this.veranderAfmeting(null, null);
        if (getekendeObjecten != null)
        {
            this.getekendeObjecten = getekendeObjecten;

            foreach (iTekenObject tekenObject in getekendeObjecten)
            {
                tekenObject.Teken(this);
            }
        }
    }
示例#12
0
        //EINDE EIGEN CODE

        public SchetsControl(int[] size)
        {
            this.schets = new Schets(size);
        }
示例#13
0
 public SchetsControl(Bitmap bmp)
 {
     this.Schets = new Schets(bmp);
     initialiseerControls();
 }
示例#14
0
 public SchetsControl()
 {
     this.Schets = new Schets();
     initialiseerControls();
 }
示例#15
0
 public override void Compleet(Schets s, Point p1, Point p2)
 {
     Lijn lijn = new Lijn(kleur, p1, p2);
     s.Toevoegen(lijn);
 }
示例#16
0
 public VolRechthoekTool(Schets s) : base(s)
 {
 }
示例#17
0
 public override void Compleet(Schets s, Point p1, Point p2)
 {
     VolCirkel volcirkel = new VolCirkel(kleur, Tools.Punten2Rechthoek(p1, p2));
     s.Toevoegen(volcirkel);
 }
示例#18
0
 public override void Compleet(Schets s, Point p1, Point p2)
 {
     VolRechthoek volrechthoek = new VolRechthoek(kleur, Tools.Punten2Rechthoek(p1, p2));
     s.Toevoegen(volrechthoek);
 }
示例#19
0
        public override void Compleet(Schets s, Point p1, Point p2)
        {
            int breedte = maxX - minX + 6;
            int hoogte = maxY - minY + 6;

            Point min = new Point(minX - 3, minY - 3);
            Point max = new Point(maxX + 3, maxY + 3);

            Bitmap minibitmap = new Bitmap(breedte, hoogte);
            Graphics g = Graphics.FromImage(minibitmap);

            g.DrawImage(bitmap, 0, 0, Tools.Punten2Rechthoek(min, max), GraphicsUnit.Pixel);

            Tekening tekening = new Tekening(kleur, minibitmap, min);
            s.Toevoegen(tekening);

            bitmap.Dispose();
            BitmapGraphics.Dispose();
        }
示例#20
0
 public abstract void Compleet(Schets s, Point p1, Point p2);
示例#21
0
 public LijnTool(Schets s) : base(s)
 {
 }
示例#22
0
 public VolCirkelTool(Schets s) : base(s)
 {
 }
示例#23
0
 public StartpuntTool(Schets s)
 {
     this.schets = s;
 }
示例#24
0
 public PenTool(Schets s) : base(s)
 {
 }
示例#25
0
 public GumTool(Schets s) : base(s)
 {
 }
示例#26
0
 public TekstTool(Schets s) : base(s)
 {
 }
示例#27
0
 public TweepuntTool(Schets s) : base(s)
 {
 }