예제 #1
0
        /// <summary>
        /// Init Chart adapter by chart type
        /// </summary>
        protected void InitChartAdapter()
        {
            _currentAdapter = GetChartAdapter(_chartControl);

            if (_currentAdapter == null)
            {
                throw new ArgumentException("The chart is not supported");
            }
            _currentAdapter.SetChartControl(_chartControl);
        }
예제 #2
0
        private void AddChartToList(IComponent chart)
        {
            if (_component.ValidateControl(chart))
            {
                ListViewItem item = new ListViewItem(((Control)chart).Name, 0);
                item.Tag = chart;
                this.lvCharts.Items.Add(item);

                IChartAdapter _adp = _component.GetChartAdapter(chart);

                Image resultImage = GetChartImage(_adp.GetType());

                if (resultImage != null)
                {
                    int index = 0;
                    imageListCharts.Images.Add(resultImage);
                    index = imageListCharts.Images.Count;

                    item.ImageIndex = index - 1;
                }
            }
        }
예제 #3
0
		/// <summary>
		/// Init Chart adapter by chart type
		/// </summary>
		protected void InitChartAdapter()
		{

			_currentAdapter = GetChartAdapter(_chartControl);

			if (_currentAdapter == null)
				throw new ArgumentException("The chart is not supported");
			_currentAdapter.SetChartControl(_chartControl);
		}