[Quantproject-developers] QuantProject/b91_QuantProject Main.cs,1.11,1.12
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-02-15 19:14:03
|
Update of /cvsroot/quantproject/QuantProject/b91_QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23621/b91_QuantProject Modified Files: Main.cs Log Message: It is now possible to load a serialized report (saved into a file) Index: Main.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b91_QuantProject/Main.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Main.cs 12 Feb 2005 19:16:46 -0000 1.11 --- Main.cs 15 Feb 2005 19:13:42 -0000 1.12 *************** *** 62,65 **** --- 62,66 ---- private System.Windows.Forms.MenuItem menuItemShowReportFromAccount; private System.Windows.Forms.MenuItem menuItemRunReleasingMode; + private System.Windows.Forms.MenuItem menuItemShowSavedReport; /// <summary> /// Required designer variable. *************** *** 110,113 **** --- 111,115 ---- this.menuItemAccountViewer = new System.Windows.Forms.MenuItem(); this.menuItemShowReportFromAccount = new System.Windows.Forms.MenuItem(); + this.menuItemRunReleasingMode = new System.Windows.Forms.MenuItem(); this.menuItem13 = new System.Windows.Forms.MenuItem(); this.menuItem14 = new System.Windows.Forms.MenuItem(); *************** *** 119,123 **** this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); ! this.menuItemRunReleasingMode = new System.Windows.Forms.MenuItem(); // // mainMenu1 --- 121,125 ---- this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); ! this.menuItemShowSavedReport = new System.Windows.Forms.MenuItem(); // // mainMenu1 *************** *** 168,172 **** this.menuItemSavedTests.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItemAccountViewer, ! this.menuItemShowReportFromAccount}); this.menuItemSavedTests.Text = "Saved Tests"; // --- 170,175 ---- this.menuItemSavedTests.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItemAccountViewer, ! this.menuItemShowReportFromAccount, ! this.menuItemShowSavedReport}); this.menuItemSavedTests.Text = "Saved Tests"; // *************** *** 183,186 **** --- 186,195 ---- this.menuItemShowReportFromAccount.Click += new System.EventHandler(this.menuItemShowReportFromAccount_Click); // + // menuItemRunReleasingMode + // + this.menuItemRunReleasingMode.Index = 2; + this.menuItemRunReleasingMode.Text = "Run (releasing mode)"; + this.menuItemRunReleasingMode.Click += new System.EventHandler(this.menuItemRunReleasingMode_Click); + // // menuItem13 // *************** *** 231,239 **** this.menuItem7.Text = ""; // ! // menuItemRunReleasingMode // ! this.menuItemRunReleasingMode.Index = 2; ! this.menuItemRunReleasingMode.Text = "Run (releasing mode)"; ! this.menuItemRunReleasingMode.Click += new System.EventHandler(this.menuItemRunReleasingMode_Click); // // Principale --- 240,248 ---- this.menuItem7.Text = ""; // ! // menuItemShowSavedReport // ! this.menuItemShowSavedReport.Index = 2; ! this.menuItemShowSavedReport.Text = "Show saved report"; ! this.menuItemShowSavedReport.Click += new System.EventHandler(this.menuItemShowSavedReport_Click); // // Principale *************** *** 315,319 **** //new RunWalkForwardOneRank().Run(); // new RunEfficientCTCPorfolio().Run(); ! new RunOneRank().Run(); // } // catch ( Exception ex ) --- 324,329 ---- //new RunWalkForwardOneRank().Run(); // new RunEfficientCTCPorfolio().Run(); ! //new RunOneRank().Run(); ! new RunEfficientCTOPorfolio("STOCKMI",70,5,30,2,1000).Run(); // } // catch ( Exception ex ) *************** *** 331,338 **** } ! private string getPath() { OpenFileDialog openFileDialog = new OpenFileDialog(); ! openFileDialog.Title = "Select a serialized account please ..."; openFileDialog.Multiselect = false; openFileDialog.CheckFileExists = true; --- 341,348 ---- } ! private string getPath(string dialogTitle) { OpenFileDialog openFileDialog = new OpenFileDialog(); ! openFileDialog.Title = dialogTitle; openFileDialog.Multiselect = false; openFileDialog.CheckFileExists = true; *************** *** 343,347 **** private void menuItemShowReportFromAccount_Click(object sender, System.EventArgs e) { ! string chosenPath = this.getPath(); if(chosenPath != "") ShowReportFromFile.ShowReportFromSerializedAccount(chosenPath); --- 353,357 ---- private void menuItemShowReportFromAccount_Click(object sender, System.EventArgs e) { ! string chosenPath = this.getPath("Select a serialized account please ..."); if(chosenPath != "") ShowReportFromFile.ShowReportFromSerializedAccount(chosenPath); *************** *** 357,362 **** //new RunWalkForwardOneRank().Run(); //new RunEfficientCTCPorfolio().Run(); ! new RunEfficientCTOPorfolio("STOCKMI",100,5,30,10,2500).Run(); ! new RunEfficientCTOPorfolio("STOCKMI",100,5,60,10,2500).Run(); //new RunEfficientCTOPorfolio("STOCKMI",100,5,5,1000).Run(); //new RunEfficientCTOPorfolio("STOCKMI",70,5,10,2500).Run(); --- 367,373 ---- //new RunWalkForwardOneRank().Run(); //new RunEfficientCTCPorfolio().Run(); ! ! //new RunEfficientCTOPorfolio("STOCKMI",100,5,30,10,2500).Run(); ! //new RunEfficientCTOPorfolio("STOCKMI",100,5,60,10,2500).Run(); //new RunEfficientCTOPorfolio("STOCKMI",100,5,5,1000).Run(); //new RunEfficientCTOPorfolio("STOCKMI",70,5,10,2500).Run(); *************** *** 375,378 **** --- 386,396 ---- } + private void menuItemShowSavedReport_Click(object sender, System.EventArgs e) + { + string chosenPath = this.getPath("Select a serialized report please ..."); + if(chosenPath != "") + ShowReportFromFile.ShowReportFromSerializedAccountReport(chosenPath); + } + |