示例#1
0
        private void buttonCalc_Click(object sender, EventArgs e)
        {
            SetUserDefinedDate();

            log_.Info("==>Calculate start. Start Date = " + History_.MinDate.ToLongDateString()
                      + ", End Date = " + History_.MaxDate.ToLongDateString());

            FormStrategy frm = new FormStrategy();

            if (frm.ShowDialog() != DialogResult.OK)
            {
                log_.Info("<==Calculate end. Not select strategy. ");
                return;
            }

            FinanceRunner runner = new FinanceRunner();

            runner.CurrentBonusProcessor = BonusProcessor_;

            runner.Go(History_, frm.Factory);

            _results = runner.Results;
            log_.Info("<==Calculate complete. ");

            ShowCompareResults();
        }
示例#2
0
        private void btStrategy_Click(object sender, EventArgs e)
        {
            FormStrategy form   = new FormStrategy(chartComponent);
            DialogResult result = form.ShowDialog();

            if (result == DialogResult.OK)
            {
                IStrategyExecutorPool     pool         = StrategyCenter.Default.GetStrategyExecutorPool();
                FormStrategyExecutorState formRunState = new FormStrategyExecutorState(pool);
                formRunState.TopMost = true;
                formRunState.Show();
            }
        }