Advertisement
Tobiasz931

MlekoMleko15

Jun 7th, 2013
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. public partial class CustomControl1 : TextBox
  2.     {
  3.         public CustomControl1()
  4.         {
  5.             InitializeComponent();
  6.         }
  7.  
  8.         protected override void OnPaint(PaintEventArgs pe)
  9.         {
  10.             base.OnPaint(pe);
  11.         }
  12.  
  13.         public void Pokemon()
  14.         {
  15.             string temp = this.Text.ToString();
  16.             char[] pokemon = new char[this.Text.Length];
  17.             pokemon = temp.ToCharArray();
  18.             for (int i = 0; i < temp.Length; i += 2)
  19.             {
  20.                 pokemon[i] = char.ToUpper(pokemon[i]);
  21.             }
  22.             for (int i = 1; i < temp.Length; i += 2)
  23.             {
  24.                 pokemon[i] = char.ToLower(pokemon[i]);
  25.             }
  26.             this.Text = new String(pokemon);
  27.         }
  28.         public void Caps()
  29.         {
  30.             this.Text = this.Text.ToUpper();
  31.         }
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement