示例#1
0
		protected override void OnSave()
		{
            MemoryManagementXmlDocument doc = new MemoryManagementXmlDocument();
			doc.Settings.PortfolioPerformanceEnabled.Value = this.PortfolioPerformanceEnabled;
			doc.Settings.PortfolioPerformancePnLCalculationEnabled.Value = this.PortfolioPerformancePnLCalculationEnabled;
			doc.Settings.PortfolioPerformanceDrawdownCalculationEnabled.Value = this.PortfolioPerformanceDrawdownCalculationEnabled;
			doc.Settings.RemoveOrders.Value = this.RemoveOrders;
			doc.Settings.PortfolioPerformanceUpdateOnIntervalEnabled.Value = this.PortfolioPerformanceUpdateOnIntervalEnabled;
			doc.Settings.PortfolioPerformanceUpdateInterval.Value = this.PortfolioPerformanceUpdateInterval;
			doc.Save(this.configFile.FullName);
		}
示例#2
0
        protected override void OnSave()
        {
            MemoryManagementXmlDocument doc = new MemoryManagementXmlDocument();

            doc.Settings.PortfolioPerformanceEnabled.Value = this.PortfolioPerformanceEnabled;
            doc.Settings.PortfolioPerformancePnLCalculationEnabled.Value      = this.PortfolioPerformancePnLCalculationEnabled;
            doc.Settings.PortfolioPerformanceDrawdownCalculationEnabled.Value = this.PortfolioPerformanceDrawdownCalculationEnabled;
            doc.Settings.RemoveOrders.Value = this.RemoveOrders;
            doc.Settings.PortfolioPerformanceUpdateOnIntervalEnabled.Value = this.PortfolioPerformanceUpdateOnIntervalEnabled;
            doc.Settings.PortfolioPerformanceUpdateInterval.Value          = this.PortfolioPerformanceUpdateInterval;
            doc.Save(this.configFile.FullName);
        }
示例#3
0
 protected override void OnLoad()
 {
     if (this.configFile.Exists)
     {
         MemoryManagementXmlDocument doc = new MemoryManagementXmlDocument();
         doc.Load(this.configFile.FullName);
         this.PortfolioPerformanceEnabled = doc.Settings.PortfolioPerformanceEnabled.Value;
         this.PortfolioPerformancePnLCalculationEnabled      = doc.Settings.PortfolioPerformancePnLCalculationEnabled.Value;
         this.PortfolioPerformanceDrawdownCalculationEnabled = doc.Settings.PortfolioPerformanceDrawdownCalculationEnabled.Value;
         this.RemoveOrders = doc.Settings.RemoveOrders.Value;
         this.PortfolioPerformanceUpdateOnIntervalEnabled = doc.Settings.PortfolioPerformanceUpdateOnIntervalEnabled.Value;
         this.PortfolioPerformanceUpdateInterval          = doc.Settings.PortfolioPerformanceUpdateInterval.Value;
     }
     else
     {
         this.PortfolioPerformanceEnabled = true;
         this.PortfolioPerformancePnLCalculationEnabled      = true;
         this.PortfolioPerformanceDrawdownCalculationEnabled = true;
         this.RemoveOrders = false;
         this.PortfolioPerformanceUpdateOnIntervalEnabled = false;
         this.PortfolioPerformanceUpdateInterval          = 1;
     }
 }
示例#4
0
		protected override void OnLoad()
		{
			if (this.configFile.Exists)
			{
                MemoryManagementXmlDocument doc = new MemoryManagementXmlDocument();
				doc.Load(this.configFile.FullName);
				this.PortfolioPerformanceEnabled = doc.Settings.PortfolioPerformanceEnabled.Value;
				this.PortfolioPerformancePnLCalculationEnabled = doc.Settings.PortfolioPerformancePnLCalculationEnabled.Value;
				this.PortfolioPerformanceDrawdownCalculationEnabled = doc.Settings.PortfolioPerformanceDrawdownCalculationEnabled.Value;
				this.RemoveOrders = doc.Settings.RemoveOrders.Value;
				this.PortfolioPerformanceUpdateOnIntervalEnabled = doc.Settings.PortfolioPerformanceUpdateOnIntervalEnabled.Value;
				this.PortfolioPerformanceUpdateInterval = doc.Settings.PortfolioPerformanceUpdateInterval.Value;
			}
			else
			{
				this.PortfolioPerformanceEnabled = true;
				this.PortfolioPerformancePnLCalculationEnabled = true;
				this.PortfolioPerformanceDrawdownCalculationEnabled = true;
				this.RemoveOrders = false;
				this.PortfolioPerformanceUpdateOnIntervalEnabled = false;
				this.PortfolioPerformanceUpdateInterval = 1;
			}
		}