[Quantproject-developers] QuantDownloader/Downloader TickerDownloader.cs,1.14,1.15 WebDownloader.cs,
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-01-22 19:35:13
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19124/Downloader Modified Files: TickerDownloader.cs WebDownloader.cs Log Message: WebDownloader form and ticker downloader class updated: it is now possible to choose if computation of close to close ratios (for new quotes only) has to be done during downloading of new quotes Index: WebDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/WebDownloader.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** WebDownloader.cs 5 Sep 2004 13:57:00 -0000 1.17 --- WebDownloader.cs 22 Jan 2005 19:35:04 -0000 1.18 *************** *** 50,58 **** private System.Windows.Forms.Button buttonAbort; private Thread downloadThread = null; ! ! /// <summary> ! /// Required designer variable. ! /// </summary> ! private System.ComponentModel.Container components = null; public WebDownloader() --- 50,56 ---- private System.Windows.Forms.Button buttonAbort; private Thread downloadThread = null; ! internal System.Windows.Forms.CheckBox checkBoxComputeCloseToCloseValues; ! private System.Windows.Forms.ToolTip toolTip1; ! private System.ComponentModel.IContainer components; public WebDownloader() *************** *** 115,118 **** --- 113,119 ---- this.radioButtonDownloadOnlyAfterMax.Checked = true; this.dataGrid1.ContextMenu = new TickerViewerMenu(this); + this.toolTip1.SetToolTip(this.checkBoxComputeCloseToCloseValues, + "It is possible to compute close to close " + + "ratios out of connection"); //this.downloadThread = new Thread( new ThreadStart( this.downloadQuotes_createTickerDataSet)); } *************** *** 126,129 **** --- 127,131 ---- private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.button1 = new System.Windows.Forms.Button(); this.dataGrid1 = new System.Windows.Forms.DataGrid(); *************** *** 149,152 **** --- 151,156 ---- this.radioButtonOverWriteYes = new System.Windows.Forms.RadioButton(); this.buttonAbort = new System.Windows.Forms.Button(); + this.checkBoxComputeCloseToCloseValues = new System.Windows.Forms.CheckBox(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); this.groupBoxWebDownloaderOptions.SuspendLayout(); *************** *** 156,160 **** // button1 // ! this.button1.Location = new System.Drawing.Point(88, 352); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(112, 32); --- 160,164 ---- // button1 // ! this.button1.Location = new System.Drawing.Point(16, 392); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(112, 32); *************** *** 251,255 **** // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(88, 392); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(112, 32); --- 255,259 ---- // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(136, 392); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(112, 32); *************** *** 260,264 **** // labelNumberOfTickersToDownload // ! this.labelNumberOfTickersToDownload.Location = new System.Drawing.Point(152, 440); this.labelNumberOfTickersToDownload.Name = "labelNumberOfTickersToDownload"; this.labelNumberOfTickersToDownload.Size = new System.Drawing.Size(48, 24); --- 264,268 ---- // labelNumberOfTickersToDownload // ! this.labelNumberOfTickersToDownload.Location = new System.Drawing.Point(160, 448); this.labelNumberOfTickersToDownload.Name = "labelNumberOfTickersToDownload"; this.labelNumberOfTickersToDownload.Size = new System.Drawing.Size(48, 24); *************** *** 268,272 **** // labelTickersLeft // ! this.labelTickersLeft.Location = new System.Drawing.Point(8, 440); this.labelTickersLeft.Name = "labelTickersLeft"; this.labelTickersLeft.Size = new System.Drawing.Size(136, 24); --- 272,276 ---- // labelTickersLeft // ! this.labelTickersLeft.Location = new System.Drawing.Point(16, 448); this.labelTickersLeft.Name = "labelTickersLeft"; this.labelTickersLeft.Size = new System.Drawing.Size(136, 24); *************** *** 276,280 **** // dateTimePickerStartingDate // ! this.dateTimePickerStartingDate.Location = new System.Drawing.Point(96, 104); this.dateTimePickerStartingDate.Name = "dateTimePickerStartingDate"; this.dateTimePickerStartingDate.Size = new System.Drawing.Size(184, 20); --- 280,284 ---- // dateTimePickerStartingDate // ! this.dateTimePickerStartingDate.Location = new System.Drawing.Point(96, 96); this.dateTimePickerStartingDate.Name = "dateTimePickerStartingDate"; this.dateTimePickerStartingDate.Size = new System.Drawing.Size(184, 20); *************** *** 283,287 **** // labelStartingDateTime // ! this.labelStartingDateTime.Location = new System.Drawing.Point(8, 104); this.labelStartingDateTime.Name = "labelStartingDateTime"; this.labelStartingDateTime.Size = new System.Drawing.Size(80, 23); --- 287,291 ---- // labelStartingDateTime // ! this.labelStartingDateTime.Location = new System.Drawing.Point(8, 96); this.labelStartingDateTime.Name = "labelStartingDateTime"; this.labelStartingDateTime.Size = new System.Drawing.Size(80, 23); *************** *** 311,315 **** this.radioButtonAllAvailableUntilNowSinceStartingDate, this.radioButtonAllAvailableUntilNow}); ! this.groupBoxWebDownloaderOptions.Location = new System.Drawing.Point(8, 8); this.groupBoxWebDownloaderOptions.Name = "groupBoxWebDownloaderOptions"; this.groupBoxWebDownloaderOptions.Size = new System.Drawing.Size(288, 88); --- 315,319 ---- this.radioButtonAllAvailableUntilNowSinceStartingDate, this.radioButtonAllAvailableUntilNow}); ! this.groupBoxWebDownloaderOptions.Location = new System.Drawing.Point(8, 0); this.groupBoxWebDownloaderOptions.Name = "groupBoxWebDownloaderOptions"; this.groupBoxWebDownloaderOptions.Size = new System.Drawing.Size(288, 88); *************** *** 381,386 **** // this.buttonAbort.Enabled = false; ! this.buttonAbort.Location = new System.Drawing.Point(216, 376); this.buttonAbort.Name = "buttonAbort"; this.buttonAbort.TabIndex = 15; this.buttonAbort.Text = "Abort"; --- 385,391 ---- // this.buttonAbort.Enabled = false; ! this.buttonAbort.Location = new System.Drawing.Point(256, 408); this.buttonAbort.Name = "buttonAbort"; + this.buttonAbort.Size = new System.Drawing.Size(32, 23); this.buttonAbort.TabIndex = 15; this.buttonAbort.Text = "Abort"; *************** *** 388,396 **** this.buttonAbort.Click += new System.EventHandler(this.buttonAbort_Click); // // WebDownloader // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(840, 470); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.buttonAbort, this.groupBoxUpdateDatabaseOptions, --- 393,410 ---- this.buttonAbort.Click += new System.EventHandler(this.buttonAbort_Click); // + // checkBoxComputeCloseToCloseValues + // + this.checkBoxComputeCloseToCloseValues.Location = new System.Drawing.Point(16, 352); + this.checkBoxComputeCloseToCloseValues.Name = "checkBoxComputeCloseToCloseValues"; + this.checkBoxComputeCloseToCloseValues.Size = new System.Drawing.Size(272, 24); + this.checkBoxComputeCloseToCloseValues.TabIndex = 16; + this.checkBoxComputeCloseToCloseValues.Text = "Compute close to close ratios (slower)"; + // // WebDownloader // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(840, 486); this.Controls.AddRange(new System.Windows.Forms.Control[] { + this.checkBoxComputeCloseToCloseValues, this.buttonAbort, this.groupBoxUpdateDatabaseOptions, *************** *** 730,734 **** this.downloadThread.Abort(); } ! public bool IsBeforeAndAfterSelected { --- 744,756 ---- this.downloadThread.Abort(); } ! ! public bool IsComputeCloseToCloseRatioSelected ! { ! get ! { ! return this.checkBoxComputeCloseToCloseValues.Checked; ! } ! } ! public bool IsBeforeAndAfterSelected { Index: TickerDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerDownloader.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TickerDownloader.cs 20 Jan 2005 19:16:14 -0000 1.14 --- TickerDownloader.cs 22 Jan 2005 19:35:04 -0000 1.15 *************** *** 391,396 **** { if(this.p_myForm.IsOverWriteYesSelected) ! Quotes.Delete(this.p_quTicker); ! QuantProject.DataAccess.Tables.Quotes.ComputeCloseToCloseValues(this.downloadedValuesFromSource); this.adapter.OleDbDataAdapter.ContinueUpdateOnError = true; int rowsUpdated = this.adapter.OleDbDataAdapter.Update(this.downloadedValuesFromSource); --- 391,397 ---- { if(this.p_myForm.IsOverWriteYesSelected) ! Quotes.Delete(this.p_quTicker); ! if(this.p_myForm.IsComputeCloseToCloseRatioSelected) ! QuantProject.DataAccess.Tables.Quotes.ComputeCloseToCloseValues(this.downloadedValuesFromSource); this.adapter.OleDbDataAdapter.ContinueUpdateOnError = true; int rowsUpdated = this.adapter.OleDbDataAdapter.Update(this.downloadedValuesFromSource); |