69 lines
1.5 KiB
C#
69 lines
1.5 KiB
C#
/***********************
|
|
* 说明:搜索框树面板
|
|
* 创建人:姜棚
|
|
* 创建日期:
|
|
* 修改人:
|
|
* 修改日期:
|
|
* 修改备注:
|
|
* 版本:1.0.0.0
|
|
***********************/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Lskj.MyControl
|
|
{
|
|
public partial class FrmAutoSearchTreeView : Form
|
|
{
|
|
/// <summary>
|
|
/// 次数
|
|
/// </summary>
|
|
private int iCount = 0;
|
|
/// <summary>
|
|
/// 是否可以释放窗体
|
|
/// </summary>
|
|
public bool CanClose = false;
|
|
|
|
|
|
public TreeViewEx TreeView
|
|
{
|
|
get { return this.treeViewEx; }
|
|
}
|
|
|
|
|
|
public FrmAutoSearchTreeView()
|
|
{
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
private void FrmAutoSearch_FormClosing(object sender, FormClosingEventArgs e)
|
|
{
|
|
if (!CanClose && e.CloseReason == CloseReason.UserClosing)
|
|
{
|
|
e.Cancel = true;
|
|
this.Hide();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void FrmAutoSearchTreeView_KeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
|
|
if (e.KeyCode == Keys.Enter)
|
|
{
|
|
this.Hide();
|
|
}
|
|
}
|
|
}
|
|
}
|