Exemple #1
0
        public static Chart GetChart(string type)
        {
            Chart chart = null;
            if (type == g.day)
                chart = dayChart;
            else if (type == g.week)
                chart = weekChart;
            else if (type == g.month)
                chart = monthChart;

            if (chart == null)
            {
                chart = new Chart(type);
                SetChart(chart, type);
            }
            else
                chart.Update();

            return chart;
        }
Exemple #2
0
 public static void SetChart(Chart chart, string type)
 {
     if (type == g.day)
         dayChart = chart;
     else if (type == g.week)
         weekChart = chart;
     else if (type == g.month)
         monthChart = chart;
 }