[Quantproject-developers] QuantDownloader/Downloader/OpenTickDownloader/UserForms OTWebDownloader.
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2009-01-06 17:24:37
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/UserForms In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14342/Downloader/OpenTickDownloader/UserForms Modified Files: OTWebDownloader.cs Log Message: The interface for the OT Ticker Downloader has been changed: now it is possible to select manually the daily times for the bar to be downloaded. The box "number of bars" has been deleted. Index: OTWebDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/UserForms/OTWebDownloader.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OTWebDownloader.cs 30 Nov 2008 22:42:37 -0000 1.6 --- OTWebDownloader.cs 6 Jan 2009 17:24:33 -0000 1.7 *************** *** 23,26 **** --- 23,27 ---- using System.Drawing; using System.Collections; + using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; *************** *** 30,33 **** --- 31,36 ---- using System.IO; using System.Threading; + + using QuantProject.ADT.Timing; using QuantProject.DataAccess; using QuantProject.DataAccess.Tables; *************** *** 60,64 **** private string[] tickersToDownload; private SortedList downloadingTickersSortedList; ! private int indexOfCurrentUpdatingTicker; private DateTime currentUpdatingTickerDateTimeOfLastBarUpdate; --- 63,67 ---- private string[] tickersToDownload; private SortedList downloadingTickersSortedList; ! private int indexOfCurrentUpdatingTicker; private DateTime currentUpdatingTickerDateTimeOfLastBarUpdate; *************** *** 128,140 **** this.timeFrameInSeconds = new System.Windows.Forms.NumericUpDown(); this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.fromHour = new System.Windows.Forms.NumericUpDown(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.fromMin = new System.Windows.Forms.NumericUpDown(); - this.label6 = new System.Windows.Forms.Label(); - this.numberOfBars = new System.Windows.Forms.NumericUpDown(); - this.fromSec = new System.Windows.Forms.NumericUpDown(); - this.label7 = new System.Windows.Forms.Label(); this.txtOpenTickUser = new System.Windows.Forms.TextBox(); this.label8 = new System.Windows.Forms.Label(); --- 131,134 ---- *************** *** 147,157 **** this.startingDownloadingTimeLabel = new System.Windows.Forms.Label(); this.signallingLabel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); this.groupBoxWebDownloaderOptions.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.timeFrameInSeconds)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.fromHour)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.fromMin)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numberOfBars)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.fromSec)).BeginInit(); this.SuspendLayout(); // --- 141,149 ---- this.startingDownloadingTimeLabel = new System.Windows.Forms.Label(); this.signallingLabel = new System.Windows.Forms.Label(); + this.checkedListOfDailyTimes = new System.Windows.Forms.CheckedListBox(); + this.button1 = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); this.groupBoxWebDownloaderOptions.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.timeFrameInSeconds)).BeginInit(); this.SuspendLayout(); // *************** *** 164,173 **** this.dataGrid1.Name = "dataGrid1"; this.dataGrid1.ReadOnly = true; ! this.dataGrid1.Size = new System.Drawing.Size(352, 459); this.dataGrid1.TabIndex = 1; // // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(6, 408); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(72, 32); --- 156,165 ---- this.dataGrid1.Name = "dataGrid1"; this.dataGrid1.ReadOnly = true; ! this.dataGrid1.Size = new System.Drawing.Size(352, 469); this.dataGrid1.TabIndex = 1; // // buttonDownloadQuotesOfSelectedTickers // ! this.buttonDownloadQuotesOfSelectedTickers.Location = new System.Drawing.Point(5, 418); this.buttonDownloadQuotesOfSelectedTickers.Name = "buttonDownloadQuotesOfSelectedTickers"; this.buttonDownloadQuotesOfSelectedTickers.Size = new System.Drawing.Size(72, 32); *************** *** 208,214 **** this.groupBoxWebDownloaderOptions.Controls.Add(this.dateTimePickerStartingDate); this.groupBoxWebDownloaderOptions.Controls.Add(this.labelStartingDateTime); ! this.groupBoxWebDownloaderOptions.Location = new System.Drawing.Point(10, 97); this.groupBoxWebDownloaderOptions.Name = "groupBoxWebDownloaderOptions"; ! this.groupBoxWebDownloaderOptions.Size = new System.Drawing.Size(336, 134); this.groupBoxWebDownloaderOptions.TabIndex = 13; this.groupBoxWebDownloaderOptions.TabStop = false; --- 200,206 ---- this.groupBoxWebDownloaderOptions.Controls.Add(this.dateTimePickerStartingDate); this.groupBoxWebDownloaderOptions.Controls.Add(this.labelStartingDateTime); ! this.groupBoxWebDownloaderOptions.Location = new System.Drawing.Point(12, 122); this.groupBoxWebDownloaderOptions.Name = "groupBoxWebDownloaderOptions"; ! this.groupBoxWebDownloaderOptions.Size = new System.Drawing.Size(336, 141); this.groupBoxWebDownloaderOptions.TabIndex = 13; this.groupBoxWebDownloaderOptions.TabStop = false; *************** *** 217,221 **** // radioButtonDownloadOnlyAfterMax // ! this.radioButtonDownloadOnlyAfterMax.Location = new System.Drawing.Point(8, 75); this.radioButtonDownloadOnlyAfterMax.Name = "radioButtonDownloadOnlyAfterMax"; this.radioButtonDownloadOnlyAfterMax.Size = new System.Drawing.Size(307, 55); --- 209,213 ---- // radioButtonDownloadOnlyAfterMax // ! this.radioButtonDownloadOnlyAfterMax.Location = new System.Drawing.Point(6, 79); this.radioButtonDownloadOnlyAfterMax.Name = "radioButtonDownloadOnlyAfterMax"; this.radioButtonDownloadOnlyAfterMax.Size = new System.Drawing.Size(307, 55); *************** *** 226,230 **** // label1 // ! this.label1.Location = new System.Drawing.Point(10, 243); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 41); --- 218,222 ---- // label1 // ! this.label1.Location = new System.Drawing.Point(10, 269); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 41); *************** *** 234,238 **** // dateTimeOverwriteQuotesBefore // ! this.dateTimeOverwriteQuotesBefore.Location = new System.Drawing.Point(96, 247); this.dateTimeOverwriteQuotesBefore.Name = "dateTimeOverwriteQuotesBefore"; this.dateTimeOverwriteQuotesBefore.Size = new System.Drawing.Size(229, 20); --- 226,230 ---- // dateTimeOverwriteQuotesBefore // ! this.dateTimeOverwriteQuotesBefore.Location = new System.Drawing.Point(98, 269); this.dateTimeOverwriteQuotesBefore.Name = "dateTimeOverwriteQuotesBefore"; this.dateTimeOverwriteQuotesBefore.Size = new System.Drawing.Size(229, 20); *************** *** 247,251 **** 0, 0}); ! this.timeFrameInSeconds.Location = new System.Drawing.Point(114, 56); this.timeFrameInSeconds.Maximum = new decimal(new int[] { 3600, --- 239,243 ---- 0, 0}); ! this.timeFrameInSeconds.Location = new System.Drawing.Point(299, 55); this.timeFrameInSeconds.Maximum = new decimal(new int[] { 3600, *************** *** 269,273 **** // label2 // ! this.label2.Location = new System.Drawing.Point(6, 58); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(102, 20); --- 261,265 ---- // label2 // ! this.label2.Location = new System.Drawing.Point(191, 57); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(102, 20); *************** *** 275,394 **** this.label2.Text = "Time Frame (sec.)"; // - // label3 - // - this.label3.Location = new System.Drawing.Point(6, 26); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(46, 23); - this.label3.TabIndex = 19; - this.label3.Text = "From:"; - // - // fromHour - // - this.fromHour.Location = new System.Drawing.Point(72, 25); - this.fromHour.Maximum = new decimal(new int[] { - 16, - 0, - 0, - 0}); - this.fromHour.Minimum = new decimal(new int[] { - 9, - 0, - 0, - 0}); - this.fromHour.Name = "fromHour"; - this.fromHour.Size = new System.Drawing.Size(42, 20); - this.fromHour.TabIndex = 20; - this.fromHour.Value = new decimal(new int[] { - 9, - 0, - 0, - 0}); - // - // label4 - // - this.label4.Location = new System.Drawing.Point(44, 27); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(22, 13); - this.label4.TabIndex = 21; - this.label4.Text = "H."; - // - // label5 - // - this.label5.Location = new System.Drawing.Point(120, 27); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(30, 13); - this.label5.TabIndex = 23; - this.label5.Text = "Min."; - // - // fromMin - // - this.fromMin.Location = new System.Drawing.Point(156, 25); - this.fromMin.Maximum = new decimal(new int[] { - 59, - 0, - 0, - 0}); - this.fromMin.Name = "fromMin"; - this.fromMin.Size = new System.Drawing.Size(45, 20); - this.fromMin.TabIndex = 22; - this.fromMin.Value = new decimal(new int[] { - 30, - 0, - 0, - 0}); - // - // label6 - // - this.label6.Location = new System.Drawing.Point(169, 58); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(68, 20); - this.label6.TabIndex = 25; - this.label6.Text = "n° of bars"; - // - // numberOfBars - // - this.numberOfBars.Location = new System.Drawing.Point(243, 56); - this.numberOfBars.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.numberOfBars.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numberOfBars.Name = "numberOfBars"; - this.numberOfBars.Size = new System.Drawing.Size(59, 20); - this.numberOfBars.TabIndex = 24; - this.numberOfBars.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // fromSec - // - this.fromSec.Location = new System.Drawing.Point(257, 24); - this.fromSec.Maximum = new decimal(new int[] { - 59, - 0, - 0, - 0}); - this.fromSec.Name = "fromSec"; - this.fromSec.Size = new System.Drawing.Size(45, 20); - this.fromSec.TabIndex = 26; - // - // label7 - // - this.label7.Location = new System.Drawing.Point(219, 26); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(30, 13); - this.label7.TabIndex = 27; - this.label7.Text = "Sec."; - // // txtOpenTickUser // ! this.txtOpenTickUser.Location = new System.Drawing.Point(63, 361); this.txtOpenTickUser.Name = "txtOpenTickUser"; this.txtOpenTickUser.Size = new System.Drawing.Size(78, 20); --- 267,273 ---- this.label2.Text = "Time Frame (sec.)"; // // txtOpenTickUser // ! this.txtOpenTickUser.Location = new System.Drawing.Point(63, 382); this.txtOpenTickUser.Name = "txtOpenTickUser"; this.txtOpenTickUser.Size = new System.Drawing.Size(78, 20); *************** *** 397,401 **** // label8 // ! this.label8.Location = new System.Drawing.Point(6, 361); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(37, 23); --- 276,280 ---- // label8 // ! this.label8.Location = new System.Drawing.Point(6, 382); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(37, 23); *************** *** 405,409 **** // label9 // ! this.label9.Location = new System.Drawing.Point(169, 361); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(58, 23); --- 284,288 ---- // label9 // ! this.label9.Location = new System.Drawing.Point(169, 382); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(58, 23); *************** *** 413,417 **** // txtOpenTickPassword // ! this.txtOpenTickPassword.Location = new System.Drawing.Point(247, 361); this.txtOpenTickPassword.Name = "txtOpenTickPassword"; this.txtOpenTickPassword.Size = new System.Drawing.Size(78, 20); --- 292,296 ---- // txtOpenTickPassword // ! this.txtOpenTickPassword.Location = new System.Drawing.Point(247, 382); this.txtOpenTickPassword.Name = "txtOpenTickPassword"; this.txtOpenTickPassword.Size = new System.Drawing.Size(78, 20); *************** *** 421,425 **** // checkBoxCheckingForMissingQuotes // ! this.checkBoxCheckingForMissingQuotes.Location = new System.Drawing.Point(12, 331); this.checkBoxCheckingForMissingQuotes.Name = "checkBoxCheckingForMissingQuotes"; this.checkBoxCheckingForMissingQuotes.Size = new System.Drawing.Size(315, 24); --- 300,304 ---- // checkBoxCheckingForMissingQuotes // ! this.checkBoxCheckingForMissingQuotes.Location = new System.Drawing.Point(12, 352); this.checkBoxCheckingForMissingQuotes.Name = "checkBoxCheckingForMissingQuotes"; this.checkBoxCheckingForMissingQuotes.Size = new System.Drawing.Size(315, 24); *************** *** 430,434 **** // checkBoxOverWrite // ! this.checkBoxOverWrite.Location = new System.Drawing.Point(12, 287); this.checkBoxOverWrite.Name = "checkBoxOverWrite"; this.checkBoxOverWrite.Size = new System.Drawing.Size(246, 38); --- 309,313 ---- // checkBoxOverWrite // ! this.checkBoxOverWrite.Location = new System.Drawing.Point(12, 308); this.checkBoxOverWrite.Name = "checkBoxOverWrite"; this.checkBoxOverWrite.Size = new System.Drawing.Size(246, 38); *************** *** 439,453 **** // label10 // ! this.label10.Location = new System.Drawing.Point(93, -1); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(131, 23); this.label10.TabIndex = 34; ! this.label10.Text = "New York Local Time"; // // endingDownloadingTimeLabel // ! this.endingDownloadingTimeLabel.Location = new System.Drawing.Point(84, 436); this.endingDownloadingTimeLabel.Name = "endingDownloadingTimeLabel"; ! this.endingDownloadingTimeLabel.Size = new System.Drawing.Size(262, 23); this.endingDownloadingTimeLabel.TabIndex = 36; this.endingDownloadingTimeLabel.Text = "."; --- 318,332 ---- // label10 // ! this.label10.Location = new System.Drawing.Point(12, 0); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(131, 23); this.label10.TabIndex = 34; ! this.label10.Text = "New York Local Times"; // // endingDownloadingTimeLabel // ! this.endingDownloadingTimeLabel.Location = new System.Drawing.Point(83, 452); this.endingDownloadingTimeLabel.Name = "endingDownloadingTimeLabel"; ! this.endingDownloadingTimeLabel.Size = new System.Drawing.Size(262, 20); this.endingDownloadingTimeLabel.TabIndex = 36; this.endingDownloadingTimeLabel.Text = "."; *************** *** 455,461 **** // startingDownloadingTimeLabel // ! this.startingDownloadingTimeLabel.Location = new System.Drawing.Point(84, 392); this.startingDownloadingTimeLabel.Name = "startingDownloadingTimeLabel"; ! this.startingDownloadingTimeLabel.Size = new System.Drawing.Size(262, 23); this.startingDownloadingTimeLabel.TabIndex = 37; this.startingDownloadingTimeLabel.Text = "."; --- 334,340 ---- // startingDownloadingTimeLabel // ! this.startingDownloadingTimeLabel.Location = new System.Drawing.Point(83, 405); this.startingDownloadingTimeLabel.Name = "startingDownloadingTimeLabel"; ! this.startingDownloadingTimeLabel.Size = new System.Drawing.Size(262, 22); this.startingDownloadingTimeLabel.TabIndex = 37; this.startingDownloadingTimeLabel.Text = "."; *************** *** 463,475 **** // signallingLabel // ! this.signallingLabel.Location = new System.Drawing.Point(84, 415); this.signallingLabel.Name = "signallingLabel"; ! this.signallingLabel.Size = new System.Drawing.Size(274, 12); this.signallingLabel.TabIndex = 38; // // OTWebDownloader // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(734, 459); this.Controls.Add(this.signallingLabel); this.Controls.Add(this.startingDownloadingTimeLabel); --- 342,375 ---- // signallingLabel // ! this.signallingLabel.Location = new System.Drawing.Point(83, 427); this.signallingLabel.Name = "signallingLabel"; ! this.signallingLabel.Size = new System.Drawing.Size(274, 23); this.signallingLabel.TabIndex = 38; // + // checkedListOfDailyTimes + // + this.checkedListOfDailyTimes.FormattingEnabled = true; + this.checkedListOfDailyTimes.Location = new System.Drawing.Point(12, 22); + this.checkedListOfDailyTimes.Name = "checkedListOfDailyTimes"; + this.checkedListOfDailyTimes.Size = new System.Drawing.Size(173, 94); + this.checkedListOfDailyTimes.TabIndex = 39; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(227, 12); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(66, 23); + this.button1.TabIndex = 40; + this.button1.Text = "button1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Visible = false; + this.button1.Click += new System.EventHandler(this.Button1Click); + // // OTWebDownloader // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(734, 469); ! this.Controls.Add(this.button1); ! this.Controls.Add(this.checkedListOfDailyTimes); this.Controls.Add(this.signallingLabel); this.Controls.Add(this.startingDownloadingTimeLabel); *************** *** 482,494 **** this.Controls.Add(this.label8); this.Controls.Add(this.txtOpenTickUser); - this.Controls.Add(this.label7); - this.Controls.Add(this.fromSec); - this.Controls.Add(this.label6); - this.Controls.Add(this.numberOfBars); - this.Controls.Add(this.label5); - this.Controls.Add(this.fromMin); - this.Controls.Add(this.label4); - this.Controls.Add(this.fromHour); - this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.timeFrameInSeconds); --- 382,385 ---- *************** *** 505,515 **** this.groupBoxWebDownloaderOptions.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.timeFrameInSeconds)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.fromHour)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.fromMin)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numberOfBars)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.fromSec)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } private System.Windows.Forms.Label signallingLabel; private System.Windows.Forms.Label endingDownloadingTimeLabel; --- 396,404 ---- this.groupBoxWebDownloaderOptions.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.timeFrameInSeconds)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } + private System.Windows.Forms.Button button1; + private System.Windows.Forms.CheckedListBox checkedListOfDailyTimes; private System.Windows.Forms.Label signallingLabel; private System.Windows.Forms.Label endingDownloadingTimeLabel; *************** *** 523,536 **** private System.Windows.Forms.TextBox txtOpenTickUser; private System.Windows.Forms.NumericUpDown timeFrameInSeconds; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.NumericUpDown fromSec; - private System.Windows.Forms.NumericUpDown numberOfBars; private System.Windows.Forms.DateTimePicker dateTimeOverwriteQuotesBefore; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.NumericUpDown fromMin; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.NumericUpDown fromHour; - private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; --- 412,416 ---- *************** *** 576,588 **** { try{ OTTickerDownloader tickerDownloader = new OTTickerDownloader( this.TickersToDownload, this.StartingNewYorkDateTime, ! Convert.ToInt32( this.fromHour.Value ) , ! Convert.ToInt32( this.fromMin.Value ) , ! Convert.ToInt32( this.fromSec.Value ) , Convert.ToInt32( this.timeFrameInSeconds.Value ) , ! Convert.ToInt32( this.numberOfBars.Value ) , this.dateTimeOverwriteQuotesBefore.Value, this.checkBoxCheckingForMissingQuotes.Checked, --- 456,470 ---- { try{ + if(this.CheckedDailyTimes.Count == 0) + throw new Exception("Check at least one daily time!"); OTTickerDownloader tickerDownloader = new OTTickerDownloader( this.TickersToDownload, this.StartingNewYorkDateTime, ! this.CheckedDailyTimes[0].Hour , ! this.CheckedDailyTimes[0].Minute , ! this.CheckedDailyTimes[0].Second , Convert.ToInt32( this.timeFrameInSeconds.Value ) , ! 1 , this.dateTimeOverwriteQuotesBefore.Value, this.checkBoxCheckingForMissingQuotes.Checked, *************** *** 654,663 **** get { ! return new DateTime(this.dateTimePickerStartingDate.Value.Year, ! this.dateTimePickerStartingDate.Value.Month, ! this.dateTimePickerStartingDate.Value.Day, ! Convert.ToInt32(this.fromHour.Value), ! Convert.ToInt32(this.fromMin.Value), ! Convert.ToInt32(this.fromSec.Value)); } } --- 536,543 ---- get { ! return Time.GetDateTimeFromMerge( new DateTime(this.dateTimePickerStartingDate.Value.Year, ! this.dateTimePickerStartingDate.Value.Month, ! this.dateTimePickerStartingDate.Value.Day) , ! new Time((string)this.checkedListOfDailyTimes.CheckedItems[0]) ); } } *************** *** 669,679 **** } } ! public int NumberOfBars { ! get { ! return Convert.ToInt32(this.numberOfBars.Value); } } public string[] TickersToDownload { --- 549,569 ---- } } ! ! public List<Time> CheckedDailyTimes { ! get { ! List<Time> checkedDailyTimes = ! new List<Time>(); ! for(int i = 0; ! i < this.checkedListOfDailyTimes.CheckedItems.Count; ! i++) ! checkedDailyTimes.Add(new Time((string)this.checkedListOfDailyTimes.CheckedItems[i]) ); ! ! return checkedDailyTimes; } } + + public string[] TickersToDownload { *************** *** 699,703 **** } ! #endregion private void otWebDownloaderLoad_setStyleForDataGrid() --- 589,593 ---- } ! #endregion properties private void otWebDownloaderLoad_setStyleForDataGrid() *************** *** 762,769 **** this.otWebDownloaderLoad_setStyleForDataGrid(); } ! private void otWebDownloaderLoad(object sender, EventArgs e) { this.otWebDownloaderLoad_fillDataGridWithTickersToBeDownloaded(); } --- 652,672 ---- this.otWebDownloaderLoad_setStyleForDataGrid(); } + + private void otWebDownloaderLoad_populateCheckedListOfDailyTimes() + { + Time firstTimeToAdd = new Time(9,30,0); + Time lastTimeToAdd = new Time(16,0,0); + Time currentTimeToAdd = firstTimeToAdd; + while( currentTimeToAdd <= lastTimeToAdd ) + { + this.checkedListOfDailyTimes.Items.Add(currentTimeToAdd.GetFormattedString(), false); + currentTimeToAdd = currentTimeToAdd.AddMinutes( 1 ); + } + } ! private void otWebDownloaderLoad(object sender, EventArgs e) { this.otWebDownloaderLoad_fillDataGridWithTickersToBeDownloaded(); + this.otWebDownloaderLoad_populateCheckedListOfDailyTimes(); } *************** *** 842,845 **** --- 745,754 ---- this.OTWebDownloaderPaint_refreshEndingDownloadingTimeLabel(); } + + void Button1Click(object sender, EventArgs e) + { + List<Time> listDT = + this.CheckedDailyTimes; + } } } |