如何使用c#.net为每个特定数字分配代码? [英] How to assign code for every particular digit using c# .net?

查看:74
本文介绍了如何使用c#.net为每个特定数字分配代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



如何使用c#.net为每个特定数字分配代码?



我想分配这样的代码: -



1-A,

2-C,

3 - *,

4-F,

5-&,

6-S,

7-W ,

8-B,

9-N,

0-Z



当我输入数字2500时,它应该在标签和网格字段中显示C&ZZ。



然后总共有两个这样的数字 - C&+ SB = N *(25 + 68 = 93)



结果应该只显示代码,

结果不应该以数字显示。





在此先感谢。



Ankit Agarwal

软件工程师

Hello,

How to assign code for every particular digit using c# .net?

I want to assign code like this:-

1-A,
2-C,
3-*,
4-F,
5-&,
6-S,
7-W,
8-B,
9-N,
0-Z

When i type numbers 2500 so it should be display- C&ZZ in label and Grid Field.

and then total of two numbers like that- C&+SB=N* (25+68=93)

Result should be display only code,
result should not be display in digits.


Thanks in Advance.

Ankit Agarwal
Software Engineer

推荐答案

保留将数字映射到字符的映射表。



陷阱鼠标在UI中向上或向下鼠标按下事件并用映射的字符替换数字。



对数字进行主题操作并使用映射表以字符显示答案。



简单的东西
Keep mapping table that maps the digit to a character.

Trap the mouse up or mouse down event in your UI and replace the digit with the mapped character.

Do the mathematical operation on the numbers and use the mapping table to display the answer in characters.

Simple stuff


这篇关于如何使用c#.net为每个特定数字分配代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆