Code cleanup.
This commit is contained in:
@@ -316,7 +316,6 @@ namespace TradeBlotter.ViewModels
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(companyProfile.Sector).Append("/").Append(companyProfile.Industry).Append("\n").Append(companyProfile.Description);
|
||||
return sb.ToString();
|
||||
//return companyProfile.Description;
|
||||
}
|
||||
}
|
||||
// ****************************************************************************************************************************************************************
|
||||
@@ -1108,10 +1107,20 @@ namespace TradeBlotter.ViewModels
|
||||
{
|
||||
try
|
||||
{
|
||||
if(!MGSessionManager.IsValidSessionFile(pathFileName))return false;
|
||||
if(!MGSessionManager.IsValidSessionFile(pathFileName))
|
||||
{
|
||||
MessageBox.Show(String.Format("'{0}' is not a valid model. IsValidSessionFile returned false.",pathFileName));
|
||||
pathFileName = null;
|
||||
return false;
|
||||
}
|
||||
initialPath=Path.GetDirectoryName(pathFileName);
|
||||
sessionParams=MGSessionManager.RestoreSession(pathFileName);
|
||||
if(null==sessionParams){ MessageBox.Show(String.Format("Unable to open {0}",pathFileName));pathFileName=null;return false;}
|
||||
if(null==sessionParams)
|
||||
{
|
||||
MessageBox.Show(String.Format("Unable to open '{0}'. Restore session failed.",pathFileName));
|
||||
pathFileName=null;
|
||||
return false;
|
||||
}
|
||||
modelStatistics=MomentumBacktest.GetModelStatistics(sessionParams);
|
||||
modelPerformanceSeries=MomentumBacktest.GetModelPerformance(sessionParams);
|
||||
configuration=sessionParams.Configuration;
|
||||
@@ -1133,7 +1142,7 @@ namespace TradeBlotter.ViewModels
|
||||
base.OnPropertyChanged("AllPositions");
|
||||
base.OnPropertyChanged("CanMonitor");
|
||||
base.OnPropertyChanged("CashBalance");
|
||||
base.OnPropertyChanged("NonTradeableCash");
|
||||
base.OnPropertyChanged("NonTradeableCash");
|
||||
base.OnPropertyChanged("ModelExpectation");
|
||||
base.OnPropertyChanged("ExpectationColor");
|
||||
base.OnPropertyChanged("ExpectationDescription");
|
||||
|
||||
Reference in New Issue
Block a user