Пример #1
0
        private void selectEventsMenuItem_Click(object sender, EventArgs e)
        {
            ResetDrawingButtons();

            StockEventSelectorDlg stockEventSelectorDlg = new StockEventSelectorDlg(Settings.Default.SelectedEvents,
               (StockEvent.EventFilterMode)
                  Enum.Parse(typeof(StockEvent.EventFilterMode), Settings.Default.EventFilterMode));
            if (stockEventSelectorDlg.ShowDialog() == DialogResult.OK)
            {
                Settings.Default.SelectedEvents = stockEventSelectorDlg.SelectedEvents;
                Settings.Default.EventFilterMode = stockEventSelectorDlg.EventFilterMode.ToString();

                // Detect new indicators
                this.statusLabel.Text = "Detecting Events";
                this.Refresh();
                this.progressBar.Minimum = 0;
                this.progressBar.Maximum = StockDictionary.Count;
                this.progressBar.Value = 0;
                if (this.showOnlyEventMenuItem.Checked == true)
                {
                    StockDictionary.DetectEvents(new StockDictionary.OnSerieEventDetectionDone(OnSerieEventProcessed),
                       this.StockPortofolioList, Settings.Default.SelectedEvents);
                    this.progressBar.Value = 0;
                }
                this.statusLabel.Text = string.Empty;
                this.progressBar.Value = 0;

                Settings.Default.Save();
            }
            // Reinit combo
            InitialiseStockCombo();
        }
Пример #2
0
        private void selectEventForMarqueeMenuItem_Click(object sender, EventArgs e)
        {
            if (this.currentStockSerie == null) return;
            StockEventSelectorDlg stockEventSelectorDlg = new StockEventSelectorDlg(Settings.Default.EventMarquees, (StockEvent.EventFilterMode)Enum.Parse(typeof(StockEvent.EventFilterMode), Settings.Default.EventMarqueeMode));
            if (stockEventSelectorDlg.ShowDialog() == DialogResult.OK)
            {
                Settings.Default.EventMarquees = stockEventSelectorDlg.SelectedEvents;
                Settings.Default.EventMarqueeMode = stockEventSelectorDlg.EventFilterMode.ToString();

                Settings.Default.Save();
                OnNeedReinitialise(false);
            }
        }