quantproject-developers Mailing List for QuantProject (Page 145)
Brought to you by:
glauco_1
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(103) |
Dec
(67) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(52) |
Feb
(9) |
Mar
(69) |
Apr
(53) |
May
(80) |
Jun
(23) |
Jul
(24) |
Aug
(112) |
Sep
(9) |
Oct
|
Nov
(58) |
Dec
(93) |
| 2005 |
Jan
(90) |
Feb
(93) |
Mar
(61) |
Apr
(56) |
May
(37) |
Jun
(61) |
Jul
(55) |
Aug
(68) |
Sep
(25) |
Oct
(46) |
Nov
(41) |
Dec
(37) |
| 2006 |
Jan
(33) |
Feb
(7) |
Mar
(19) |
Apr
(27) |
May
(73) |
Jun
(49) |
Jul
(83) |
Aug
(66) |
Sep
(45) |
Oct
(16) |
Nov
(15) |
Dec
(7) |
| 2007 |
Jan
(14) |
Feb
(33) |
Mar
|
Apr
(21) |
May
|
Jun
(34) |
Jul
(18) |
Aug
(100) |
Sep
(39) |
Oct
(55) |
Nov
(12) |
Dec
(2) |
| 2008 |
Jan
(120) |
Feb
(133) |
Mar
(129) |
Apr
(104) |
May
(42) |
Jun
(2) |
Jul
(52) |
Aug
(99) |
Sep
(134) |
Oct
|
Nov
(137) |
Dec
(48) |
| 2009 |
Jan
(48) |
Feb
(55) |
Mar
(61) |
Apr
(3) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(51) |
Sep
|
Oct
(7) |
Nov
|
Dec
|
| 2010 |
Jan
(7) |
Feb
(1) |
Mar
(145) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
|
| 2011 |
Jan
(78) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(88) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <mi...@us...> - 2004-01-01 19:08:20
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess
In directory sc8-pr-cvs1:/tmp/cvs-serv20812/b2_DataAccess
Modified Files:
b2_DataAccess.csproj
Log Message:
Added new class DataBaseVersionManager that manages the updates to database's structure
Index: b2_DataAccess.csproj
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/b2_DataAccess.csproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** b2_DataAccess.csproj 21 Dec 2003 21:29:28 -0000 1.3
--- b2_DataAccess.csproj 1 Jan 2004 19:08:17 -0000 1.4
***************
*** 108,111 ****
--- 108,116 ----
/>
<File
+ RelPath = "DataBaseVersionManager.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "SQLBuilder.cs"
SubType = "Code"
|
|
From: <mi...@us...> - 2004-01-01 19:07:16
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess
In directory sc8-pr-cvs1:/tmp/cvs-serv20405/b2_DataAccess
Added Files:
DataBaseVersionManager.cs
Log Message:
Added new class DataBaseVersionManager that manages the updates to database's structure
--- NEW FILE: DataBaseVersionManager.cs ---
/*
QuantProject - Quantitative Finance Library
BataBaseVersionManager.cs
Copyright (C) 2003
Marco Milletti
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Data;
using System.Collections;
namespace QuantProject.DataAccess
{
/// <summary>
/// This object updates database's structure in order to
/// assure complete compatibility in case the user still uses an
/// old database version
/// </summary>
/// <remarks>
/// The changes to database's structure are controlled by
/// the UpdateDataBaseStructure method which executes all the methods that
/// modify the structure of the database. These methods must have the same signature
/// of the delegate updatingMethodHandler.
/// A new method needs to be added as a new item in the updatingMethods
/// through the delegate updatingMethodHandler
/// </remarks>
public class DataBaseVersionManager
{
private OleDbDataAdapter oleDbDataAdapter;
private DataTable dataTable_version;
private string selectString;
private string updateString;
private int databaseVersion;
private OleDbConnection oleDbConnection;
delegate void updatingMethodHandler();
private SortedList updatingMethods;
public DataBaseVersionManager(OleDbConnection oleDbConnection)
{
try
{
this.oleDbConnection = oleDbConnection;
this.oleDbConnection.Open();
this.selectString = "SELECT * FROM version";
this.updateString = "UPDATE version SET veId = ?";
this.oleDbDataAdapter = new OleDbDataAdapter(selectString, this.oleDbConnection);
this.oleDbDataAdapter.UpdateCommand = new OleDbCommand(this.updateString,this.oleDbConnection);
this.oleDbDataAdapter.UpdateCommand.Parameters.Add("@veId", OleDbType.Integer);
this.oleDbDataAdapter.UpdateCommand.Parameters["@veId"].SourceColumn = "veId";
this.dataTable_version = new DataTable();
this.initialize_updatingMethods();
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
this.oleDbConnection.Close();
}
}
public void UpdateDataBaseStructure()
{
try
{
foreach (DictionaryEntry method in this.updatingMethods)
{
this.executeMethod(method);
}
this.oleDbConnection.Close();
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
this.oleDbConnection.Close();
}
}
private int getDataBaseVersionNumber()
{
this.dataTable_version.Clear();
this.oleDbDataAdapter.Fill(this.dataTable_version);
DataRow dataRow = this.dataTable_version.Rows[0];
return (int)dataRow["veId"];
}
private void setNewDataBaseVersionNumber(int newVersionNumber)
{
this.dataTable_version.Rows[0]["veId"] = newVersionNumber;
this.oleDbDataAdapter.Update(this.dataTable_version);
this.dataTable_version.AcceptChanges();
}
/// <summary>
/// The method initialize a populate updatingMethods, a SortedList
/// that contains all the delegates that encapsulate all methods
/// whose function is to modify the structure of the database.
/// The key in the sortedList is the new version number that signs
/// the database after the execution of the encapsulated method
/// </summary>
private void initialize_updatingMethods()
{
this.updatingMethods = new SortedList();
//After adding a new private method to the class, write
//the following code, paying attention to the version number:
//this.updatingMethods.Add(yourVersionNumber,
// new updatingMethodHandler(this.yourMethodName))
}
private void executeMethod(DictionaryEntry itemContainingMethod)
{
this.databaseVersion = this.getDataBaseVersionNumber();
int differenceBetweenNewVersionAndDataBaseVersion =
(int)itemContainingMethod.Key - this.databaseVersion;
if(differenceBetweenNewVersionAndDataBaseVersion == 1)
//db's structure can be updated by the method contained in the item
{
updatingMethodHandler handler = (updatingMethodHandler)itemContainingMethod.Value;
handler();
//it calls the method that modifies the db structure
this.setNewDataBaseVersionNumber((int)itemContainingMethod.Key);
}
}
}
}
|
|
From: <gla...@us...> - 2003-12-30 00:20:18
|
Update of /cvsroot/quantproject/mdb In directory sc8-pr-cvs1:/tmp/cvs-serv15433 Modified Files: QuantProject.mdb Log Message: - Removed the following fields: quAdjustedOpen quAdjustedHigh quAdjustedLow quAdjustedVolume (these values can be computed using other fields) - Added the following field: quAdjustedCloseToCloseRatio (this piece of information will not change in the future, thus it can be statically validated. It will be useful for future quAdjustedClose validations) Index: QuantProject.mdb =================================================================== RCS file: /cvsroot/quantproject/mdb/QuantProject.mdb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsAk93Rf and /tmp/cvsiirt6n differ |
|
From: <gla...@us...> - 2003-12-21 21:29:31
|
Update of /cvsroot/quantproject/QuantProject In directory sc8-pr-cvs1:/tmp/cvs-serv16014 Modified Files: QuantProject.suo Log Message: Added the ConnectionProvider class. Index: QuantProject.suo =================================================================== RCS file: /cvsroot/quantproject/QuantProject/QuantProject.suo,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 Binary files /tmp/cvs1G2FPA and /tmp/cvsC5kzk1 differ |
|
From: <gla...@us...> - 2003-12-21 21:29:31
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess
In directory sc8-pr-cvs1:/tmp/cvs-serv16014/b2_DataAccess
Modified Files:
b2_DataAccess.csproj
Log Message:
Added the ConnectionProvider class.
Index: b2_DataAccess.csproj
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/b2_DataAccess.csproj,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** b2_DataAccess.csproj 10 Nov 2003 21:32:18 -0000 1.2
--- b2_DataAccess.csproj 21 Dec 2003 21:29:28 -0000 1.3
***************
*** 93,96 ****
--- 93,101 ----
/>
<File
+ RelPath = "ConnectionProvider.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "DataBase.cs"
SubType = "Code"
|
|
From: <gla...@us...> - 2003-12-21 21:28:32
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader
In directory sc8-pr-cvs1:/tmp/cvs-serv15843/Downloader
Modified Files:
Downloader.csproj
Log Message:
Removed the AdoNetTools class.
Added the QuotesEditor class.
Index: Downloader.csproj
===================================================================
RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Downloader.csproj,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Downloader.csproj 19 Dec 2003 15:58:25 -0000 1.8
--- Downloader.csproj 21 Dec 2003 21:28:29 -0000 1.9
***************
*** 98,106 ****
<Include>
<File
- RelPath = "AdoNetTools.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
RelPath = "App.ico"
BuildAction = "Content"
--- 98,101 ----
***************
*** 154,157 ****
--- 149,167 ----
SubType = "Form"
BuildAction = "Compile"
+ />
+ <File
+ RelPath = "WebDownloader.resx"
+ DependentUpon = "WebDownloader.cs"
+ BuildAction = "EmbeddedResource"
+ />
+ <File
+ RelPath = "QuotesEditor\QuotesEditor.cs"
+ SubType = "Form"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "QuotesEditor\QuotesEditor.resx"
+ DependentUpon = "QuotesEditor.cs"
+ BuildAction = "EmbeddedResource"
/>
<File
|
|
From: <gla...@us...> - 2003-12-21 21:28:32
|
Update of /cvsroot/quantproject/QuantDownloader In directory sc8-pr-cvs1:/tmp/cvs-serv15843 Modified Files: QuantDownloader.suo Log Message: Removed the AdoNetTools class. Added the QuotesEditor class. Index: QuantDownloader.suo =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/QuantDownloader.suo,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 Binary files /tmp/cvsXBSDoh and /tmp/cvsatzZwo differ |
|
From: <gla...@us...> - 2003-12-21 21:24:25
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor
In directory sc8-pr-cvs1:/tmp/cvs-serv15233
Added Files:
QuotesEditor.cs
Log Message:
Windows Form class: it will contain a quote editor
for wrong quotes correction
--- NEW FILE: QuotesEditor.cs ---
using System;
using System.Drawing;
using System.Collections;
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.
/// </summary>
private System.ComponentModel.Container components = null;
public QuotesEditor()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
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();
//
// tabControl1
//
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);
}
#endregion
private void QuotesEditor_Load(object sender, System.EventArgs e)
{
}
}
}
|
|
From: <gla...@us...> - 2003-12-21 21:19:56
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor In directory sc8-pr-cvs1:/tmp/cvs-serv14549/QuotesEditor Log Message: Directory /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor added to the repository |
|
From: <gla...@us...> - 2003-12-21 21:18:56
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate
In directory sc8-pr-cvs1:/tmp/cvs-serv14405/Validate
Modified Files:
QuotesToBeValidated.cs
Log Message:
It now uses the
QuantProject.DataAccess.ConnectionProvider class
Index: QuotesToBeValidated.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/QuotesToBeValidated.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** QuotesToBeValidated.cs 16 Dec 2003 16:31:58 -0000 1.3
--- QuotesToBeValidated.cs 21 Dec 2003 21:18:53 -0000 1.4
***************
*** 2,5 ****
--- 2,6 ----
using System.Data;
using System.Data.OleDb;
+ using QuantProject.DataAccess;
using QuantProject.Applications.Downloader.Validate.Validators;
***************
*** 28,32 ****
this.selectStatement =
"select * from quotes where quTicker = '" + tickerIsLike + "'";
! this.oleDbDataAdapter = new OleDbDataAdapter( selectStatement , AdoNetTools.OleDbConnection );
try
{
--- 29,34 ----
this.selectStatement =
"select * from quotes where quTicker = '" + tickerIsLike + "'";
! this.oleDbDataAdapter =
! new OleDbDataAdapter( selectStatement , ConnectionProvider.OleDbConnection );
try
{
|
|
From: <gla...@us...> - 2003-12-21 21:17:49
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate
In directory sc8-pr-cvs1:/tmp/cvs-serv14253/Validate
Modified Files:
ValidateDataGrid.cs
Log Message:
Added quote columns to the ValidateDataGrid
Index: ValidateDataGrid.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateDataGrid.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ValidateDataGrid.cs 19 Dec 2003 15:12:13 -0000 1.1
--- ValidateDataGrid.cs 21 Dec 2003 21:17:46 -0000 1.2
***************
*** 10,29 ****
{
private ValidateDataTable validateDataTable;
public ValidateDataGrid()
{
- //
- // TODO: Add constructor logic here
- //
}
#region "Validate"
! private void validate_setTableStyle()
{
! DataGridTableStyle dataGridTableStyle = new DataGridTableStyle();
! dataGridTableStyle.ColumnHeadersVisible = true;
! dataGridTableStyle.MappingName = "quotes";
DataGridTextBoxColumn dataGridColumnStyle = new DataGridTextBoxColumn();
! dataGridColumnStyle.MappingName = "quTicker";
! dataGridColumnStyle.HeaderText = "Ticker";
! dataGridTableStyle.GridColumnStyles.Add( dataGridColumnStyle );
this.TableStyles.Add( dataGridTableStyle );
}
--- 10,47 ----
{
private ValidateDataTable validateDataTable;
+
+ private DataGridTableStyle dataGridTableStyle;
+
public ValidateDataGrid()
{
}
#region "Validate"
! private void validate_setTableStyle_setColumnStyle( string mappingName , string headerText )
{
! this.dataGridTableStyle.ColumnHeadersVisible = true;
DataGridTextBoxColumn dataGridColumnStyle = new DataGridTextBoxColumn();
! dataGridColumnStyle.MappingName = mappingName;
! dataGridColumnStyle.HeaderText = headerText;
! this.dataGridTableStyle.GridColumnStyles.Add( dataGridColumnStyle );
! }
! private void validate_setTableStyle()
! {
! // DataGridTableStyle dataGridTableStyle = new DataGridTableStyle();
! // dataGridTableStyle.ColumnHeadersVisible = true;
! // dataGridTableStyle.MappingName = "quotes";
! // DataGridTextBoxColumn dataGridColumnStyle = new DataGridTextBoxColumn();
! // dataGridColumnStyle.MappingName = "quTicker";
! // dataGridColumnStyle.HeaderText = "Ticker";
! // dataGridTableStyle.GridColumnStyles.Add( dataGridColumnStyle );
! // this.TableStyles.Add( dataGridTableStyle );
! this.dataGridTableStyle = new DataGridTableStyle();
! this.dataGridTableStyle.MappingName = "quotes";
! validate_setTableStyle_setColumnStyle( "quTicker" , "Ticker" );
! validate_setTableStyle_setColumnStyle( "quDate" , "Date" );
! validate_setTableStyle_setColumnStyle( "quOpen" , "Open" );
! validate_setTableStyle_setColumnStyle( "quHigh" , "High" );
! validate_setTableStyle_setColumnStyle( "quLow" , "Low" );
! validate_setTableStyle_setColumnStyle( "quClose" , "Close" );
! validate_setTableStyle_setColumnStyle( "quAdjustedClose" , "Adj. Close" );
this.TableStyles.Add( dataGridTableStyle );
}
***************
*** 32,36 ****
this.validateDataTable = new ValidateDataTable();
this.DataSource = validateDataTable;
! validate_setTableStyle();
validateDataTable.AddRows( tickerIsLike , Convert.ToDouble( suspiciousRatio ) );
return this.validateDataTable;
--- 50,56 ----
this.validateDataTable = new ValidateDataTable();
this.DataSource = validateDataTable;
! if ( this.TableStyles.Count == 0 )
! // styles have not been defined yet
! validate_setTableStyle();
validateDataTable.AddRows( tickerIsLike , Convert.ToDouble( suspiciousRatio ) );
return this.validateDataTable;
|
|
From: <gla...@us...> - 2003-12-21 21:16:07
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate
In directory sc8-pr-cvs1:/tmp/cvs-serv14053/Validate
Modified Files:
ValidateDataTable.cs
Log Message:
It now uses the
QuantProject.DataAccess.ConnectionProvider class
Index: ValidateDataTable.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateDataTable.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ValidateDataTable.cs 18 Dec 2003 18:28:47 -0000 1.4
--- ValidateDataTable.cs 21 Dec 2003 21:16:04 -0000 1.5
***************
*** 2,5 ****
--- 2,6 ----
using System.Data;
using System.Data.OleDb;
+ using QuantProject.DataAccess;
namespace QuantProject.Applications.Downloader.Validate
***************
*** 20,24 ****
this.selectStatement =
"select * from quotes where 1=2";
! this.oleDbDataAdapter = new OleDbDataAdapter( selectStatement , AdoNetTools.OleDbConnection );
this.oleDbCommandBuilder = new OleDbCommandBuilder( oleDbDataAdapter );
this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand();
--- 21,26 ----
this.selectStatement =
"select * from quotes where 1=2";
! this.oleDbDataAdapter =
! new OleDbDataAdapter( selectStatement , ConnectionProvider.OleDbConnection );
this.oleDbCommandBuilder = new OleDbCommandBuilder( oleDbDataAdapter );
this.oleDbDataAdapter.UpdateCommand = this.oleDbCommandBuilder.GetUpdateCommand();
|
|
From: <gla...@us...> - 2003-12-21 21:14:56
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader
In directory sc8-pr-cvs1:/tmp/cvs-serv13845
Modified Files:
WebDownloader.cs
Log Message:
It now uses the
QuantProject.DataAccess.ConnectionProvider class
Index: WebDownloader.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/WebDownloader.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** WebDownloader.cs 30 Nov 2003 22:41:59 -0000 1.5
--- WebDownloader.cs 21 Dec 2003 21:14:52 -0000 1.6
***************
*** 18,28 ****
public class WebDownloader : System.Windows.Forms.Form
{
! private static DataBaseLocator dataBaseLocator = new DataBaseLocator("MDB");
! private static string mdbPath = dataBaseLocator.Path;
! private static string connectionString =
! @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=" +
! mdbPath +
! @";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
! public OleDbConnection OleDbConnection1 = new OleDbConnection( connectionString );
private System.Windows.Forms.Button button1;
public System.Windows.Forms.DataGrid dataGrid1;
--- 18,22 ----
public class WebDownloader : System.Windows.Forms.Form
{
! public OleDbConnection OleDbConnection1 = ConnectionProvider.OleDbConnection;
private System.Windows.Forms.Button button1;
public System.Windows.Forms.DataGrid dataGrid1;
|
|
From: <gla...@us...> - 2003-12-21 21:11:02
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1:/tmp/cvs-serv13264 Removed Files: AdoNetTools.cs Log Message: It has been replaced by the QuantProject.DataAccess.ConnectionProvider class --- AdoNetTools.cs DELETED --- |
|
From: <gla...@us...> - 2003-12-21 21:10:00
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess
In directory sc8-pr-cvs1:/tmp/cvs-serv13101/b2_DataAccess
Modified Files:
DataBase.cs
Log Message:
Now it uses the ConnectionProvider class,
for database connection purposes
Index: DataBase.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/DataBase.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DataBase.cs 10 Nov 2003 19:08:04 -0000 1.2
--- DataBase.cs 21 Dec 2003 21:09:57 -0000 1.3
***************
*** 37,49 ****
public class DataBase
{
! private static DataBaseLocator dataBaseLocator = new DataBaseLocator("MDB");
! private static string mdbPath = dataBaseLocator.Path;
! //((string)Application.CommonAppDataPath).Substring(0, Application.CommonAppDataPath.LastIndexOf('\\')) +
! //@"\QuantProject.mdb";
! private static string connectionString =
! @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=" +
! mdbPath +
! @";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
! private static OleDbConnection oleDbConnection = new OleDbConnection( connectionString );
public DataBase()
--- 37,41 ----
public class DataBase
{
! private static OleDbConnection oleDbConnection = ConnectionProvider.OleDbConnection;
public DataBase()
|
|
From: <gla...@us...> - 2003-12-21 21:08:42
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess
In directory sc8-pr-cvs1:/tmp/cvs-serv12933/b2_DataAccess
Added Files:
ConnectionProvider.cs
Log Message:
Provides database connection(s)
--- NEW FILE: ConnectionProvider.cs ---
/*
QuantProject - Quantitative Finance Library
ConnectionProvider.cs
Copyright (C) 2003
Glauco Siliprandi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Data.OleDb;
namespace QuantProject.DataAccess
{
/// <summary>
/// Provides database connections
/// </summary>
public class ConnectionProvider
{
public ConnectionProvider()
{
//
// TODO: Add constructor logic here
//
}
private static OleDbConnection oleDbConnection;
/// <summary>
/// Returns an OleDbConnection to the database
/// </summary>
public static OleDbConnection OleDbConnection
{
get
{
if ( oleDbConnection == null )
{
DataBaseLocator dataBaseLocator = new DataBaseLocator("MDB");
string mdbPath = dataBaseLocator.Path;
string connectionString =
@"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=" +
mdbPath +
@";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";
oleDbConnection = new OleDbConnection( connectionString );
}
return oleDbConnection;
}
}
}
}
|
|
From: <gla...@us...> - 2003-12-21 18:48:39
|
Update of /cvsroot/quantproject/mdb In directory sc8-pr-cvs1:/tmp/cvs-serv20920 Modified Files: QuantProject.mdb Log Message: quotes table key fields (quTicker,quDate) have been set Index: QuantProject.mdb =================================================================== RCS file: /cvsroot/quantproject/mdb/QuantProject.mdb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs3fZKRV and /tmp/cvsqFoZkI differ |
|
From: <mi...@us...> - 2003-12-20 18:43:53
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2
In directory sc8-pr-cvs1:/tmp/cvs-serv1168/b7_Scripts/SimpleTesting/MSFTSimpleTest_2
Modified Files:
RunMSFTsimpleTest_2.cs TsMSFTsimpleTest_2.cs
Log Message:
Modified script files MSFTsimpleTest_2.
Index: RunMSFTsimpleTest_2.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2/RunMSFTsimpleTest_2.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RunMSFTsimpleTest_2.cs 18 Dec 2003 21:18:31 -0000 1.1
--- RunMSFTsimpleTest_2.cs 20 Dec 2003 18:43:50 -0000 1.2
***************
*** 63,66 ****
--- 63,69 ----
tradingSystems ,
10000 );
+
+ tester.Account.AccountStrategy = new AsMSFTsimpleTest_2(tester.Account );
+
//tester.Parameters.Add( new Parameter( "SMAdays" , 10 , 10 , 2 ) );
Index: TsMSFTsimpleTest_2.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2/TsMSFTsimpleTest_2.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TsMSFTsimpleTest_2.cs 18 Dec 2003 21:18:31 -0000 1.1
--- TsMSFTsimpleTest_2.cs 20 Dec 2003 18:43:50 -0000 1.2
***************
*** 25,28 ****
--- 25,29 ----
using QuantProject.ADT;
using QuantProject.ADT.Histories;
+ using QuantProject.ADT.Statistics;
using QuantProject.ADT.Optimizing;
using QuantProject.Business.Financial.Instruments;
***************
*** 52,58 ****
microsoftCloseHistory = QuoteCache.GetCloseHistory( "MSFT" );
microsoftCloseHistoryStandardDeviation =
! microsoftCloseHistory.GetStandardDeviation(5, new DateTime(2000,1,1),new DateTime(2000,12,31));
! microsoftCloseHistorySimpleAverage =
! microsoftCloseHistory.GetSimpleAverage(5, new DateTime(2000,1,1),new DateTime(2000,12,31));
}
--- 53,63 ----
microsoftCloseHistory = QuoteCache.GetCloseHistory( "MSFT" );
microsoftCloseHistoryStandardDeviation =
! microsoftCloseHistory.GetFunctionHistory (Function.StandardDeviation,5,
! new DateTime(2000,1,1),
! new DateTime(2000,12,31));
! microsoftCloseHistorySimpleAverage =
! microsoftCloseHistory.GetFunctionHistory (Function.SimpleAverage,5,
! new DateTime(2000,1,1),
! new DateTime(2000,12,31));
}
***************
*** 67,79 ****
{
! signal.Add( new Order( OrderType.MarketSellShort , new Instrument( "MSFT" ) , 1 ,
new ExtendedDateTime(
new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) ,
BarComponent.Open ) ) );
- signal.Add( new Order( OrderType.MarketCover , new Instrument( "MSFT" ) , 1 ,
- new ExtendedDateTime(
- new Instrument( "MSFT" ).GetMarketDay ( extendedDateTime.DateTime,5 ) ,
- BarComponent.Open ) ) );
-
signals.Add( signal );
--- 72,79 ----
{
! signal.Add( new Order( OrderType.MarketSell , new Instrument( "MSFT" ) , 1 ,
new ExtendedDateTime(
new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) ,
BarComponent.Open ) ) );
signals.Add( signal );
***************
*** 84,93 ****
new ExtendedDateTime( new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) ,
BarComponent.Open ) ) );
- signal.Add( new Order( OrderType.MarketSell , new Instrument( "MSFT" ) , 1 ,
- new ExtendedDateTime( new Instrument( "MSFT" ).GetMarketDay( extendedDateTime.DateTime,5 ) ,
- BarComponent.Open ) ) );
signals.Add( signal );
}
!
}
--- 84,95 ----
new ExtendedDateTime( new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) ,
BarComponent.Open ) ) );
signals.Add( signal );
}
! }
! else
! //no signal given by the history of standard deviation
! {
! // TODO:...
! //if there's an open position, return a signal to close it the next market day
}
|
|
From: <mi...@us...> - 2003-12-20 18:43:12
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv1025/b7_Scripts
Modified Files:
b7_Scripts.csproj
Log Message:
Modified script files MSFTsimpleTest_2 and added the inherited account strategy (not implemented yet).
Index: b7_Scripts.csproj
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/b7_Scripts.csproj,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** b7_Scripts.csproj 17 Dec 2003 19:34:55 -0000 1.8
--- b7_Scripts.csproj 20 Dec 2003 18:43:01 -0000 1.9
***************
*** 118,121 ****
--- 118,126 ----
/>
<File
+ RelPath = "SimpleTesting\MSFTSimpleTest_2\AsMSFTsimpleTest_2.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "SimpleTesting\MSFTSimpleTest_2\RunMSFTsimpleTest_2.cs"
SubType = "Code"
|
|
From: <mi...@us...> - 2003-12-20 18:39:41
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT
In directory sc8-pr-cvs1:/tmp/cvs-serv468/b1_ADT
Modified Files:
b1_ADT.csproj
Log Message:
Added new enumeration (Function) in the new Function.cs file under Statistics folder
Index: b1_ADT.csproj
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/b1_ADT.csproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** b1_ADT.csproj 17 Dec 2003 19:34:55 -0000 1.3
--- b1_ADT.csproj 20 Dec 2003 18:39:37 -0000 1.4
***************
*** 112,120 ****
BuildAction = "Compile"
/>
- <File
- RelPath = "Statistics\BasicFunctions.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
<File
RelPath = "Optimizing\Optimizable.cs"
--- 112,115 ----
***************
*** 129,132 ****
--- 124,137 ----
<File
RelPath = "Optimizing\Parameters.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Statistics\BasicFunctions.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Statistics\Function.cs"
SubType = "Code"
BuildAction = "Compile"
|
|
From: <mi...@us...> - 2003-12-20 18:37:46
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Histories
In directory sc8-pr-cvs1:/tmp/cvs-serv32616/b1_ADT/Histories
Modified Files:
History.cs
Log Message:
Created a new method for History object, that replaces GetSimpleAverage and GetStandardDeviation methods.
Now the method is more intelligible (I hope ...). Remarks added.
Index: History.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Histories/History.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** History.cs 17 Dec 2003 19:34:55 -0000 1.4
--- History.cs 20 Dec 2003 18:37:43 -0000 1.5
***************
*** 101,167 ****
//millo
! #region "Millo_1 - SimpleAverage and StandardDeviation"
!
! public History GetSimpleAverage( int onEachPeriodOf , DateTime startDateTime , DateTime endDateTime )
{
! History simpleAverage = new History();
! int index = this.IndexOfKeyOrPrevious(startDateTime);
double[] data = new double[onEachPeriodOf];
! double checkValue = 0;
! int i = 0;
while (
! ( index < this.Count ) &&
! ( ((IComparable)this.GetKey( index )).CompareTo( endDateTime ) <= 0 ) )
{
! DateTime dateTime = (DateTime)this.GetKey( index );
! if (Math.Floor(index/onEachPeriodOf) == checkValue &&
! i < onEachPeriodOf)
{
! data[i] = Convert.ToDouble(this.GetByIndex(index));
! i++;
! index++;
! //simpleAverage.Add(this.GetKey( index ), null);
}
! else //Changes the period
{
! i = 0;
! simpleAverage.Add( dateTime , BasicFunctions.SimpleAverage(data) );
}
! checkValue = Math.Floor(index/onEachPeriodOf);//update checkValue
}
! return simpleAverage;
}
! public History GetStandardDeviation( int onEachPeriodOf , DateTime startDateTime , DateTime endDateTime )
! {
! History stdDev = new History();
! int index = this.IndexOfKeyOrPrevious(startDateTime);
! double[] data = new double[onEachPeriodOf];
! double checkValue = 0;
! int i = 0;
! while (
! ( index < this.Count ) &&
! ( ((IComparable)this.GetKey( index )).CompareTo( endDateTime ) <= 0 ) )
! {
! DateTime dateTime = (DateTime)this.GetKey( index );
! if (Math.Floor(index/onEachPeriodOf) == checkValue &&
! i < onEachPeriodOf)
! {
! data[i] = Convert.ToDouble(this.GetByIndex(index));
! i++;
! index++;
! //stdDev.Add(this.GetKey( index ), null);
! }
! else //Changes the period
! {
! i = 0;
! stdDev.Add( dateTime , BasicFunctions.StdDev (data) );
! }
! checkValue = Math.Floor(index/onEachPeriodOf);//update checkValue
! }
!
! return stdDev ;
! }
public bool IsDecreased(DateTime dateTime)
{
--- 101,180 ----
//millo
! #region "GetFunctionHistory"
!
! /// <summary>
! /// Gets a History object base on a statistical available function
! /// </summary>
! /// <remarks>
! /// Each History's item contains a specific statistical function
! /// calculated for each period whose length has to be specified by the user.
! /// The key for the History item is the initial date of each period
! /// </remarks>
! /// <param name="functionToBeCalculated">
! /// Statistical available function to be calculated and stored in the current History object
! /// </param>
! /// <param name="onEachPeriodOf">
! /// Length in day of each period of calculation
! /// </param>
! /// /// <param name="startDateTime">
! /// It sets the start date for the time interval containing the returned History
! /// </param>
! /// /// <param name="endDateTime">
! /// It sets the end date for the time interval containing the returned History
! /// </param>
! ///
! public History GetFunctionHistory(Function functionToBeCalculated, int onEachPeriodOf,
! DateTime startDateTime , DateTime endDateTime )
{
! History functionHistory = new History();
! int currentHistoryIndex = this.IndexOfKeyOrPrevious(startDateTime);
double[] data = new double[onEachPeriodOf];
! //the array contains the set of data whose length is specified by the user
! double periodIndex = 0;
! //in the while statement, if it isn't equal to Floor(currentHistoryIndex/onEachPeriodOf)
! //the current index belongs to the period with periodIndex increased by one
! int cursorThroughDataArray = 0;
while (
! ( currentHistoryIndex < this.Count ) &&
! ( ((IComparable)this.GetKey( currentHistoryIndex )).CompareTo( endDateTime ) <= 0 ) )
{
! DateTime dateTime = (DateTime)this.GetKey( currentHistoryIndex );
! if (Math.Floor(currentHistoryIndex/onEachPeriodOf) == periodIndex &&
! cursorThroughDataArray < onEachPeriodOf)
! //currentHistoryIndex belongs to the current period
{
! data[cursorThroughDataArray] = Convert.ToDouble(this.GetByIndex(currentHistoryIndex));
! cursorThroughDataArray++;
! currentHistoryIndex++;
! //POSSIBLY: simpleAverage.Add(this.GetKey( currentHistoryIndex ), null);
}
! else
! //currentHistoryIndex doesn't belong to the current period
! //so a new item can be added to the object History to be returned
{
! cursorThroughDataArray = 0;
! switch (functionToBeCalculated)
! {
! case Function.SimpleAverage:
! functionHistory.Add( dateTime , BasicFunctions.SimpleAverage(data) );
! break;
! case Function.StandardDeviation :
! functionHistory.Add( dateTime , BasicFunctions.StdDev(data) );
! break;
! }
}
! periodIndex = Math.Floor(currentHistoryIndex/onEachPeriodOf);
}
! return functionHistory;
}
! #endregion
!
! /// <summary>
! /// It returns true if the value of the current History item is
! /// less than the previous History item
! /// </summary>
! /// <param name="dateTime">The date key for current History item</param>
public bool IsDecreased(DateTime dateTime)
{
***************
*** 181,185 ****
! #endregion
--- 194,198 ----
!
|
|
From: <mi...@us...> - 2003-12-20 18:31:39
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2
In directory sc8-pr-cvs1:/tmp/cvs-serv31797/b7_Scripts/SimpleTesting/MSFTSimpleTest_2
Added Files:
AsMSFTsimpleTest_2.cs
Log Message:
Added new account strategy for MSFTsimpleTest_2 (not implemented yet)
--- NEW FILE: AsMSFTsimpleTest_2.cs ---
/*
QuantProject - Quantitative Finance Library
AsMSFTsimpleTest_2.cs
Copyright (C) 2003
Marco Milletti
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Collections;
using QuantProject.ADT;
using QuantProject.Business.Financial.Ordering;
using QuantProject.Business.Financial.Accounting;
using QuantProject.Business.Strategies;
namespace QuantProject.Scripts
{
/// <summary>
/// Summary description for AsMSFTsimpleTest_2.
/// </summary>
public class AsMSFTsimpleTest_2 : AccountStrategy
{
public AsMSFTsimpleTest_2( Account account ) : base( account )
{
//
// TODO: Add constructor logic here
//
}
}
//TODO: override of the base methods
}
|
|
From: <mi...@us...> - 2003-12-20 18:30:31
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Statistics
In directory sc8-pr-cvs1:/tmp/cvs-serv31655/b1_ADT/Statistics
Added Files:
Function.cs
Log Message:
Enumeration for simple statical function
--- NEW FILE: Function.cs ---
/*
QuantProject - Quantitative Finance Library
Function.cs
Copyright (C) 2003
Marco Milletti
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
namespace QuantProject.ADT.Statistics
{
/// <summary>
/// Enumeration used in methods
/// that return a History object based
/// on a specific function
/// </summary>
public enum Function
{
SimpleAverage,
StandardDeviation
}
}
|
|
From: <gla...@us...> - 2003-12-19 15:58:29
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader
In directory sc8-pr-cvs1:/tmp/cvs-serv8673/Downloader
Modified Files:
Downloader.csproj
Log Message:
Added the ValidateDataGrid class
Index: Downloader.csproj
===================================================================
RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Downloader.csproj,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Downloader.csproj 16 Dec 2003 16:39:29 -0000 1.7
--- Downloader.csproj 19 Dec 2003 15:58:25 -0000 1.8
***************
*** 171,174 ****
--- 171,179 ----
/>
<File
+ RelPath = "Validate\ValidateDataGrid.cs"
+ SubType = "Component"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "Validate\ValidateDataTable.cs"
SubType = "Component"
|
|
From: <gla...@us...> - 2003-12-19 15:12:16
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate
In directory sc8-pr-cvs1:/tmp/cvs-serv31155/Validate
Added Files:
ValidateDataGrid.cs
Log Message:
The DataGrid for the validation form
has been moved to its own class
--- NEW FILE: ValidateDataGrid.cs ---
using System;
using System.Windows.Forms;
namespace QuantProject.Applications.Downloader.Validate
{
/// <summary>
/// Summary description for ValidateDataGrid.
/// </summary>
public class ValidateDataGrid : DataGrid
{
private ValidateDataTable validateDataTable;
public ValidateDataGrid()
{
//
// TODO: Add constructor logic here
//
}
#region "Validate"
private void validate_setTableStyle()
{
DataGridTableStyle dataGridTableStyle = new DataGridTableStyle();
dataGridTableStyle.ColumnHeadersVisible = true;
dataGridTableStyle.MappingName = "quotes";
DataGridTextBoxColumn dataGridColumnStyle = new DataGridTextBoxColumn();
dataGridColumnStyle.MappingName = "quTicker";
dataGridColumnStyle.HeaderText = "Ticker";
dataGridTableStyle.GridColumnStyles.Add( dataGridColumnStyle );
this.TableStyles.Add( dataGridTableStyle );
}
public ValidateDataTable Validate( string tickerIsLike , string suspiciousRatio )
{
this.validateDataTable = new ValidateDataTable();
this.DataSource = validateDataTable;
validate_setTableStyle();
validateDataTable.AddRows( tickerIsLike , Convert.ToDouble( suspiciousRatio ) );
return this.validateDataTable;
}
#endregion
}
}
|