public void LoadOpenData(ConfigurationStatus.OpenData pData) { List <string> codeList = pData.CodeList; this.SetCodeImage(this.Lbl_CurrentCode1, codeList[0]); this.SetCodeImage(this.Lbl_CurrentCode2, codeList[1]); this.SetCodeImage(this.Lbl_CurrentCode3, codeList[2]); this.SetCodeImage(this.Lbl_CurrentCode4, codeList[3]); this.SetCodeImage(this.Lbl_CurrentCode5, codeList[4]); this.SetCodeImage(this.Lbl_CurrentCode6, codeList[5]); this.SetCodeImage(this.Lbl_CurrentCode7, codeList[6]); this.SetCodeImage(this.Lbl_CurrentCode8, codeList[7]); this.SetCodeImage(this.Lbl_CurrentCode9, codeList[8]); this.SetCodeImage(this.Lbl_CurrentCode10, codeList[9]); string pNum = (Convert.ToInt32(codeList[0]) + Convert.ToInt32(codeList[1])).ToString(); this.Lbl_GYH1.Text = pNum; this.Lbl_GYH2.Text = CommFunc.CountDX(pNum, 11); this.Lbl_GYH3.Text = CommFunc.CountDS(pNum); for (int i = 0; i < 5; i++) { this.LableList[3 + i].Text = CommFunc.CountLH(codeList[i], codeList[9 - i]); } foreach (Label label in this.LableList) { if (this.RedTextList.Contains(label.Text)) { label.ForeColor = AppInfo.redForeColor; } else { label.ForeColor = AppInfo.blackColor; } } }
public void RefreshNewData(ConfigurationStatus.OpenData pData) { string expect = pData.Expect; this.Lbl_CurrentExpect.Text = $"{this.Hint} 第 {expect} 期"; List <string> codeList = this.GetCodeList(pData.Code); this.Lbl_CurrentCode1.Text = codeList[0]; this.Lbl_CurrentCode2.Text = codeList[1]; this.Lbl_CurrentCode3.Text = codeList[2]; if (codeList.Count > 3) { this.Lbl_CurrentCode4.Text = codeList[3]; this.Lbl_CurrentCode5.Text = codeList[4]; } }