开发者

Pin Pad. A custom control like this one

I recently tried out a Free-To-Play MMORPG game called AIKA

While trying the game out, I found a very nice PIN Pad that allows for you to protect your characters. I have a screen shot attached:

Pin Pad. A custom control like this one

It allows for a user to enter (through mouse-only) a four digit numeric code. A cool thing is that the numeric digits around the InputBox are always shuffled every time this screen comes on.

My purpose behind this question is: Is there someone out there who has created something like this before? I'm interested in using this in my WinForms and WPF application.

Note I have done a lot of searching but I guess I really don't know if I'm using the correct keywor开发者_StackOverflow社区ds. In case, such a control doesn't exist, and someone is willing to make one, kindly drop a line here. I'm very interested.


If it pops up on the screen, it's really just a form with buttons on it. You can create a simple randomization routine to populate the button numbers.

private void Form1_Load(object sender, EventArgs e)
{
  int[] array = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  Random rnd = new Random();
  for (int i = array.Length - 1; i > 0; i--)
  {
    int j = rnd.Next(i);
    int k = array[j];
    array[j] = array[i - 1];
    array[i - 1] = k;
  }

  for (int i = 0; i < array.Length; i++)
  {
    panel1.Controls["Button" + (i + 1).ToString()].Text = array[i].ToString();
  }

Pin Pad. A custom control like this one

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜