//根据选择的开始节数显示将结束的节数 private void uclpVerseNumberBeginSelected(object sender, EventArgs e) { this.Controls.Remove(uclpVerseNumberEnd); _iVerseNumberBegin = int.Parse(((LinkLabel)sender).Tag.ToString()); int iMaxVerseNum = BibleHelper.GetVerseCountByVolumeSNAndChapterSN(BibleHelper.GetVolumeSNbyFullName(_strVolumeName), _iChapterNumber); string strTemp = _strVolumeName + " " + _iChapterNumber + ":" + _iVerseNumberBegin; ShowLectionByVolumeNameEtc(strTemp, false); //添加到经文列表中 _formControl.listViewLectionList.Items.Add(new ListViewItem(new string[] { (_formControl.listViewLectionList.Items.Count + 1).ToString(), strTemp })); //如果没有结束经文,则直接显示经文 if ((iMaxVerseNum - _iVerseNumberBegin) <= 0) { } else { string[,] strArray = new string[iMaxVerseNum - _iVerseNumberBegin, 2]; for (int i = 0; i < iMaxVerseNum - _iVerseNumberBegin; i++) { strArray[i, 0] = "->" + (i + 1 + _iVerseNumberBegin).ToString() + "节"; strArray[i, 1] = (i + 1 + _iVerseNumberBegin).ToString(); } if (this.Controls.Contains(uclpVerseNumberEnd)) { this.Controls.Remove(uclpVerseNumberEnd); } uclpVerseNumberEnd.LoadData(strArray); this.Controls.Add(uclpVerseNumberEnd); if (_iMouseScreenX + 20 < uclpVerseNumberBegin.Right && _iMouseScreenX + 20 > uclpVerseNumberBegin.Left) { uclpVerseNumberEnd.Left = _iMouseScreenX + 20; } else { uclpVerseNumberEnd.Left = uclpVerseNumberBegin.Right + 0; } uclpVerseNumberEnd.Top = 22; uclpVerseNumberEnd.BringToFront(); this.Refresh(); } }
private void ShowFullNameList(bool bNewOrOld) { string strTemp = BibleHelper.GetFullNameListByNewOrOld(bNewOrOld); if (strTemp.Contains('|')) { string[] strArray1 = strTemp.Split('|'); int iVolume = strArray1.Length; //iVolume += 2; //切换新旧约的按钮 string[,] strArray2 = new string[iVolume, 2]; for (int i = 0; i < iVolume; i++) { strArray2[i, 0] = strArray1[i]; strArray2[i, 1] = strArray1[i]; } if (this.Controls.Contains(uclpChapterNumber)) { this.Controls.Remove(uclpChapterNumber); } uclpVolumeName.LoadData(strArray2); this.Controls.Add(uclpVolumeName); uclpVolumeName.BringToFront(); uclpVolumeName.Left = 0; uclpVolumeName.Top = 22; buttonOldTestament.Left = 0; buttonOldTestament.Top = 0; buttonNewTestament.Left = buttonOldTestament.Right; buttonNewTestament.Top = 0; buttonNewTestament.Visible = true; buttonOldTestament.Visible = true; buttonNewTestament.BringToFront(); buttonOldTestament.BringToFront(); } this.Refresh(); }
private void uclpVolumeNameSelected(object sender, EventArgs e) { this.Controls.Remove(uclpChapterNumber); this.Controls.Remove(uclpVerseNumberBegin); this.Controls.Remove(uclpVerseNumberEnd); _strVolumeName = ((LinkLabel)sender).Tag.ToString(); int iMaxChapterNum = BibleHelper.GetChapterCountByVolumeSN(BibleHelper.GetVolumeSNbyFullName(_strVolumeName)); string[,] strArray = new string[iMaxChapterNum, 2]; for (int i = 0; i < iMaxChapterNum; i++) { strArray[i, 0] = (i + 1).ToString() + "章"; strArray[i, 1] = (i + 1).ToString(); } if (this.Controls.Contains(uclpChapterNumber)) { this.Controls.Remove(uclpChapterNumber); } uclpChapterNumber.LoadData(strArray); this.Controls.Add(uclpChapterNumber); if (_iMouseScreenX + 20 < uclpVolumeName.Right && _iMouseScreenX + 20 > uclpVolumeName.Left) { uclpChapterNumber.Left = _iMouseScreenX + 20; } else { uclpChapterNumber.Left = uclpVolumeName.Right + 0; } uclpChapterNumber.Top = 22; uclpChapterNumber.BringToFront(); this.Refresh(); }