[Quantproject-developers] QuantDownloader/Downloader/QuotesEditor QuotesEditor.cs,1.1,1.2
Brought to you by:
glauco_1
|
From: <gla...@pr...> - 2004-01-26 05:32:25
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20985/Downloader/QuotesEditor Modified Files: QuotesEditor.cs Log Message: Added the Validation TabPage with the OHLC and the CloseToClose sub TabPages Index: QuotesEditor.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/QuotesEditor.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QuotesEditor.cs 21 Dec 2003 21:24:22 -0000 1.1 --- QuotesEditor.cs 25 Jan 2004 15:42:39 -0000 1.2 *************** *** 4,18 **** using System.ComponentModel; using System.Windows.Forms; ! namespace QuantProject.Applications.Downloader.QuotesEditor { /// <summary> ! /// Summary description for QuotesEditor. /// </summary> public class QuotesEditor : System.Windows.Forms.Form { private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPageChart; ! private System.Windows.Forms.TabPage tabPageDataGrid; /// <summary> /// Required designer variable. --- 4,35 ---- using System.ComponentModel; using System.Windows.Forms; + using scpl; + using QuantProject.ADT.Histories; + using QuantProject.Data; + using QuantProject.Applications.Downloader.Validate; ! namespace QuantProject.Applications.Downloader { /// <summary> ! /// Windows form editor for quotes of a single ticker /// </summary> public class QuotesEditor : System.Windows.Forms.Form { + private double suspiciousRatio = 8; + + private string ticker; + private ValidateDataTable validateDataTable = new ValidateDataTable(); + private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPageChart; ! private System.Windows.Forms.TabPage tabPageQuotes; ! private System.Windows.Forms.TabPage tabPageValidation; ! private System.Windows.Forms.TextBox textBoxTicker; ! private System.Windows.Forms.TabControl tabControl2; ! private System.Windows.Forms.TabPage tabPageOHLC; ! private System.Windows.Forms.TabPage tabPageCloseToClose; ! private QuantProject.Applications.Downloader.QuotesChart quotesChart; ! private QuantProject.Applications.Downloader.OHLCuserControl openHighLowCloseUserControl; ! private QuantProject.Applications.Downloader.CloseToCloseUserControl closeToCloseUserControl; /// <summary> /// Required designer variable. *************** *** 20,24 **** private System.ComponentModel.Container components = null; ! public QuotesEditor() { // --- 37,41 ---- private System.ComponentModel.Container components = null; ! public QuotesEditor( string ticker ) { // *************** *** 27,33 **** InitializeComponent(); ! // ! // TODO: Add any constructor code after InitializeComponent call ! // } --- 44,48 ---- InitializeComponent(); ! this.ticker = ticker; } *************** *** 56,61 **** this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPageChart = new System.Windows.Forms.TabPage(); ! this.tabPageDataGrid = new System.Windows.Forms.TabPage(); this.tabControl1.SuspendLayout(); this.SuspendLayout(); // --- 71,89 ---- this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPageChart = new System.Windows.Forms.TabPage(); ! this.quotesChart = new QuantProject.Applications.Downloader.QuotesChart(); ! this.tabPageQuotes = new System.Windows.Forms.TabPage(); ! this.tabPageValidation = new System.Windows.Forms.TabPage(); ! this.tabControl2 = new System.Windows.Forms.TabControl(); ! this.tabPageOHLC = new System.Windows.Forms.TabPage(); ! this.openHighLowCloseUserControl = new QuantProject.Applications.Downloader.OHLCuserControl(); ! this.tabPageCloseToClose = new System.Windows.Forms.TabPage(); ! this.closeToCloseUserControl = new QuantProject.Applications.Downloader.CloseToCloseUserControl(); ! this.textBoxTicker = new System.Windows.Forms.TextBox(); this.tabControl1.SuspendLayout(); + this.tabPageChart.SuspendLayout(); + this.tabPageValidation.SuspendLayout(); + this.tabControl2.SuspendLayout(); + this.tabPageOHLC.SuspendLayout(); + this.tabPageCloseToClose.SuspendLayout(); this.SuspendLayout(); // *************** *** 64,100 **** this.tabControl1.Controls.AddRange(new System.Windows.Forms.Control[] { this.tabPageChart, ! this.tabPageDataGrid}); ! this.tabControl1.Location = new System.Drawing.Point(8, 8); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; ! this.tabControl1.Size = new System.Drawing.Size(552, 264); this.tabControl1.TabIndex = 0; // // tabPageChart // this.tabPageChart.Location = new System.Drawing.Point(4, 22); this.tabPageChart.Name = "tabPageChart"; ! this.tabPageChart.Size = new System.Drawing.Size(544, 238); ! this.tabPageChart.TabIndex = 0; this.tabPageChart.Text = "Chart"; // ! // tabPageDataGrid // ! this.tabPageDataGrid.Location = new System.Drawing.Point(4, 22); ! this.tabPageDataGrid.Name = "tabPageDataGrid"; ! this.tabPageDataGrid.Size = new System.Drawing.Size(544, 238); ! this.tabPageDataGrid.TabIndex = 1; ! this.tabPageDataGrid.Text = "Quotes"; // // QuotesEditor // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(576, 273); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.tabControl1}); this.Name = "QuotesEditor"; this.Text = "QuotesEditor"; - this.Load += new System.EventHandler(this.QuotesEditor_Load); this.tabControl1.ResumeLayout(false); this.ResumeLayout(false); --- 92,230 ---- this.tabControl1.Controls.AddRange(new System.Windows.Forms.Control[] { this.tabPageChart, ! this.tabPageQuotes, ! this.tabPageValidation}); ! this.tabControl1.Location = new System.Drawing.Point(8, 40); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; ! this.tabControl1.Size = new System.Drawing.Size(688, 320); this.tabControl1.TabIndex = 0; // // tabPageChart // + this.tabPageChart.Controls.AddRange(new System.Windows.Forms.Control[] { + this.quotesChart}); this.tabPageChart.Location = new System.Drawing.Point(4, 22); this.tabPageChart.Name = "tabPageChart"; ! this.tabPageChart.Size = new System.Drawing.Size(680, 294); ! this.tabPageChart.TabIndex = 2; this.tabPageChart.Text = "Chart"; + this.tabPageChart.Paint += new System.Windows.Forms.PaintEventHandler(this.tabPageChart_Paint); // ! // quotesChart // ! this.quotesChart.AllowSelection = false; ! this.quotesChart.BackColor = System.Drawing.SystemColors.ControlLightLight; ! this.quotesChart.HorizontalEdgeLegendPlacement = scpl.Legend.Placement.Inside; ! this.quotesChart.LegendBorderStyle = scpl.Legend.BorderType.Shadow; ! this.quotesChart.LegendXOffset = 10F; ! this.quotesChart.LegendYOffset = 1F; ! this.quotesChart.Location = new System.Drawing.Point(8, 8); ! this.quotesChart.Name = "quotesChart"; ! this.quotesChart.Padding = 10; ! this.quotesChart.PlotBackColor = System.Drawing.Color.White; ! this.quotesChart.ShowLegend = false; ! this.quotesChart.Size = new System.Drawing.Size(664, 288); ! this.quotesChart.TabIndex = 0; ! this.quotesChart.Title = ""; ! this.quotesChart.TitleFont = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); ! this.quotesChart.VerticalEdgeLegendPlacement = scpl.Legend.Placement.Outside; ! this.quotesChart.XAxis1 = null; ! this.quotesChart.XAxis2 = null; ! this.quotesChart.YAxis1 = null; ! this.quotesChart.YAxis2 = null; ! // ! // tabPageQuotes ! // ! this.tabPageQuotes.Location = new System.Drawing.Point(4, 22); ! this.tabPageQuotes.Name = "tabPageQuotes"; ! this.tabPageQuotes.Size = new System.Drawing.Size(680, 294); ! this.tabPageQuotes.TabIndex = 0; ! this.tabPageQuotes.Text = "Quotes"; ! this.tabPageQuotes.Paint += new System.Windows.Forms.PaintEventHandler(this.tabPageChart_Paint); ! // ! // tabPageValidation ! // ! this.tabPageValidation.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.tabControl2}); ! this.tabPageValidation.Location = new System.Drawing.Point(4, 22); ! this.tabPageValidation.Name = "tabPageValidation"; ! this.tabPageValidation.Size = new System.Drawing.Size(680, 294); ! this.tabPageValidation.TabIndex = 1; ! this.tabPageValidation.Text = "Validation"; ! this.tabPageValidation.Click += new System.EventHandler(this.tabPageValidation_Click); ! this.tabPageValidation.Paint += new System.Windows.Forms.PaintEventHandler(this.tabPageValidation_Paint); ! // ! // tabControl2 ! // ! this.tabControl2.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.tabPageOHLC, ! this.tabPageCloseToClose}); ! this.tabControl2.Location = new System.Drawing.Point(8, 8); ! this.tabControl2.Multiline = true; ! this.tabControl2.Name = "tabControl2"; ! this.tabControl2.RightToLeft = System.Windows.Forms.RightToLeft.No; ! this.tabControl2.SelectedIndex = 0; ! this.tabControl2.Size = new System.Drawing.Size(664, 280); ! this.tabControl2.TabIndex = 0; ! // ! // tabPageOHLC ! // ! this.tabPageOHLC.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.openHighLowCloseUserControl}); ! this.tabPageOHLC.Location = new System.Drawing.Point(4, 22); ! this.tabPageOHLC.Name = "tabPageOHLC"; ! this.tabPageOHLC.Size = new System.Drawing.Size(656, 254); ! this.tabPageOHLC.TabIndex = 0; ! this.tabPageOHLC.Text = "OHLC"; ! this.tabPageOHLC.Click += new System.EventHandler(this.tabPageOHLC_Click); ! this.tabPageOHLC.Paint += new System.Windows.Forms.PaintEventHandler(this.tabPageOHLC_Paint); ! // ! // openHighLowCloseUserControl ! // ! this.openHighLowCloseUserControl.Location = new System.Drawing.Point(8, 8); ! this.openHighLowCloseUserControl.Name = "openHighLowCloseUserControl"; ! this.openHighLowCloseUserControl.Size = new System.Drawing.Size(646, 244); ! this.openHighLowCloseUserControl.TabIndex = 0; ! // ! // tabPageCloseToClose ! // ! this.tabPageCloseToClose.Controls.AddRange(new System.Windows.Forms.Control[] { ! this.closeToCloseUserControl}); ! this.tabPageCloseToClose.Location = new System.Drawing.Point(4, 22); ! this.tabPageCloseToClose.Name = "tabPageCloseToClose"; ! this.tabPageCloseToClose.Size = new System.Drawing.Size(656, 254); ! this.tabPageCloseToClose.TabIndex = 1; ! this.tabPageCloseToClose.Text = "Close To Close"; ! this.tabPageCloseToClose.Paint += new System.Windows.Forms.PaintEventHandler(this.tabPageCloseToClose_Paint); ! // ! // closeToCloseUserControl ! // ! this.closeToCloseUserControl.Location = new System.Drawing.Point(8, 8); ! this.closeToCloseUserControl.Name = "closeToCloseUserControl"; ! this.closeToCloseUserControl.Size = new System.Drawing.Size(646, 244); ! this.closeToCloseUserControl.TabIndex = 0; ! // ! // textBoxTicker ! // ! this.textBoxTicker.Location = new System.Drawing.Point(288, 8); ! this.textBoxTicker.Name = "textBoxTicker"; ! this.textBoxTicker.TabIndex = 1; ! this.textBoxTicker.Text = "CCE"; // // QuotesEditor // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); ! this.ClientSize = new System.Drawing.Size(704, 365); this.Controls.AddRange(new System.Windows.Forms.Control[] { + this.textBoxTicker, this.tabControl1}); this.Name = "QuotesEditor"; this.Text = "QuotesEditor"; this.tabControl1.ResumeLayout(false); + this.tabPageChart.ResumeLayout(false); + this.tabPageValidation.ResumeLayout(false); + this.tabControl2.ResumeLayout(false); + this.tabPageOHLC.ResumeLayout(false); + this.tabPageCloseToClose.ResumeLayout(false); this.ResumeLayout(false); *************** *** 102,109 **** #endregion ! private void QuotesEditor_Load(object sender, System.EventArgs e) { } } } --- 232,281 ---- #endregion ! ! #region tabPageChart ! private void tabPageChart_Paint(object sender, System.Windows.Forms.PaintEventArgs e) ! { ! this.quotesChart.Ticker = this.textBoxTicker.Text; ! // quotesChart.PaintingHandler( this.textBoxTicker.Text ); ! } ! ! #endregion ! #region tabPageValidation ! private void tabPageValidation_Click(object sender, System.EventArgs e) ! { ! } ! ! private void tabPageValidation_Paint(object sender, System.Windows.Forms.PaintEventArgs e) ! { ! this.validateDataTable.Clear(); ! this.validateDataTable.AddRows( this.textBoxTicker.Text , this.suspiciousRatio ); ! this.openHighLowCloseUserControl.ValidateDataTable = this.validateDataTable; ! this.closeToCloseUserControl.ValidateDataTable = this.validateDataTable; ! this.closeToCloseUserControl.Ticker = this.textBoxTicker.Text; ! } ! ! #endregion ! #region tabPageOHLC ! private void tabPageOHLC_Click(object sender, System.EventArgs e) { } + + private void tabPageOHLC_Paint(object sender, System.Windows.Forms.PaintEventArgs e) + { + // this.openHighLowCloseDataGrid.DataBind( this.validateDataTable ); + } + #endregion + + private void openHighLowCloseUserControl_Paint(object sender, System.Windows.Forms.PaintEventArgs e) + { + this.openHighLowCloseUserControl.PaintingHandler(); + } + + private void tabPageCloseToClose_Paint(object sender, System.Windows.Forms.PaintEventArgs e) + { + this.closeToCloseUserControl.PaintingHandler(); + } + } } |