zoukankan      html  css  js  c++  java
  • C# 计算器 运算符和数字键的keys对照

    keys.

    private void Computer_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.NumPad0) NumInsertToShow("0"); if (e.KeyCode == Keys.NumPad1) NumInsertToShow("1"); if (e.KeyCode == Keys.NumPad2) NumInsertToShow("2"); if (e.KeyCode == Keys.NumPad3) NumInsertToShow("3"); if (e.KeyCode == Keys.NumPad4) NumInsertToShow("4"); if (e.KeyCode == Keys.NumPad5) NumInsertToShow("5"); if (e.KeyCode == Keys.NumPad6) NumInsertToShow("6"); if (e.KeyCode == Keys.NumPad7) NumInsertToShow("7"); if (e.KeyCode == Keys.NumPad8) NumInsertToShow("8"); if (e.KeyCode == Keys.NumPad9) NumInsertToShow("9"); if (e.KeyCode == Keys.Decimal) DotInsertToShow("."); if (e.KeyCode == Keys.Enter) OperInsertToShow("="); if (e.KeyCode == Keys.Add) OperInsertToShow("+"); if (e.KeyCode == Keys.Subtract) OperInsertToShow("-"); if (e.KeyCode == Keys.Multiply) OperInsertToShow("*"); if (e.KeyCode == Keys.Divide) OperInsertToShow("/"); }
  • 相关阅读:
    每日日报8月12日
    每日日报8月15日
    每日日报8月18日
    每日日报8月9日
    九月29号——动手又动脑
    今日总结
    每周总结
    今日总结
    周总结
    今日总结
  • 原文地址:https://www.cnblogs.com/Wfei/p/3153042.html
Copyright © 2011-2022 走看看