コード例 #1
0
        private void HinhTruProperties_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            string[] str        = e.PropertyName.Split(',');
            int      x          = Int16.Parse(str[0]),
                     y          = Int16.Parse(str[1]),
                     z          = Int16.Parse(str[2]),
                     chieuCao   = Int16.Parse(str[3]),
                     banKinhDay = Int16.Parse(str[4]);

            hinhTru = new HinhTru(x, y, z, chieuCao, banKinhDay);

            picb_3DArea.Refresh();
            hinhTru.Draw(picb_3DArea.CreateGraphics());
        }
コード例 #2
0
        private void Picb_3DArea_Paint(object sender, PaintEventArgs e)
        {
            VeLuoi3D(e.Graphics);

            //HinhHopChuNhat hinhHopChuNhat = new HinhHopChuNhat(-10, -10, 0, 20, 20, 20);
            //hinhHopChuNhat.Draw(e.Graphics);


            //HinhTru hinhTru = new HinhTru(10, -10, 0, 30, 40);
            if (hinhTruProperties.Visible == true)
            {
                hinhTru.Draw(e.Graphics);
                hinhTruProperties.Dinh = hinhTru.TamDay;
            }
            if (hinhHopChuNhatProperties.Visible == true)
            {
                hinhHopChuNhat.Draw(e.Graphics);
                hinhHopChuNhatProperties.Dinh = hinhHopChuNhat.Dinh;
            }
            //hinhTru.DrawElip(e.Graphics);
        }