Пример #1
0
        private void editStrategyButtonClicked(object sender, EventArgs e)
        {
            if (strategyComboBox.SelectedIndex < 0 || portfolios.Count < 0)
            {
                return;
            }

            AddPortfolioForm form = AddPortfolioForm.edit(portfolios[strategyComboBox.SelectedIndex]);

            process(form);
        }
Пример #2
0
        private void process(AddPortfolioForm form)
        {
            form.ShowDialog();

            if (!form.isProcessingSuccess())
            {
                return;
            }

            Portfolio portfolio = form.GetPortfolio();

            if (!portfolios.Contains(portfolio))
            {
                portfolios.Add(portfolio);
            }

            initCombobox();
            strategyComboBox.SelectedIndex = portfolios.IndexOf(portfolio);
        }
Пример #3
0
        private void addStrategyButtonClicked(object sender, EventArgs e)
        {
            AddPortfolioForm form = AddPortfolioForm.add();

            process(form);
        }