當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.KeyEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Forms.KeyEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# KeyEventArgs類的具體用法?C# KeyEventArgs怎麽用?C# KeyEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


KeyEventArgs類屬於System.Windows.Forms命名空間,在下文中一共展示了KeyEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: txtBankCode_KeyDown

 private void txtBankCode_KeyDown(object sender, KeyEventArgs e)
 {
     frmSelectBank frm = new frmSelectBank();
     // Add an event handler to update this form
     frm.SelectBankUpdate +=new frmSelectBank.SelectBankHandler(frm_SelectBankUpdate);
     frm.Show();
 }
開發者ID:itktc,項目名稱:projectktc-v2,代碼行數:7,代碼來源:frmDetailPayment.cs

示例2: TextAreaKeyEventHandler

 /// <summary>
 /// Return true to handle the keypress, return false to let the text area handle the keypress
 /// </summary>
 void TextAreaKeyEventHandler(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.OemOpenBrackets && e.Shift)
     {
         ICompletionDataProvider snippetDataProvider = new SnippetDataProvider(mainForm.AutoCompleteImageList);
         codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow(
             mainForm,					// The parent window for the completion window
             editor, 					// The text editor to show the window for
             "",		// Filename - will be passed back to the provider
             snippetDataProvider,		// Provider to get the list of possible completions
             Convert.ToChar(e.KeyCode)	    					// Key pressed - will be passed to the provider
         );
     }
     else
     {
         ICompletionDataProvider completionDataProvider = new CodeCompletionProvider(mainForm.AutoCompleteImageList);
         codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow(
             mainForm,					// The parent window for the completion window
             editor, 					// The text editor to show the window for
             "",		// Filename - will be passed back to the provider
             completionDataProvider,		// Provider to get the list of possible completions
             Convert.ToChar(e.KeyCode)	    					// Key pressed - will be passed to the provider
         );
     }
     if (codeCompletionWindow != null)
     {
         // ShowCompletionWindow can return null when the provider returns an empty list
         codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
     }
     return;
 }
開發者ID:scriptord3,項目名稱:RagnarokNPCEditor,代碼行數:34,代碼來源:CodeCompletionKeyHandler.cs

示例3: FormViewerMARKETING_KeyUp

 private void FormViewerMARKETING_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         Close();
     }
 }
開發者ID:rhizalpatrax64bit,項目名稱:logistic-management-system,代碼行數:7,代碼來源:FormViewerMARKETING.cs

示例4: DownKey

 public override void DownKey(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter && !btnSave.Focused)
         SendKeys.Send("{Tab}");
     else if (e.KeyCode == Keys.F9)
         btnSave_Click(sender, e);
 }
開發者ID:eleooo,項目名稱:App,代碼行數:7,代碼來源:UcCompanyInfo.cs

示例5: button5_KeyDown

 private void button5_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData==Keys.Right)
     {
         wplayer.controls.fastReverse();
     }
 }
開發者ID:KollaneSnake,項目名稱:Sound_Naidis,代碼行數:7,代碼來源:Form1.cs

示例6: TemplateName_KeyDown

 private void TemplateName_KeyDown(object sender, KeyEventArgs e)
 {
     if(e.KeyCode == Keys.Enter) {
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
 }
開發者ID:gratianlup,項目名稱:SecureDelete,代碼行數:7,代碼來源:TemplateName.cs

示例7: textBoxQuantity_KeyDown

 private void textBoxQuantity_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         this.textBoxBarCode.Focus();
     }
 }
開發者ID:ViniciusConsultor,項目名稱:ifsp-ads-sipdv,代碼行數:7,代碼來源:FormTables.cs

示例8: txtTitle_KeyDown

 private void txtTitle_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         btnOkay_Click(null, null);
     }
 }
開發者ID:kuh3h3,項目名稱:rtmpGUI,代碼行數:7,代碼來源:AddChannel.cs

示例9: numJug_KeyDown

 private void numJug_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         this.Iniciar();
     }
 }
開發者ID:Rinzler1991,項目名稱:Juego-de-la-Verdad,代碼行數:7,代碼來源:Inicio.cs

示例10: MaskedTextBoxKeyDown_KeyDown

 private void MaskedTextBoxKeyDown_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         SendKeys.Send("{TAB}");
     }
 }
開發者ID:ViniciusConsultor,項目名稱:controlhoras,代碼行數:7,代碼來源:MaskedTextBoxKeyDown.cs

示例11: txtPassword_KeyDown

 private void txtPassword_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         btnLogin_Click(null, null);
     }
 }
開發者ID:vtthanh83,項目名稱:Karaoke,代碼行數:7,代碼來源:frmLogin.cs

示例12: ContrasenatextBox_KeyDown

 private void ContrasenatextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         IniciarSesion();
     }
 }
開發者ID:elnata93,項目名稱:StrongerGym,代碼行數:7,代碼來源:LoginForm.cs

示例13: lvProgramm_KeyDown

 private void lvProgramm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Delete)
     {
         RemoveSelected();
     }
 }
開發者ID:Camel-RD,項目名稱:XMLTV-EPG-Viewer,代碼行數:7,代碼來源:UCEPGView3.cs

示例14: FormKeyUp

 private void FormKeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Escape)
     {
         this.Close();
     }
 }
開發者ID:bruinbrown,項目名稱:Brainfuck-Interpreter,代碼行數:7,代碼來源:StateMachineVisualiserForm.cs

示例15: dgSalesOrder_KeyDown

 private void dgSalesOrder_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         e.SuppressKeyPress = true;
         //LL Phalaborwa if
         if (dgSalesOrder.Rows.Count > 0)
         {
             sResult = dgSalesOrder.SelectedRows[0].Cells[0].Value.ToString();
             this.DialogResult = DialogResult.OK;
             this.Close();
         }
     }
     else
     {
         //if (e.KeyValue > 40)
         //{
         //    e.SuppressKeyPress = true;
         //    txtSalesNumber.Text += char.ConvertFromUtf32(e.KeyValue).ToString();
         //    txtSalesNumber.Focus();
         //    txtSalesNumber.SelectionStart = txtSalesNumber.Text.Length;
         //    txtSalesNumber.SelectionLength = 0;
         //}
     }
 }
開發者ID:anthonied,項目名稱:LiquidPastel,代碼行數:25,代碼來源:SalesOrderZoom.cs


注:本文中的System.Windows.Forms.KeyEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。