Exemple #1
0
 private void InitControls()
 {
     this.txtInput              = new TextEditPLM();
     this.txtInput.Size         = new Size(0x110, 0x15);
     this.txtInput.AllowDrop    = true;
     this.txtInput.KeyDown     += new KeyEventHandler(this.txtInput_KeyDown);
     this.txtInput.DragDrop    += new DragEventHandler(this.txtInput_DragDrop);
     this.txtInput.TextChanged += new EventHandler(this.txtInput_TextChanged);
     this.txtInput.DragEnter   += new DragEventHandler(this.txtInput_DragEnter);
     this.txtInput.Leave       += new EventHandler(this.txtInput_Leave);
     this.txtInput.DoubleClick += new EventHandler(this.txtInput_DoubleClick);
     this.spl                   = new SplitterPLM();
     this.spl.Width             = this.txtInput.Width;
     this.spl.Top               = (this.txtInput.Top + this.txtInput.Height) + 2;
     this.spl.Left              = this.txtInput.Left;
     this.spl.Height            = 3;
     this.spl.Visible           = false;
     this.lbFilter              = new ListBoxPLM();
     this.lbFilter.ItemHeight   = 0x10;
     this.lbFilter.Top          = (this.spl.Top + this.spl.Height) + 2;
     this.lbFilter.Left         = this.txtInput.Left;
     this.lbFilter.Name         = "lbFilter";
     this.lbFilter.Size         = new Size(this.MinWidth, this.MinHeight);
     this.lbFilter.Visible      = false;
     this.lbFilter.KeyPress    += new KeyPressEventHandler(this.lbFilter_KeyPress);
     this.lbFilter.DoubleClick += new EventHandler(this.lbFilter_DoubleClick);
     this.lbFilter.Leave       += new EventHandler(this.lbFilter_Leave);
     base.SetStyle(ControlStyles.DoubleBuffer, true);
     base.SetStyle(ControlStyles.ResizeRedraw, true);
 }
Exemple #2
0
 private bool IsInListBox(string str, ListBoxPLM lb)
 {
     foreach (object obj2 in lb.Items)
     {
         if (str == ((string)obj2))
         {
             return(true);
         }
     }
     return(false);
 }