public StrategyContent() { InitializeComponent(); _totalPnL = EquityCurveChart.CreateCurve("P&L", Colors.Green, Colors.Red, EquityCurveChartStyles.Area); _unrealizedPnL = EquityCurveChart.CreateCurve(LocalizedStrings.Str3261, Colors.Black); _commission = EquityCurveChart.CreateCurve(LocalizedStrings.Str159, Colors.Red, EquityCurveChartStyles.DashedLine); }
public MainWindow() { ConfigManager.RegisterService <IStorage>(new InMemoryStorage()); InitializeComponent(); if (AutomaticUpdater.ClosingForInstall) { Application.Current.Shutdown(); return; } AutomaticUpdater.Translate(); _totalPnL = EquityCurveChart.CreateCurve("P&L", Colors.Green, Colors.Red, EquityCurveChartStyles.Area); _unrealizedPnL = EquityCurveChart.CreateCurve(LocalizedStrings.Str3261, Colors.Black); _commission = EquityCurveChart.CreateCurve(LocalizedStrings.Str159, Colors.Red, EquityCurveChartStyles.DashedLine); _stoppedBg = ConnectBtn.Background; _startedBg = Brushes.Pink; _logManager = new LogManager(); _logManager.Listeners.Add(new FileLogListener { SeparateByDates = SeparateByDateModes.SubDirectories }); _connector = new StrategyConnector(); _connector.Connected += ConnectionChanged; _connector.Disconnected += ConnectionChanged; LoadSettings(); _logManager.Listeners.Add(new GuiLogListener(Monitor)); _logManager.Sources.Add(_connector); ConfigManager.RegisterService(_connector); ConfigManager.RegisterService <IConnector>(_connector); ConfigManager.RegisterService(new FilterableSecurityProvider(_connector.SecurityList)); InitializeCompositions(); }