Ejemplo n.º 1
0
        private void uiVote_Click(object sender, EventArgs e)
        {
            var segmentId = "Don't know";

            if (uiVoteA.Checked)
            {
                segmentId = uiVoteA.Text;
            }
            else if (uiVoteB.Checked)
            {
                segmentId = uiVoteB.Text;
            }
            else if (uiVoteC.Checked)
            {
                segmentId = uiVoteC.Text;
            }

            // using the piechart extension allows us to set up the
            // underlying result properties in a more natural way.
            // We can then use the Geckoboard Data Service to visualise
            // this data with a Geckoboard piechart widget.
            //
            // The MonitorWang Geckoboard Data Service url to use in
            // your geckoboard widget is...
            //
            AppStatsEngine.Publish(new AppStatsEvent()
                                   .PieChart("MonitorWangPoll")
                                   .Segment(segmentId)
                                   .One());
        }