상속: System.Windows.Forms.Form
예제 #1
0
 private void CloseTree()
 {
     if (_treeForm != null)
     {
         _treeForm.Close();
     }
     _treeForm = null;
 }
예제 #2
0
        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();
            }
        }
예제 #3
0
 private void CloseTree()
 {
     if (_treeForm != null)
         _treeForm.Close();
     _treeForm = null;
 }
예제 #4
0
 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();
     }
 }