/* * プライベートメソッド */ #region Private Method /// <summary> /// セルビューを設定する /// </summary> /// <param name="RowNo">設定するRowNo</param> /// <param name="cellView">設定するCellView</param> private void setCellView(int RowNo, EnuPlayType playtype) { int i = 0; while (i < Grid.ColumnsCount) { if (Grid[RowNo, i] != null) { if (EnuPlayType.NOPLAY == playtype) { switch (i) { default: Grid[RowNo, i].View = cellView; break; } } else { switch (i) { default: Grid[RowNo, i].View = cellViewPlaying; break; } } } i++; } }
/// <summary> /// RowNoの行にカラーを設定 /// </summary> /// <param name="color"></param> public void setRowColor(int RowNo, EnuPlayType playtype) { if (RowNo != -1) { // セルビュー作成 //CellBackColorAlternate cellView = new CellBackColorAlternate(Color.Khaki, Color.DarkKhaki); //cellView.BackColor = Color.Transparent; switch (playtype) { case EnuPlayType.NOPLAY: this.setCellView(RowNo, EnuPlayType.NOPLAY); break; case EnuPlayType.PLAYING: this.setCellView(RowNo, EnuPlayType.PLAYING); LastSelectRowNo = RowNo; break; } // 右揃え //Grid[RowNo, (int)EnuGrid.TRACK].View.TextAlignment = DevAge.Drawing.ContentAlignment.MiddleRight; //Grid[RowNo, (int)EnuGrid.PLAYCOUNT].View.TextAlignment = DevAge.Drawing.ContentAlignment.MiddleRight; Grid.Refresh(); } }