Winform datagridview画斜线表头

       ///         /// 画斜线表头         ///         ///         ///         ///

      

  ///


        /// 画斜线表头
        ///

        ///
        ///
        ///
        ///
        void PaintLine(DataGridViewCellPaintingEventArgs e, string type, string name1, string name2)
        {          
            if ((type == "1" && e.ColumnIndex == 1 && e.RowIndex == -1) || (e.ColumnIndex == 0 && e.RowIndex == -1 && type == "2"))
            {
                Graphics gp = e.Graphics;
                Rectangle rec = e.CellBounds;
                Brush gridBrus