protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (_textBox != null && _textBox.IsDisposed) { _textBox.Dispose(); _textBox = null; } } }
private void Init() { _imageNormal = new Bitmap(typeof(WSNSearchBox), "searchN.png"); _imageHover = new Bitmap(typeof(WSNSearchBox), "searchH.png"); _textBox = new WSNAutoCompleteTextBox.WSNAutoCompleteTextBox(); _textBox.BorderStyle = BorderStyle.None; _textBox.InputChanged += new EventHandler(_textBox_InputChanged); _textBox.EnterKeyDown += new EventHandler(_textBox_EnterKeyDown); SetTextBoxBounds(); _textBox.BackColor = Color.White; base.Controls.Add(_textBox); base.BackColor = Color.Transparent; _oldCursor = this.Cursor; }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (_textBox != null && _textBox.IsDisposed) { _textBox.Dispose(); _textBox = null; } } }
private void Init() { _imageNormal = new Bitmap(typeof(WSNSearchBox), "searchN.png"); _imageHover = new Bitmap(typeof(WSNSearchBox), "searchH.png"); _textBox = new WSNAutoCompleteTextBox.WSNAutoCompleteTextBox(); _textBox.BorderStyle = BorderStyle.None; _textBox.InputChanged += new EventHandler(_textBox_InputChanged); _textBox.EnterKeyDown += new EventHandler(_textBox_EnterKeyDown); SetTextBoxBounds(); _textBox.BackColor = Color.White; base.Controls.Add(_textBox); base.BackColor = Color.Transparent; _oldCursor = this.Cursor; }