Click here to Skip to main content
15,896,063 members
Articles / Programming Languages / C#

NextUI Meter Panel

Rate me:
Please Sign up or sign in to vote.
4.85/5 (15 votes)
23 Oct 2007CPOL3 min read 41.2K   3K   61  
A speedometer like control
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ToggleDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.switchbutton1.SwitchOff += new NextUI.Bar.OnSwitchOff(switchbutton1_SwitchOff);
            this.switchbutton1.SwitchOn += new NextUI.Bar.OnSwitchOn(switchbutton1_SwitchOn);

            this.switchbutton2.SwitchOff += new NextUI.Bar.OnSwitchOff(switchbutton2_SwitchOff);
            this.switchbutton2.SwitchOn += new NextUI.Bar.OnSwitchOn(switchbutton2_SwitchOn);

            this.switchbutton3.SwitchOff += new NextUI.Bar.OnSwitchOff(switchbutton3_SwitchOff);
            this.switchbutton3.SwitchOn += new NextUI.Bar.OnSwitchOn(switchbutton3_SwitchOn);
        }

        void switchbutton3_SwitchOn(object sender)
        {
            this.label3.Text = "Switch on";
        }

        void switchbutton3_SwitchOff(object sender)
        {
            this.label3.Text = "Switch off";
        }

        void switchbutton2_SwitchOn(object sender)
        {
            this.label2.Text = "Switch on";
        }

        void switchbutton2_SwitchOff(object sender)
        {
            this.label2.Text = "Switch off";
        }

        void switchbutton1_SwitchOn(object sender)
        {
            this.label1.Text = "Switch on";
        }

        void switchbutton1_SwitchOff(object sender)
        {
            this.label1.Text = "Switch off";
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) www.nextwavesoft.com
United States United States
Senior Software Developer at nextwavesoft

Comments and Discussions