Ejemplo n.º 1
0
        /// <summary>
        /// This funtion use for test
        /// </summary>
        private void DrawTest2D()
        {
            #region "Test Put Pixel"
            //Point p1 = new Point(0, 0);
            //Point p2 = new Point(1, 1);
            //Point p3 = new Point(-1, 1);
            //Point p4 = new Point(-1, -1);
            //Point p5 = new Point(1, -1);

            //clsHelperControl.PutPixel(p1, Color.Red);
            //clsHelperControl.PutPixel(p2, Color.Red);
            //clsHelperControl.PutPixel(p3, Color.Red);
            //clsHelperControl.PutPixel(p4, Color.Red);
            //clsHelperControl.PutPixel(p5, Color.Red);

            #endregion

            #region "Test Doan Thang "

            //DoanThang a = new DoanThang(new Point(0, 0), new Point(0, 5), Color.Red, new NetVeLienMach());
            //DoanThang b = new DoanThang(new Point(-1, -1), new Point(-5, -3), Color.Blue, new NetVeLienMach());
            //DoanThang c = new DoanThang(new Point(-5, 6), new Point(5, -6), Color.Red, new NetVeLienMach());
            //DoanThang d = new DoanThang(new Point(-5, -5), new Point(0, 0), Color.Blue, new NetVeLienMach());

            //a.VeHinh();
            //b.VeHinh();
            //c.VeHinh();
            //d.VeHinh();
            #endregion

            #region "Ve hinh tron"
            HinhTron ht1 = new HinhTron(new Point(0, 0), 20, Color.Blue, new NetVeLienMach());
            ht1.VeHinh();
            #endregion
        }
Ejemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form1.hinh = 4;
     hinhtron   = new HinhTron();
     hinhtron.ShowDialog();
     if (hinhtron.checkchange == false)
     {
         return;
     }
     hinhtron.ht.Midpoint_htron_dut(this.JpnLuoiGiaoDien.CreateGraphics());
     labelChange();
 }
Ejemplo n.º 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     xoahinh();
     Form1.hinh = 4;
     hinhtron   = new HinhTron();
     if (hinhtron.ShowDialog() == DialogResult.Cancel)
     {
         Form1.hinh = -1;
     }
     if (hinhtron.checkchange == false)
     {
         return;
     }
     hinhtron.ht.Midpoint_htron(this.JpnLuoiGiaoDien.CreateGraphics(), color);
     labelChange();
 }