[Quantproject-developers] QuantDownloader/Downloader/QuotesEditor VisualValidationDataGrid.cs,1.1,1.
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-03-28 22:12:38
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18223/Downloader/QuotesEditor Modified Files: VisualValidationDataGrid.cs Log Message: Now each quote is visually validated by itself (all or none were the two only options with the previous version) Index: VisualValidationDataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/VisualValidationDataGrid.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VisualValidationDataGrid.cs 21 Mar 2004 16:46:51 -0000 1.1 --- VisualValidationDataGrid.cs 28 Mar 2004 22:01:05 -0000 1.2 *************** *** 32,36 **** /// DataGrid used for (record by record) visual validation /// </summary> ! public class VisualValidationDataGrid : ValidationDataGrid { private DataView dataView; --- 32,36 ---- /// DataGrid used for (record by record) visual validation /// </summary> ! public abstract class VisualValidationDataGrid : ValidationDataGrid { private DataView dataView; *************** *** 93,105 **** this.setStyles(); } ! private void confirmVisualValidation() ! { ! VisuallyValidatedTickers.ValidateCloseToClose( ((QuotesEditor)this.FindForm()).Ticker ); ! } protected override void OnMouseUp(MouseEventArgs e) { ! Console.WriteLine( "VisualValidationDataGrid.OnMouseUp() " + ! this[ this.CurrentRowIndex , 0 ].ToString() ); ! ((VisualValidationTabPage)this.Parent).VisualValidationChart.Invalidate( true ); base.OnMouseUp( e ); } --- 93,105 ---- this.setStyles(); } ! protected abstract void confirmVisualValidation( string ticker , DateTime quoteDate ); ! // { ! // VisuallyValidatedTickers.ValidateCloseToClose( ((QuotesEditor)this.FindForm()).Ticker ); ! // } protected override void OnMouseUp(MouseEventArgs e) { ! // Console.WriteLine( "VisualValidationDataGrid.OnMouseUp() " + ! // this[ this.CurrentRowIndex , 0 ].ToString() ); ! // ((VisualValidationTabPage)this.Parent).VisualValidationChart.Invalidate( true ); base.OnMouseUp( e ); } *************** *** 116,129 **** this[this.CurrentCell] = !System.Convert.ToBoolean(this[this.CurrentCell]); this.Select( true , true ); - } - // DataView checkedDataView = new DataView( ((QuotesEditor)this.FindForm()).ValidateDataTable ); - // checkedDataView.RowFilter = "(" + this.dataView.RowFilter + - // " AND (CloseToCloseHasBeenVisuallyValidated=true))"; - int checkedItems = 0; - for (int rowIndex=0 ; rowIndex<this.dataView.Count ; rowIndex++) - if ( (bool)this[ rowIndex , 2] ) - checkedItems++; - if ( checkedItems == this.dataView.Count ) - // all suspicious data rows have been visually validated if ( MessageBox.Show( this , "You have visually validated all the suspicious " + "quotes, with respect to the " + this.confirmMessage + --- 116,119 ---- *************** *** 135,139 **** MessageBoxDefaultButton.Button1 ) == DialogResult.Yes ) // the user asked to write the visual validation to the database ! this.confirmVisualValidation(); } protected override void OnPaint( PaintEventArgs e ) --- 125,153 ---- MessageBoxDefaultButton.Button1 ) == DialogResult.Yes ) // the user asked to write the visual validation to the database ! { ! this.confirmVisualValidation( ((QuotesEditor)this.FindForm()).Ticker , ! (DateTime)this[ this.CurrentCell.RowNumber , 0 ] ); ! ((QuotesEditor)this.FindForm()).Renew(); ! } ! } ! // DataView checkedDataView = new DataView( ((QuotesEditor)this.FindForm()).ValidateDataTable ); ! // checkedDataView.RowFilter = "(" + this.dataView.RowFilter + ! // " AND (CloseToCloseHasBeenVisuallyValidated=true))"; ! // int checkedItems = 0; ! // for (int rowIndex=0 ; rowIndex<this.dataView.Count ; rowIndex++) ! // if ( (bool)this[ rowIndex , 2] ) ! // checkedItems++; ! // if ( checkedItems == this.dataView.Count ) ! // // all suspicious data rows have been visually validated ! // if ( MessageBox.Show( this , "You have visually validated all the suspicious " + ! // "quotes, with respect to the " + this.confirmMessage + ! // ". Do you confirm your " + ! // "visual validation to be permanentely stored into the database?" , ! // "Visual Validation Confirmation" , ! // MessageBoxButtons.YesNo , ! // MessageBoxIcon.Question , ! // MessageBoxDefaultButton.Button1 ) == DialogResult.Yes ) ! // // the user asked to write the visual validation to the database ! // this.confirmVisualValidation(); } protected override void OnPaint( PaintEventArgs e ) |