///==================================================================== /// <summary> /// Перечитать содержимое ListView /// </summary> ///==================================================================== public void ReLoad(ListView lv, Broker broker) { string glb; lv.Items.Clear(); if (null != broker.NameSpace) lv.Items.Add(".."); glb = broker.NextGlobal(""); while (glb != "") { //cbNSP.Items.Add(glb); lv.Items.Add(glb); glb = broker.NextGlobal(glb); } //lv.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); }
///==================================================================== /// <summary> /// Обработка отпускания клавиши Enter /// </summary> ///==================================================================== public void ReturnKeyUp(ListView lv, Broker broker, KeyEventArgs evnt) { ReLoad(lv, broker); }
///==================================================================== /// <summary> /// Обработка нажатия на клавишу Enter /// </summary> ///==================================================================== public void ReturnKeyDown(ListView lv, Broker brocker, KeyEventArgs evnt) { //MessageBox.Show("Enter Down"); initDataBuf(lv, brocker, _showsys); }
///==================================================================== /// <summary> /// Инициализация панели /// </summary> ///==================================================================== private void PanelInit(Broker brokerobj,ToolStripComboBox cbNSP, ListView lstview) { string nsp = brokerobj.NextGlobal(""); while (nsp != "") { cbNSP.Items.Add(nsp); lstview.Items.Add(nsp); nsp = brokerobj.NextGlobal(nsp); } listView_SizeChanged(lstview); }
///==================================================================== /// <summary> /// Инициализация буфера данных /// </summary> ///==================================================================== private void initDataBuf(ListView lv, Broker brokerobj, string ShowSys = "1") { string val; if (lv.SelectedItems.Count == 0) return; val = lv.SelectedItems[0].Text; if (".." == val) { brokerobj.Up(ShowSys); } else { brokerobj.Down(val); } }