Esempio n. 1
0
 private void dgvTemShow_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
 {
     if (e.RowIndex != -1 && dgvTemShow.Columns[e.ColumnIndex].Name == "FontColor")
     {
         e.Value = PublicClass.ColorToText(dgvTemShow.Rows[e.RowIndex].Cells["FontColor"].Value.ToString());//颜色转换为汉语
     }
     else if (dgvTemShow.Columns[e.ColumnIndex].Name == "ShowStyle")
     {
         e.Value = PublicClass.AplayToText(Convert.ToInt32(dgvTemShow.Rows[e.RowIndex].Cells["ShowStyle"].Value));//播放方式转换汉语
     }
     else if (dgvTemShow.Columns[e.ColumnIndex].Name == "Tag")
     {
         e.Value = PublicClass.ConvertToState(Convert.ToInt32(dgvTemShow.Rows[e.RowIndex].Cells["Tag"].Value));
     }
     else if (dgvTemShow.Columns[e.ColumnIndex].Name == "修改")
     {
         e.Value = "修改";
     }
 }