Ejemplo n.º 1
0
 // Gan cac gia tri cho m_Shape
 private void Gan(CShape shape)
 {
     shape.SetDrawMode(GDI.R2_NOTXORPEN);
     shape.SetWidth(int.Parse(tcmbWidth.SelectedItem.ToString()));
     shape.SetPenStyle(Chon(tcmbPenStyle.SelectedItem.ToString()));
     shape.SetColor(_RGB(m_R, m_G, m_B));
 }
Ejemplo n.º 2
0
 private void tButPolygon_Click(object sender, EventArgs e)
 {
     UnChecked();
     tButPolygon.Checked = true;
     Xoa();
     flag    = false;
     m_Shape = new CPolygon();
     m_Shape.SetWidth(int.Parse(tcmbWidth.SelectedItem.ToString()));
     m_Shape.SetPenStyle(Chon(tcmbPenStyle.SelectedItem.ToString()));
     m_Shape.SetColor(_RGB(m_R, m_G, m_B));
 }
Ejemplo n.º 3
0
        private void tcmbWidth_SelectedIndexChanged(object sender, EventArgs e)
        {
/*            ++dem;
 *          toolStripLabel2.Text = dem.ToString();
 *
 *          if (flag)
 *          {
 *              HDC hdc = (HDC)User.GetDC(panel1.Handle);
 *              POINT[] T = new POINT[2];
 *              T[0] = m_Start;
 *              T[1] = m_End;
 *
 *              flag1 = true;
 *              m_Shape.SetPoints(T);
 *              m_Shape.Draw(hdc);
 *              User.ReleaseDC(panel1.Handle, hdc);
 *          }
 */         m_Shape.SetWidth(int.Parse(tcmbWidth.SelectedItem.ToString()));
        }