Ejemplo n.º 1
0
 public VirtualChart(IContainer container)
 {
     using (PresenterFactory.BeginSharedPresenterTransaction(container, new EmptyPostableForm()))
     {
         m_SharedPresenter = PresenterFactory.SharedPresenter;
         // any size
         m_ChartDetail = new ChartDetailForm {
             Size = new Size(1000, 1000)
         };
     }
 }
Ejemplo n.º 2
0
        public ChartExportDTO ExportToJpgBytes(long viewId, int width, int height)
        {
            using (var chartForm = new ChartDetailForm())
            {
                chartForm.Size       = new Size(width, height);
                chartForm.DataSource = CreateChartData();
                object id = viewId;
                chartForm.LoadData(ref id);
                chartForm.ChartControlSize = new Size(width, height);

                ChartExportDTO export = chartForm.ExportToJpgBytes(new byte[0], DBChartType.chrBar);
                return(export);
            }
        }
Ejemplo n.º 3
0
 public void Dispose()
 {
     if (m_ChartDetail != null)
     {
         DataTable oldDataSource = m_ChartDetail.DataSource;
         if (oldDataSource != null)
         {
             m_ChartDetail.DataSource = null;
             DbDisposeHelper.DisposeTable(ref oldDataSource, true);
         }
         m_ChartDetail.Dispose();
         m_ChartDetail = null;
     }
     if (m_SharedPresenter != null)
     {
         m_SharedPresenter.Dispose();
     }
 }