Exemplo n.º 1
0
        // Test
        public void Test(string numStation)
        {
            if (StatsVelib == null)
            {
                MessageBox.Show("Station " + numStation);
                StatsVelib = new StatsChartsVelib(true);
                MessageBox.Show("Ok ca a dl");
            }

            if (panel.Panel2.Controls.Count > 0)
                panel.Panel2.Controls[0].Dispose();
            panel.Panel2.Controls.Add(StatsVelib.initSplitPanel(int.Parse(numStation)));
        }
Exemplo n.º 2
0
        // Changement de cluster dans combo1
        private void changeCluster(object sender, EventArgs args)
        {
            //MessageBox.Show(this,"Selected : " + combo1.SelectedItem);
            chart = new StatsChartsVelib();
            //String s = combo1.SelectedItem as String;
            int selected = combo1.SelectedIndex;
            Chart myChart = null;
            Form frame = null;
            switch (selected)
            {
                case 0:
                    Dictionary<int, double[]> temp = new Dictionary<int, double[]>();
                    for (int i = 0; i < cluster.Count; i++)
                        temp.Add(i, cluster[i].ClusterMean);

                    myChart = chart.createChartAllCentroides(temp, "");
                    //myChart = chart.createChartAltitude( stationCluster, cluster.Count );
                    frame = new Form();
                    myChart.Dock = DockStyle.Fill;
                    frame.Text = "Cluster " + selected;
                    frame.Controls.Add(myChart);
                    frame.Show();
                    break;
                case 1:
                    myChart = chart.createChartAltitude(stationCluster, cluster.Count);
                    frame = new Form();
                    myChart.Dock = DockStyle.Fill;
                    frame.Text = "Cluster " + selected;
                    frame.Controls.Add(myChart);
                    frame.Show();
                    break;
                case 2:
                    myChart = chart.createChartPOIs(stationCluster, cluster.Count);
                    frame = new Form();
                    myChart.Dock = DockStyle.Fill;
                    frame.Text = "Cluster " + selected;
                    frame.Controls.Add(myChart);
                    frame.Show();
                    break;
                default:
                    myChart = chart.createChartCentroides(cluster[selected - 3].ClusterMean, selected - 3, "");
                    frame = new Form();
                    myChart.Dock = DockStyle.Fill;
                    frame.Text = "Cluster " + selected;
                    frame.Controls.Add(myChart);
                    frame.Show();
                    break;
            }
        }