示例#1
0
        public void BuildOnceAllReports(SystemPerformance performance)
        {
            if (this.ChartFormManager.ChartForm.InvokeRequired)
            {
                this.ChartFormManager.ChartForm.BeginInvoke((MethodInvoker) delegate { this.BuildOnceAllReports(performance); });
                return;
            }
            foreach (Reporter rep in this.ReporterShortNamesUserInvoked.Values)
            {
                rep.BuildOnceAfterFullBlindBacktestFinished(performance);

                // Reporters.Position should display "Positions (276)"
                ReporterFormWrapper parent = rep.Parent as ReporterFormWrapper;
                if (parent == null)
                {
                    continue;
                }
                parent.Text = rep.TabText + " :: " + this.ChartFormManager.ChartForm.Text;
            }
        }
示例#2
0
        public ReporterFormWrapper ReporterActivateShowRegisterMniTick(string typeNameShortOrFullAutodetect, bool show = true)
        {
            string   typeNameShort     = this.repository.ShrinkTypeName(typeNameShortOrFullAutodetect);
            Reporter reporterActivated = this.repository.ActivateFromTypeName(typeNameShortOrFullAutodetect);
            object   reportersSnapshot = this.FindOrCreateReportersSnapshot(reporterActivated);

            reporterActivated.Initialize(this.ChartFormManager.ChartForm.ChartControl as ChartShadow, reportersSnapshot);
            var ret = new ReporterFormWrapper(this, reporterActivated);

            //ret.Text = reporterActivated.TabText + " :: " + this.ChartFormsManager.Strategy.Name;
            ret.Text = reporterActivated.TabText + " :: " + this.ChartFormManager.ChartForm.Text;
            if (show)
            {
                ret.Show(this.ChartFormManager.MainForm.DockPanel);
            }
            this.ReporterShortNamesUserInvoked.Add(typeNameShort, reporterActivated);
            this.ChartFormManager.ReportersDumpCurrentForSerialization();
            this.MenuItemsProvider.FindMniByShortNameAndTick(typeNameShort);
            reporterActivated.BuildOnceAfterFullBlindBacktestFinished(this.ChartFormManager.Executor.Performance);
            return(ret);
        }