当前位置: 首页>>代码示例>>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;未经允许,请勿转载。