Пример #1
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            _isKeyPressHandled = false;

            // If this is not an editor-specific key, pass it for processing to the action manager
            if ((!JetTextBox.IsEditorKey(e.KeyData)) && (Core.ActionManager != null))
            {
                if (Core.ActionManager.ExecuteKeyboardAction(GetContext(ActionContextKind.Keyboard), e.KeyData))
                {
                    e.Handled = _isKeyPressHandled = true;
                }
            }

            // If not an Omea shortcut, pass it to the editbox implementation
            if (!e.Handled)
            {
                base.OnKeyDown(e);
            }
        }
Пример #2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components       = new System.ComponentModel.Container();
     this._listContacts    = new ResourceListView2();
     this._cmbCategory     = new JetBrains.Omea.GUIControls.ResourceComboBox();
     this._lblShowCategory = new System.Windows.Forms.Label();
     this._txtFind         = new JetBrains.Omea.GUIControls.JetTextBox();
     this.SuspendLayout();
     //
     // _listQueries
     //
     this._listContacts.AllowDrop = true;
     this._listContacts.Anchor    = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                           | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this._listContacts.BorderStyle             = BorderStyle.None;
     this._listContacts.HeaderStyle             = System.Windows.Forms.ColumnHeaderStyle.None;
     this._listContacts.HideSelection           = false;
     this._listContacts.Location                = new System.Drawing.Point(0, 56);
     this._listContacts.Name                    = "_listContacts";
     this._listContacts.Size                    = new System.Drawing.Size(148, 94);
     this._listContacts.TabIndex                = 2;
     this._listContacts.KeyNavigationCompleted += new EventHandler(HandleKeyNavigationCompleted);
     this._listContacts.DoubleClick            += new HandledEventHandler(this._listQueries_DoubleClick);
     this._listContacts.MouseUp                += new System.Windows.Forms.MouseEventHandler(this._listQueries_MouseUp);
     this._listContacts.KeyDown                += new System.Windows.Forms.KeyEventHandler(this._listQueries_KeyDown);
     //
     // _cmbCategory
     //
     this._cmbCategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                      | System.Windows.Forms.AnchorStyles.Right)));
     this._cmbCategory.DrawMode              = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     this._cmbCategory.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this._cmbCategory.Location              = new System.Drawing.Point(48, 28);
     this._cmbCategory.Name                  = "_cmbCategory";
     this._cmbCategory.Size                  = new System.Drawing.Size(100, 22);
     this._cmbCategory.TabIndex              = 1;
     this._cmbCategory.KeyDown              += new System.Windows.Forms.KeyEventHandler(this._cmbCategory_KeyDown);
     this._cmbCategory.SelectedIndexChanged += new System.EventHandler(this.OnSelectedCategoryChanged);
     //
     // _lblShowCategory
     //
     this._lblShowCategory.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this._lblShowCategory.Location  = new System.Drawing.Point(4, 32);
     this._lblShowCategory.Name      = "_lblShowCategory";
     this._lblShowCategory.Size      = new System.Drawing.Size(40, 16);
     this._lblShowCategory.TabIndex  = 5;
     this._lblShowCategory.Text      = "Show:";
     //
     // _txtFind
     //
     this._txtFind.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                  | System.Windows.Forms.AnchorStyles.Right)));
     this._txtFind.EmptyText = null;
     this._txtFind.ForeColor = System.Drawing.Color.DarkGray;
     this._txtFind.Location  = new System.Drawing.Point(0, 4);
     this._txtFind.Name      = "_txtFind";
     this._txtFind.Size      = new System.Drawing.Size(148, 21);
     this._txtFind.TabIndex  = 0;
     this._txtFind.Text      = "";
     this._txtFind.KeyDown  += new System.Windows.Forms.KeyEventHandler(this._txtFind_KeyDown);
     this._txtFind.IncrementalSearchUpdated += new System.EventHandler(this.OnIncrementalSearchUpdated);
     //
     // CorrespondentCtrl
     //
     this.Controls.Add(this._cmbCategory);
     this.Controls.Add(this._lblShowCategory);
     this.Controls.Add(this._txtFind);
     this.Controls.Add(this._listContacts);
     this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204)));
     this.Name = "CorrespondentCtrl";
     this.Size = new System.Drawing.Size(148, 150);
     this.ResumeLayout(false);
 }