/// <summary> /// Initialises a new instance of the class /// </summary> public BackTestingForm(bool isTestMode = true) { InitializeComponent(); _isTestMode = isTestMode; pnlPlaceholder.Controls.Add(_settingsCtrl); PopulateStrategyDropdown(); cbbStrategy.SelectedIndex = 0; chartSelector.LoadFromCSVClicked += chartSelector_LoadFromCSVClicked; chartSelector.RefreshClicked += chartSelector_RefreshClicked; _indicatorsForm = new IndicatorsForm(); _indicatorsForm.IndicatorOptionsChanged += (s, options) => { chartCtrl.NotifyIndicatorsChanged(options); }; chartCtrl.NotifyIndicatorsChanged(_indicatorsForm.IndicatorOptions); chartSelector.OnPairChanged += (s, e) => { UpdateLabels(chartSelector.SelectedPair); }; this.FormClosed += (s, e) => _indicatorsForm.Dispose(); }
/// <summary> /// Initialises a new instance of the class /// </summary> public MainForm() { InitializeComponent(); this.Text = CoinTNet.Common.Constants.ApplicationConstants.ApplicationName; EventAggregator.Instance.Subscribe <StatusUpdateMessage>(m => UpdateStatus(m.Message)); // this.Shown += (s, e) => OnBtnRefreshClick(); dataSelector.RefreshClicked += (s, e) => OnBtnRefreshClick(); dataSelector.OnPairChanged += (s, e) => OnPairChanged(); dataSelector.UseLiveData = true; _selectedPair = dataSelector.SelectedPair; _indicatorsForm = new IndicatorsForm(); _indicatorsForm.IndicatorOptionsChanged += (s, options) => { myChartControl.NotifyIndicatorsChanged(options); }; myChartControl.NotifyIndicatorsChanged(_indicatorsForm.IndicatorOptions); this.Load += (s, e) => EventAggregator.Instance.Publish(new ApplicationStartMessage()); this.Text = string.Format("{0} - {1}a", ApplicationConstants.ApplicationName, ApplicationConstants.CurrentVersion); }
/// <summary> /// Initialises a new instance of the class /// </summary> public MainForm() { InitializeComponent(); this.Text = CoinTNet.Common.Constants.ApplicationConstants.ApplicationName; EventAggregator.Instance.Subscribe<StatusUpdateMessage>(m => UpdateStatus(m.Message)); // this.Shown += (s, e) => OnBtnRefreshClick(); dataSelector.RefreshClicked += (s, e) => OnBtnRefreshClick(); dataSelector.OnPairChanged += (s, e) => OnPairChanged(); dataSelector.UseLiveData = true; _selectedPair = dataSelector.SelectedPair; _indicatorsForm = new IndicatorsForm(); _indicatorsForm.IndicatorOptionsChanged += (s, options) => { myChartControl.NotifyIndicatorsChanged(options); }; myChartControl.NotifyIndicatorsChanged(_indicatorsForm.IndicatorOptions); this.Load += (s, e) => EventAggregator.Instance.Publish(new ApplicationStartMessage()); this.Text = string.Format("{0} - {1}a", ApplicationConstants.ApplicationName, ApplicationConstants.CurrentVersion); }