随即

 private void userName_TextChanged(object sender, EventArgs e)
  {
   if (this.checkBoxQuanJiao.Checked)
   {
    this.userName.Text = this.userName.Text.Replace("1", "1");
    this.userName.Text = this.userName.Text.Replace("2", "2");
    this.userName.Text = this.userName.Text.Replace("3", "3");
    this.userName.Text = this.userName.Text.Replace("4", "4");
    this.userName.Text = this.userName.Text.Replace("5", "5");
    this.userName.Text = this.userName.Text.Replace("6", "6");
    this.userName.Text = this.userName.Text.Replace("7", "7");
    this.userName.Text = this.userName.Text.Replace("8", "8");
    this.userName.Text = this.userName.Text.Replace("9", "9");
    this.userName.Text = this.userName.Text.Replace("0", "0");
    this.userName.Text = this.userName.Text.Replace("A", "A");
    this.userName.Text = this.userName.Text.Replace("B", "B");
    this.userName.Text = this.userName.Text.Replace("C", "C");
    this.userName.Text = this.userName.Text.Replace("D", "D");
    this.userName.Text = this.userName.Text.Replace("E", "E");
    this.userName.Text = this.userName.Text.Replace("F", "F");
    this.userName.Text = this.userName.Text.Replace("G", "G");
    this.userName.Text = this.userName.Text.Replace("H", "H");
    this.userName.Text = this.userName.Text.Replace("I", "I");
    this.userName.Text = this.userName.Text.Replace("J", "J");
    this.userName.Text = this.userName.Text.Replace("K", "K");
    this.userName.Text = this.userName.Text.Replace("L", "L");
    this.userName.Text = this.userName.Text.Replace("M", "M");
    this.userName.Text = this.userName.Text.Replace("N", "N");
    this.userName.Text = this.userName.Text.Replace("O", "O");
    this.userName.Text = this.userName.Text.Replace("P", "P");
    this.userName.Text = this.userName.Text.Replace("Q", "Q");
    this.userName.Text = this.userName.Text.Replace("R", "R");
    this.userName.Text = this.userName.Text.Replace("S", "S");
    this.userName.Text = this.userName.Text.Replace("T", "T");
    this.userName.Text = this.userName.Text.Replace("U", "U");
    this.userName.Text = this.userName.Text.Replace("V", "V");
    this.userName.Text = this.userName.Text.Replace("W", "W");
    this.userName.Text = this.userName.Text.Replace("X", "X");
    this.userName.Text = this.userName.Text.Replace("Y", "Y");
    this.userName.Text = this.userName.Text.Replace("Z", "Z");
    this.userName.Text = this.userName.Text.Replace("a", "a");
    this.userName.Text = this.userName.Text.Replace("b", "b");
    this.userName.Text = this.userName.Text.Replace("c", "c");
    this.userName.Text = this.userName.Text.Replace("d", "d");
    this.userName.Text = this.userName.Text.Replace("e", "e");
    this.userName.Text = this.userName.Text.Replace("f", "f");
    this.userName.Text = this.userName.Text.Replace("g", "g");
    this.userName.Text = this.userName.Text.Replace("h", "h");
    this.userName.Text = this.userName.Text.Replace("i", "i");
    this.userName.Text = this.userName.Text.Replace("j", "j");
    this.userName.Text = this.userName.Text.Replace("k", "k");
    this.userName.Text = this.userName.Text.Replace("l", "l");
    this.userName.Text = this.userName.Text.Replace("m", "m");
    this.userName.Text = this.userName.Text.Replace("n", "n");
    this.userName.Text = this.userName.Text.Replace("o", "o");
    this.userName.Text = this.userName.Text.Replace("p", "p");
    this.userName.Text = this.userName.Text.Replace("q", "q");
    this.userName.Text = this.userName.Text.Replace("r", "r");
    this.userName.Text = this.userName.Text.Replace("s", "s");
    this.userName.Text = this.userName.Text.Replace("t", "t");
    this.userName.Text = this.userName.Text.Replace("u", "u");
    this.userName.Text = this.userName.Text.Replace("v", "v");
    this.userName.Text = this.userName.Text.Replace("w", "w");
    this.userName.Text = this.userName.Text.Replace("x", "x");
    this.userName.Text = this.userName.Text.Replace("y", "y");
    this.userName.Text = this.userName.Text.Replace("z", "z");
   }
   else
   {
    this.userName.Text = this.userName.Text.Replace("1", "1");
    this.userName.Text = this.userName.Text.Replace("2", "2");
    this.userName.Text = this.userName.Text.Replace("3", "3");
    this.userName.Text = this.userName.Text.Replace("4", "4");
    this.userName.Text = this.userName.Text.Replace("5", "5");
    this.userName.Text = this.userName.Text.Replace("6", "6");
    this.userName.Text = this.userName.Text.Replace("7", "7");
    this.userName.Text = this.userName.Text.Replace("8", "8");
    this.userName.Text = this.userName.Text.Replace("9", "9");
    this.userName.Text = this.userName.Text.Replace("0", "0");
    this.userName.Text = this.userName.Text.Replace("A", "A");
    this.userName.Text = this.userName.Text.Replace("B", "B");
    this.userName.Text = this.userName.Text.Replace("C", "C");
    this.userName.Text = this.userName.Text.Replace("D", "D");
    this.userName.Text = this.userName.Text.Replace("E", "E");
    this.userName.Text = this.userName.Text.Replace("F", "F");
    this.userName.Text = this.userName.Text.Replace("G", "G");
    this.userName.Text = this.userName.Text.Replace("H", "H");
    this.userName.Text = this.userName.Text.Replace("I", "I");
    this.userName.Text = this.userName.Text.Replace("J", "J");
    this.userName.Text = this.userName.Text.Replace("K", "K");
    this.userName.Text = this.userName.Text.Replace("L", "L");
    this.userName.Text = this.userName.Text.Replace("M", "M");
    this.userName.Text = this.userName.Text.Replace("N", "N");
    this.userName.Text = this.userName.Text.Replace("O", "O");
    this.userName.Text = this.userName.Text.Replace("P", "P");
    this.userName.Text = this.userName.Text.Replace("Q", "Q");
    this.userName.Text = this.userName.Text.Replace("R", "R");
    this.userName.Text = this.userName.Text.Replace("S", "S");
    this.userName.Text = this.userName.Text.Replace("T", "T");
    this.userName.Text = this.userName.Text.Replace("U", "U");
    this.userName.Text = this.userName.Text.Replace("V", "V");
    this.userName.Text = this.userName.Text.Replace("W", "W");
    this.userName.Text = this.userName.Text.Replace("X", "X");
    this.userName.Text = this.userName.Text.Replace("Y", "Y");
    this.userName.Text = this.userName.Text.Replace("Z", "Z");
    this.userName.Text = this.userName.Text.Replace("a", "a");
    this.userName.Text = this.userName.Text.Replace("b", "b");
    this.userName.Text = this.userName.Text.Replace("c", "c");
    this.userName.Text = this.userName.Text.Replace("d", "d");
    this.userName.Text = this.userName.Text.Replace("e", "e");
    this.userName.Text = this.userName.Text.Replace("f", "f");
    this.userName.Text = this.userName.Text.Replace("g", "g");
    this.userName.Text = this.userName.Text.Replace("h", "h");
    this.userName.Text = this.userName.Text.Replace("i", "i");
    this.userName.Text = this.userName.Text.Replace("j", "j");
    this.userName.Text = this.userName.Text.Replace("k", "k");
    this.userName.Text = this.userName.Text.Replace("l", "l");
    this.userName.Text = this.userName.Text.Replace("m", "m");
    this.userName.Text = this.userName.Text.Replace("n", "n");
    this.userName.Text = this.userName.Text.Replace("o", "o");
    this.userName.Text = this.userName.Text.Replace("p", "p");
    this.userName.Text = this.userName.Text.Replace("q", "q");
    this.userName.Text = this.userName.Text.Replace("r", "r");
    this.userName.Text = this.userName.Text.Replace("s", "s");
    this.userName.Text = this.userName.Text.Replace("t", "t");
    this.userName.Text = this.userName.Text.Replace("u", "u");
    this.userName.Text = this.userName.Text.Replace("v", "v");
    this.userName.Text = this.userName.Text.Replace("w", "w");
    this.userName.Text = this.userName.Text.Replace("x", "x");
    this.userName.Text = this.userName.Text.Replace("y", "y");
    this.userName.Text = this.userName.Text.Replace("z", "z");
   }
  }

  private void UserOrSoftInputTheCode(object sender, EventArgs e)
  {
   if (this.radioButtonSoftInput.Checked)
   {
    this.nameExt.Maximum = new decimal(30);
    this.checkBoxhoutaizidongzhuceyonghu.Enabled = true;
   }
   else
   {
    this.checkBoxhoutaizidongzhuceyonghu.Enabled = false;
   }
   if (this.radioButtonUserInput.Checked)
   {
    this.nameExt.Maximum = new decimal(8);
   }
  }

  private string 产生随机用户名(int min, int max)
  {
   string text1 = "";
   if (this.checkBoxsuijizhongwenming.Checked)
   {
    if (this.textBox随机字符列表.Text == "")
    {
     this.textBox随机字符列表.Text = "请在这里随便输入一些汉字";
    }
    string text2 = this.textBox随机字符列表.Text;
    int num1 = new Random().Next(min / 2, max / 2);
    for (int num2 = 0; num2 < num1; num2++)
    {
     int num3 = new Random().Next(1, text2.Length - 1);
     text1 = text1 + text2.Substring(num3 - 1, 1);
     Thread.Sleep(11);
    }
    return text1;
   }
   char[] chArray1 = "EFGHIABCD456789LMNOJKSTU0123PQRVWXYZ".ToCharArray();
   int num4 = new Random().Next(min, max);
   for (int num5 = 0; num5 < num4; num5++)
   {
    int num6 = new Random().Next(0, chArray1.Length - 1);
    text1 = text1 + chArray1[num6];
    Thread.Sleep(11);
   }
   return text1;
  }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值