private void CloseTree() { if (_treeForm != null) { _treeForm.Close(); } _treeForm = null; }
private void btnDown_Click(object sender, EventArgs e) { var pt = new Point(0, panel1.Height); if (_treeForm == null) { _treeForm = new DropListTreeForm(); _treeForm.TreeModel = _treeModel; _treeForm.Location = PointToScreen(pt); _treeForm.Width = edtSelectedValue.Width + btnDown.Width; _treeForm.SignalSelect += _treeForm_SignalSelect; _treeForm.TreeLostFocus += _treeForm_TreeLostFocus; if (!string.IsNullOrEmpty(edtSelectedValue.Text)) { _treeForm.FindElement((XmlElement)edtSelectedValue.Tag); } _treeForm.Show(); } else { CloseTree(); } }
private void CloseTree() { if (_treeForm != null) _treeForm.Close(); _treeForm = null; }
private void btnDown_Click( object sender, EventArgs e ) { var pt = new Point( 0, panel1.Height ); if (_treeForm == null) { _treeForm = new DropListTreeForm(); _treeForm.TreeModel = _treeModel; _treeForm.Location = PointToScreen( pt ); _treeForm.Width = edtSelectedValue.Width + btnDown.Width; _treeForm.SignalSelect += _treeForm_SignalSelect; _treeForm.TreeLostFocus += _treeForm_TreeLostFocus; if (!string.IsNullOrEmpty( edtSelectedValue.Text )) _treeForm.FindElement( (XmlElement) edtSelectedValue.Tag ); _treeForm.Show(); } else { CloseTree(); } }