public string GetPrevNextRecPath(string strStyle) { if (_recpaths.Count == 0) { return(""); } while (true) { if (strStyle == "prev") { _currentIndex--; } else { _currentIndex++; } if (_currentIndex >= _recpaths.Count || _currentIndex < 0) { return(""); } string recpath = _recpaths[_currentIndex]; // 遇到 Z39.50 命令行,要跳过去 if (BiblioSearchForm.IsCmdLine(recpath) == false) { return(recpath); } } }
private void button_OK_Click(object sender, EventArgs e) { this.button_OK.Enabled = false; if (this.listView_records.SelectedItems.Count == 0) { MessageBox.Show(this, "尚未选择事项"); this.button_OK.Enabled = true; return; } if (this.listView_records.SelectedItems.Count == 1) { string strPath = this.listView_records.SelectedItems[0].SubItems[0].Text; if (this.LoadNext != null && BiblioSearchForm.IsCmdLine(strPath)) { LoadNextBatchEventArgs e1 = new LoadNextBatchEventArgs { All = false }; this.LoadNext(this, e1); this.button_OK.Enabled = true; return; } } OnLoadDetail(); this.DialogResult = DialogResult.OK; this.Close(); }
/* * private void listView_records_DoubleClick(object sender, EventArgs e) * { * OnLoadDetail(); * * this.DialogResult = DialogResult.OK; * this.Close(); * } */ string GetFirstRecordPath() { foreach (ListViewItem item in this.listView_records.Items) { var path = item.Text; if (BiblioSearchForm.IsCmdLine(path)) { continue; } return(path); } return(null); }
public string GetPrevNextRecPath(string strStyle) { REDO: ListViewItem item = BiblioSearchForm.MoveSelectedItem(this.listView_records, strStyle); if (item == null) { return(""); } string text = ListViewUtil.GetItemText(item, 0); // 遇到 Z39.50 命令行,要跳过去 if (BiblioSearchForm.IsCmdLine(text)) { goto REDO; } return(text); }
private void listView_records_MouseUp(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right) { return; } ContextMenu contextMenu = new ContextMenu(); MenuItem menuItem = null; int nSelectedItemCount = this.listView_records.SelectedItems.Count; string strFirstColumn = ""; if (nSelectedItemCount > 0) { strFirstColumn = ListViewUtil.GetItemText(this.listView_records.SelectedItems[0], 0); } if (nSelectedItemCount == 1 && BiblioSearchForm.IsCmdLine(strFirstColumn)) { CommandPopupMenu(sender, e); return; } }