SlideShare a Scribd company logo
1 of 43
Company Tracker | CIS 4100 May 18, 2009 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Overview 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Program Design Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Importing Data ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Importing Data ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Importing Data ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Browse Button 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* creating new open file dialog box*/ OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); /* setting filters for compatible data*/ openFileDialog1->Filter = "Text File (Tab Delimited)|*.txt"; openFileDialog1->Title = "Select a File";  /*the dialog box is shown automatically*/ /*when the dialog box is closed get the file path*/ if(openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK){   /*get the path received into the textbox*/   txtPath->Text = openFileDialog1->FileName; }
Importing Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 companyImportList->Add(gcnew CCompany(columns[0],    columns[1], columns[2],   Convert::ToInt64(columns[4]),   Convert::ToDouble(columns[5]),   Convert::ToDouble(columns[6]),   Convert::ToDouble(columns[8]),   Convert::ToDouble(columns[9]),   Convert::ToDouble(columns[10]),  Convert::ToDouble(columns[11]))); CompaniesDB->ImportCompanies(companyImportList); companyImportList = gcnew List<CCompany^>(); StreamReader
Importing Data ,[object Object],[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Checking Compatibility 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // read contents of file while(txtIn->Peek() != -1){   // read lines of text   String^ row = txtIn->ReadLine();    // split line to find # of columns   array<String^>^ columns = row->Split('');   /*checks if the file is compatible*/   if(columns->Length!=12){   MessageBox::Show(&quot;The selected file is not  compatible.&quot;, &quot;Error Reading File&quot;,  MessageBoxButtons::OK  ,MessageBoxIcon::Error);   break; }else{…….}
Company Management ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Program Design: Company Management Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Company Management: Sorting Companies ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Sorting Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // creates a list view item comparer CListViewItemComparer^ lviComparer =  gcnew  CListViewItemComparer(e- >Column); // set the order and apply it to the listview control if(e->Column == lastColSorted){…… } //apply the comparer to the listview listView1->ListViewItemSorter =  lviComparer ; //set flags lastColSorted = e->Column; lastSortOrder = lviComparer->Order; //apply row colors to list view AlternateRowColorListView();
Company Management:  Searching Companies ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Searching a Company 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* get item from listview */ ListViewItem^ resultLvItem = listView1-> FindItemWithText(ticker); if(resultLvItem != nullptr){ /* select item and ensure is visible */ resultLvItem->Selected = true; listView1->EnsureVisible(resultLvItem->Index); }
Company Management:  Adding Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ,[object Object],[object Object]
Company Management:  Adding Companies ,[object Object],[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Adding a Company to the DB 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 frmAddCompany^ FAddCompany = gcnew frmAddCompany(); CCompany^ newCompany = FAddCompany->GetNewCompany(); /* if the company object received is not null save it*/ if(newCompany != nullptr){   /* check if the company exists*/   if(CompaniesDB->CompanyExists(newCompany)){   MessageBox::Show(&quot;The company &quot; + newCompany- >Ticker + &quot; already exists.&quot;,&quot;Company Already Exists&quot;);   }else{   /*adding company*/   CompaniesDB->AddCompany(newCompany);   /* update list view*/   UpdateListView();   } }
Company Management:  Editing Companies ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Editing Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // get the selected item ListViewItem^ itemSelected = listView1->SelectedItems[0]; CCompany^ selectedCompany =  CompaniesDB->GetCompany(itemSelected->Text); frmAddCompany^ FEditCompany = gcnew frmAddCompany(); CCompany^ editedCompany =  FEditCompany->EditCompany(selectedCompany); if(editedCompany != nullptr){   /* replace company */   CompaniesDB->AddCompany(editedCompany);   CompaniesDB->RemoveCompany(selectedCompany);   /* update listview*/   UpdateListView();
Company Management:  Deleting Companies ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Deleting a company 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // get the selected item ListViewItem^ itemSelected = listView1->SelectedItems[0]; CCompany^ selectedCompany =  CompaniesDB->GetCompany(itemSelected->Text); if(selectedCompany != nullptr){   // get delete confirmation   String^ msg = &quot;Are you sure you want to delete &quot; +  selectedCompany->Ticker + &quot;?&quot;;   ::DialogResult button = MessageBox::Show(msg, &quot;Comfirm Delete&quot;,  MessageBoxButtons::YesNo);   if(button == ::DialogResult::Yes){   CompaniesDB->RemoveCompany(selectedCompany);   UpdateListView();   }
Company Details 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
SendToCompanyDetails(Ccompany) 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // make sure the detail's form for that company is closed if(!IsCompanyDetailsOpen(someCompany->Ticker)){ // initialize and show child form /*setting child window*/ FCompanyDetails = gcnew frmCompanyDetails(); FCompanyDetails->MdiParent = this->MdiParent; FCompanyDetails->Text = someCompany->Ticker + &quot; -  Company Details&quot;; /* setting position */ FCompanyDetails->StartPosition =  FormStartPosition::CenterParent; /*send company to form */ FCompanyDetails->DisplayCompany(someCompany); FCompanyDetails->Show();
Company Details: Overview ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Company Details: Downloading Quotes ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Downloading Quotes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ticker = ticker->ToUpper(); String^ downloadFolder = &quot;C://files//FINA//PRICEDATA//&quot;+ ticker +&quot;.csv&quot;; String^ website = &quot;http://www.google.com/finance/historical?q=&quot; + ticker + &quot;&output=csv&quot;; try{ /* creates a new WebClient object */ WebClient^ wc = gcnew WebClient(); /* download file to assign download folder */ wc->DownloadFile(website,downloadFolder); /* if file downloaded successfully */ MessageBox::Show(&quot;Company data for &quot; + ticker + &quot; downloaded successfully.&quot;,  &quot;Data Downloaded&quot;); /* get a company object from the label ticker and redraw a chart*/ DrawChart(someCompany); }catch(WebException^ e ){/* File could not be downloaded */...}
Program Design: Sectors and Historical Data 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* load companies from file into memory */ CompaniesDB->LoadCompanies(); /* get a list of companies by sector */ List<CCompany^>^ companiesBySectorList =  CompaniesDB->GetCompaniesBySector(someCompany->Sector); /* get historical data */ List<COHLC^>^ ohlcList =  someCompany->GetHistoricalData();
Charting Data 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 if(someCompany->HistoricalDataExists()) { /* setting chart style */ chart1->Series[&quot;Prices&quot;]->ChartType = SeriesChartType::Line; /* enable chart options */ groubBxChartOptions->Enabled = true; rdbtnLine->Checked = true; /*Historical Data Status */ lblHistoricalDataStatus->Text += &quot; was last updated on: &quot; +  someCompany->HistoricaDataLastUpdated(); /* set series to be drawn in the chart*/ for each(COHLC^ item in ohlcList){ chart1->Series[&quot;Prices&quot;]->Points->AddXY( item->Date,item->Open, item->High,item->Low, item->Close); }…}
Company Details Chart ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Company Details Chart Options 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Company Details Chart Options ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
10/10/10 Jaime Moran - CIS 4100 - Spring 2009 Company Details Chart Options ,[object Object]
Company Details Chart Options 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ,[object Object]
Viewing Multiple Companies ,[object Object],10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Program Design: Tracking Events Class 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Tracking Events: Adding Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Adding Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ListViewItem^ lvitem =  gcnew ListViewItem(dtpDate->Value.ToShortDateString()); lvitem->SubItems->Add(txtTicker->Text->ToUpper()); lvitem->SubItems->Add(txtEvent->Text); lvEvents->Items->Add(lvitem); EventsDB->SaveEvents(); /*initialize Events DB */ EventsDB = gcnew CCalendarEvents(); /* link the DB to a list view control */ EventsDB->LinkToListView = lvEvents; /* load all data into the liked listview*/ EventsDB->FillEvents();
Tracking Events: Viewing and Deleting Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
Program Design: Other Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
File Structure 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 Directory Companies.txt events.txt
File Structure: Historical Quotes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 GOOG.csv

More Related Content

Similar to Company Tracker

Cis 407 i lab 5 of 7
Cis 407 i lab 5 of 7Cis 407 i lab 5 of 7
Cis 407 i lab 5 of 7helpido9
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletMitchinson
 
XPages - The Ties That Bind
XPages - The Ties That BindXPages - The Ties That Bind
XPages - The Ties That BindMichael McGarel
 
Supersize me
Supersize meSupersize me
Supersize medominion
 
A multi submission importer for easyform
A multi submission importer for easyformA multi submission importer for easyform
A multi submission importer for easyformAnnette Lewis
 
MaxTECH Technical Training Presentation from MaximoWorld 2018
MaxTECH Technical Training Presentation from MaximoWorld 2018MaxTECH Technical Training Presentation from MaximoWorld 2018
MaxTECH Technical Training Presentation from MaximoWorld 2018Helen Fisher
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateKiev ALT.NET
 
For this project your task is to update the RSS Reader program you w.pdf
For this project your task is to update the RSS Reader program you w.pdfFor this project your task is to update the RSS Reader program you w.pdf
For this project your task is to update the RSS Reader program you w.pdffathimahardwareelect
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examplesAmit Sharma
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examplesAmit Soni
 
What's new in ASP.NET 4
What's new in ASP.NET 4What's new in ASP.NET 4
What's new in ASP.NET 4Robert MacLean
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsIBM UrbanCode Products
 
PG Real Estate CMS: Import instructions
PG Real Estate CMS: Import instructionsPG Real Estate CMS: Import instructions
PG Real Estate CMS: Import instructionspilotgroup
 
Cis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universityCis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universitylhkslkdh89009
 
Dxl As A Lotus Domino Integration Tool
Dxl As A Lotus Domino Integration ToolDxl As A Lotus Domino Integration Tool
Dxl As A Lotus Domino Integration Tooldominion
 
Lewis Chiu Portfolio
Lewis Chiu PortfolioLewis Chiu Portfolio
Lewis Chiu PortfolioLewisChiu
 
building-a-fdm-application-for-a-hfm-target
 building-a-fdm-application-for-a-hfm-target building-a-fdm-application-for-a-hfm-target
building-a-fdm-application-for-a-hfm-targetSid Mehta
 

Similar to Company Tracker (20)

Cis 407 i lab 5 of 7
Cis 407 i lab 5 of 7Cis 407 i lab 5 of 7
Cis 407 i lab 5 of 7
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutlet
 
XPages - The Ties That Bind
XPages - The Ties That BindXPages - The Ties That Bind
XPages - The Ties That Bind
 
Supersize me
Supersize meSupersize me
Supersize me
 
A multi submission importer for easyform
A multi submission importer for easyformA multi submission importer for easyform
A multi submission importer for easyform
 
MaxTECH Technical Training Presentation from MaximoWorld 2018
MaxTECH Technical Training Presentation from MaximoWorld 2018MaxTECH Technical Training Presentation from MaximoWorld 2018
MaxTECH Technical Training Presentation from MaximoWorld 2018
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
For this project your task is to update the RSS Reader program you w.pdf
For this project your task is to update the RSS Reader program you w.pdfFor this project your task is to update the RSS Reader program you w.pdf
For this project your task is to update the RSS Reader program you w.pdf
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examples
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examples
 
What's new in ASP.NET 4
What's new in ASP.NET 4What's new in ASP.NET 4
What's new in ASP.NET 4
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with Plugins
 
PG Real Estate CMS: Import instructions
PG Real Estate CMS: Import instructionsPG Real Estate CMS: Import instructions
PG Real Estate CMS: Import instructions
 
Bam
BamBam
Bam
 
Cis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universityCis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry university
 
Bam
BamBam
Bam
 
Bam
BamBam
Bam
 
Dxl As A Lotus Domino Integration Tool
Dxl As A Lotus Domino Integration ToolDxl As A Lotus Domino Integration Tool
Dxl As A Lotus Domino Integration Tool
 
Lewis Chiu Portfolio
Lewis Chiu PortfolioLewis Chiu Portfolio
Lewis Chiu Portfolio
 
building-a-fdm-application-for-a-hfm-target
 building-a-fdm-application-for-a-hfm-target building-a-fdm-application-for-a-hfm-target
building-a-fdm-application-for-a-hfm-target
 

Company Tracker

  • 1. Company Tracker | CIS 4100 May 18, 2009 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 2.
  • 3. Program Design Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 4.
  • 5.
  • 6.
  • 7. Browse Button 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* creating new open file dialog box*/ OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); /* setting filters for compatible data*/ openFileDialog1->Filter = &quot;Text File (Tab Delimited)|*.txt&quot;; openFileDialog1->Title = &quot;Select a File&quot;; /*the dialog box is shown automatically*/ /*when the dialog box is closed get the file path*/ if(openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK){ /*get the path received into the textbox*/ txtPath->Text = openFileDialog1->FileName; }
  • 8. Importing Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 companyImportList->Add(gcnew CCompany(columns[0], columns[1], columns[2], Convert::ToInt64(columns[4]), Convert::ToDouble(columns[5]), Convert::ToDouble(columns[6]), Convert::ToDouble(columns[8]), Convert::ToDouble(columns[9]), Convert::ToDouble(columns[10]), Convert::ToDouble(columns[11]))); CompaniesDB->ImportCompanies(companyImportList); companyImportList = gcnew List<CCompany^>(); StreamReader
  • 9.
  • 10. Checking Compatibility 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // read contents of file while(txtIn->Peek() != -1){ // read lines of text String^ row = txtIn->ReadLine(); // split line to find # of columns array<String^>^ columns = row->Split(''); /*checks if the file is compatible*/ if(columns->Length!=12){ MessageBox::Show(&quot;The selected file is not compatible.&quot;, &quot;Error Reading File&quot;, MessageBoxButtons::OK ,MessageBoxIcon::Error); break; }else{…….}
  • 11.
  • 12. Program Design: Company Management Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 13.
  • 14. Sorting Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // creates a list view item comparer CListViewItemComparer^ lviComparer = gcnew CListViewItemComparer(e- >Column); // set the order and apply it to the listview control if(e->Column == lastColSorted){…… } //apply the comparer to the listview listView1->ListViewItemSorter = lviComparer ; //set flags lastColSorted = e->Column; lastSortOrder = lviComparer->Order; //apply row colors to list view AlternateRowColorListView();
  • 15.
  • 16. Searching a Company 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* get item from listview */ ListViewItem^ resultLvItem = listView1-> FindItemWithText(ticker); if(resultLvItem != nullptr){ /* select item and ensure is visible */ resultLvItem->Selected = true; listView1->EnsureVisible(resultLvItem->Index); }
  • 17.
  • 18.
  • 19. Adding a Company to the DB 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 frmAddCompany^ FAddCompany = gcnew frmAddCompany(); CCompany^ newCompany = FAddCompany->GetNewCompany(); /* if the company object received is not null save it*/ if(newCompany != nullptr){ /* check if the company exists*/ if(CompaniesDB->CompanyExists(newCompany)){ MessageBox::Show(&quot;The company &quot; + newCompany- >Ticker + &quot; already exists.&quot;,&quot;Company Already Exists&quot;); }else{ /*adding company*/ CompaniesDB->AddCompany(newCompany); /* update list view*/ UpdateListView(); } }
  • 20.
  • 21. Editing Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // get the selected item ListViewItem^ itemSelected = listView1->SelectedItems[0]; CCompany^ selectedCompany = CompaniesDB->GetCompany(itemSelected->Text); frmAddCompany^ FEditCompany = gcnew frmAddCompany(); CCompany^ editedCompany = FEditCompany->EditCompany(selectedCompany); if(editedCompany != nullptr){ /* replace company */ CompaniesDB->AddCompany(editedCompany); CompaniesDB->RemoveCompany(selectedCompany); /* update listview*/ UpdateListView();
  • 22.
  • 23. Deleting a company 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // get the selected item ListViewItem^ itemSelected = listView1->SelectedItems[0]; CCompany^ selectedCompany = CompaniesDB->GetCompany(itemSelected->Text); if(selectedCompany != nullptr){ // get delete confirmation String^ msg = &quot;Are you sure you want to delete &quot; + selectedCompany->Ticker + &quot;?&quot;; ::DialogResult button = MessageBox::Show(msg, &quot;Comfirm Delete&quot;, MessageBoxButtons::YesNo); if(button == ::DialogResult::Yes){ CompaniesDB->RemoveCompany(selectedCompany); UpdateListView(); }
  • 24. Company Details 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 25. SendToCompanyDetails(Ccompany) 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // make sure the detail's form for that company is closed if(!IsCompanyDetailsOpen(someCompany->Ticker)){ // initialize and show child form /*setting child window*/ FCompanyDetails = gcnew frmCompanyDetails(); FCompanyDetails->MdiParent = this->MdiParent; FCompanyDetails->Text = someCompany->Ticker + &quot; - Company Details&quot;; /* setting position */ FCompanyDetails->StartPosition = FormStartPosition::CenterParent; /*send company to form */ FCompanyDetails->DisplayCompany(someCompany); FCompanyDetails->Show();
  • 26.
  • 27.
  • 28. Downloading Quotes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ticker = ticker->ToUpper(); String^ downloadFolder = &quot;C://files//FINA//PRICEDATA//&quot;+ ticker +&quot;.csv&quot;; String^ website = &quot;http://www.google.com/finance/historical?q=&quot; + ticker + &quot;&output=csv&quot;; try{ /* creates a new WebClient object */ WebClient^ wc = gcnew WebClient(); /* download file to assign download folder */ wc->DownloadFile(website,downloadFolder); /* if file downloaded successfully */ MessageBox::Show(&quot;Company data for &quot; + ticker + &quot; downloaded successfully.&quot;, &quot;Data Downloaded&quot;); /* get a company object from the label ticker and redraw a chart*/ DrawChart(someCompany); }catch(WebException^ e ){/* File could not be downloaded */...}
  • 29. Program Design: Sectors and Historical Data 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* load companies from file into memory */ CompaniesDB->LoadCompanies(); /* get a list of companies by sector */ List<CCompany^>^ companiesBySectorList = CompaniesDB->GetCompaniesBySector(someCompany->Sector); /* get historical data */ List<COHLC^>^ ohlcList = someCompany->GetHistoricalData();
  • 30. Charting Data 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 if(someCompany->HistoricalDataExists()) { /* setting chart style */ chart1->Series[&quot;Prices&quot;]->ChartType = SeriesChartType::Line; /* enable chart options */ groubBxChartOptions->Enabled = true; rdbtnLine->Checked = true; /*Historical Data Status */ lblHistoricalDataStatus->Text += &quot; was last updated on: &quot; + someCompany->HistoricaDataLastUpdated(); /* set series to be drawn in the chart*/ for each(COHLC^ item in ohlcList){ chart1->Series[&quot;Prices&quot;]->Points->AddXY( item->Date,item->Open, item->High,item->Low, item->Close); }…}
  • 31.
  • 32. Company Details Chart Options 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. Program Design: Tracking Events Class 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 38. Tracking Events: Adding Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 39. Adding Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ListViewItem^ lvitem = gcnew ListViewItem(dtpDate->Value.ToShortDateString()); lvitem->SubItems->Add(txtTicker->Text->ToUpper()); lvitem->SubItems->Add(txtEvent->Text); lvEvents->Items->Add(lvitem); EventsDB->SaveEvents(); /*initialize Events DB */ EventsDB = gcnew CCalendarEvents(); /* link the DB to a list view control */ EventsDB->LinkToListView = lvEvents; /* load all data into the liked listview*/ EventsDB->FillEvents();
  • 40. Tracking Events: Viewing and Deleting Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 41. Program Design: Other Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 42. File Structure 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 Directory Companies.txt events.txt
  • 43. File Structure: Historical Quotes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 GOOG.csv