<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: single code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Wed, 23 Jul 2008 22:10:38 GMT</pubDate>
    <description>DZone Snippets: single code</description>
    <item>
      <title>Toggle Text on Button (Single thread application)</title>
      <link>http://snippets.dzone.com/posts/show/4670</link>
      <description>// description of your code here&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; public partial class Form1 : Form&lt;br /&gt;    {&lt;br /&gt;        int iBtn = 0;&lt;br /&gt;        public Form1()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void button1_Click(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            ++iBtn;&lt;br /&gt;&lt;br /&gt;            if (iBtn == 3)&lt;br /&gt;            {&lt;br /&gt;                iBtn = 0;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            switch (iBtn)&lt;br /&gt;            {&lt;br /&gt;                case 0: button1.Text = "default";&lt;br /&gt;                    break;&lt;br /&gt;                case 1: button1.Text = "Love";&lt;br /&gt;                    break;&lt;br /&gt;                case 2: button1.Text = "Hate";&lt;br /&gt;                    break;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void Form1_Load(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            button1.Text = "default";&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 19 Oct 2007 06:59:20 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4670</guid>
      <author>dubby (Dave)</author>
    </item>
  </channel>
</rss>
