[Quantproject-developers] QuantProject/b5_Presentation/Reporting/WindowsForm Report.cs,1.16,1.17
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2006-05-31 14:31:40
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10619/b5_Presentation/Reporting/WindowsForm Modified Files: Report.cs Log Message: - a new constructor has been added; now it is possible to create a report that will not display the benchmark equity line - the Create method has been overloaded: now it is possible to create a report that will not display the benchmark equity line - the AddEquityLine public method has been added: now it is possible to add multiple equity lines to the report Index: Report.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm/Report.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Report.cs 3 Aug 2005 18:55:10 -0000 1.16 --- Report.cs 31 May 2006 14:31:32 -0000 1.17 *************** *** 21,25 **** --- 21,27 ---- */ using System; + using System.Drawing; using System.Windows.Forms; + using QuantProject.ADT; using QuantProject.Business.DataProviders; *************** *** 72,79 **** public Report( AccountReport accountReport ) { this.accountReport = accountReport; this.account = this.accountReport.Account; this.initializeComponent(); ! this.create_populateForm(); } --- 74,89 ---- public Report( AccountReport accountReport ) { + this.report( accountReport , true ); + } + public Report( AccountReport accountReport , bool showBenchmark ) + { + this.report( accountReport , showBenchmark ); + } + private void report( AccountReport accountReport , bool showBenchmark ) + { this.accountReport = accountReport; this.account = this.accountReport.Account; this.initializeComponent(); ! this.create_populateForm( showBenchmark ); } *************** *** 117,126 **** this.historicalQuoteProvider ); } ! private void create_populateForm() { this.Location = new System.Drawing.Point( 1000,500); this.Width = 700; this.Height = 500; ! this.reportTabControl = new ReportTabControl( this.accountReport ); this.Controls.Add( this.reportTabControl ); } --- 127,137 ---- this.historicalQuoteProvider ); } ! private void create_populateForm( bool showBenchmark ) { this.Location = new System.Drawing.Point( 1000,500); this.Width = 700; this.Height = 500; ! this.reportTabControl = new ReportTabControl( this.accountReport , ! showBenchmark ); this.Controls.Add( this.reportTabControl ); } *************** *** 132,141 **** /// <param name="endDateTime"></param> /// <param name="benchmark"></param> ! public void Create( string reportName , ! int numDaysForInterval , EndOfDayDateTime endDateTime , string benchmark ) { create_set_accountReport( reportName , numDaysForInterval , endDateTime , benchmark ); ! create_populateForm(); } public void Show( string reportName , --- 143,158 ---- /// <param name="endDateTime"></param> /// <param name="benchmark"></param> ! public void Create( string reportName , int numDaysForInterval , ! EndOfDayDateTime endDateTime , string benchmark ) ! { ! this.Create( reportName , numDaysForInterval , endDateTime , ! benchmark , true ); ! } ! public void Create( string reportName , int numDaysForInterval , ! EndOfDayDateTime endDateTime , string benchmark , bool showBenchmark ) { create_set_accountReport( reportName , numDaysForInterval , endDateTime , benchmark ); ! create_populateForm( showBenchmark ); } public void Show( string reportName , *************** *** 248,251 **** --- 265,273 ---- #endregion + public void AddEquityLine( EquityLine equityLine , + Color color ) + { + this.reportTabControl.EquityChart.Add( equityLine , color ); + } // /// <summary> |