예제 #1
0
 private void RandomCodeButton1_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrWhiteSpace(tbLength.Text) || String.IsNullOrWhiteSpace(tbInclude.Text))
     {
         WarningNotice.Null();
         return;
     }
     if (!int.TryParse(tbLength.Text, out _))
     {
         if (long.TryParse(tbLength.Text, out _))
         {
             WarningNotice.IsLongType();
             return;
         }
         WarningNotice.NotNumber();
         return;
     }
     tbRandomCodeResult.Text = RandomCode.GetRandomString(int.Parse(tbLength.Text), tbInclude.Text);
 }