void HienThiFormTheoChucNang(chucNang cn) { if (cn == chucNang.charts) { this.lvwCharts.Visible = true; this.lblTitle.Text = "TOP 10"; //Get top 10 List <LuotChoi> lst = getData.GetLuotChoiCoKetQua(); LoadListView(lst); } else // (cn == chucNang.rule) { this.lvwCharts.Visible = false; this.lblTitle.Text = "Quy tắc chơi"; //Thêm richtextbox hiển thi quy tắc chơi RichTextBox rtxtRule = new RichTextBox(); rtxtRule.Location = lvwCharts.Location; rtxtRule.Font = new Font("Segoe Print", 12F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0))); rtxtRule.ReadOnly = true; rtxtRule.ScrollBars = RichTextBoxScrollBars.Vertical; rtxtRule.Size = lvwCharts.Size; pnlFill.Controls.Add(rtxtRule); string str = GetNoiDungQuyTacChoi(); if (str != null) { rtxtRule.Text = str; } } }
public frmShow(byte cn) { InitializeComponent(); getData = new GetDAL(); chucnangs = (chucNang)cn; }