示例#1
0
        /// <summary>
        /// Add A Chart To The Window
        /// </summary>
        /// <param name="chart">The Chart To Add To The Window</param>
        public void AddChart(ChartInfo chart)
        {
            GraphWindow.Grid.Children.Add(chart.Chart);
            Grid.SetRow(chart.Chart, _row);
            Grid.SetColumn(chart.Chart, _col++);

            if (_col >= MaxCols)
            {
                _row++;
                _col = 0;
            }

            if (_row >= MaxRows)
            {
                _row     = 0;
                _col     = 0;
                _chartid = 0;
            }

            if (Charts[_chartid] != null)
            {
                Charts.Remove(_chartid);
            }
            Charts.Add(_chartid, chart.Chart);
            ID = _chartid++;

            ShowChart();
        }
示例#2
0
 /// <summary>
 /// Constructor To Set Window Title And Add A Chart
 /// </summary>
 /// <param name="wtitle">The Title Of The Window</param>
 /// <param name="chart">The Chart To Be Added</param>
 public GraphHolder(string wtitle, ChartInfo chart) : base(new GraphWindow(), wtitle)
 {
     Charts = new Hashtable();
     AddChart(chart);
 }