public ChartControl() {
			this.ChartSettings = new ChartSettings(); // was a component, used at InitializeComponent() (to draw SampleBars)
			this.ScriptExecutorObjects = new ScriptExecutorObjects();
			InitializeComponent();
			//if (this.ChartSettings == null) 

			this.AutoScroll = false;
			//this.HScroll = true;
			this.hScrollBar.SmallChange = this.ChartSettings.ScrollNBarsPerOneKeyPress;

			panelsFolding = new List<PanelNamedFolding>();
			panelsFolding.Add(this.panelPrice);
			panelsFolding.Add(this.panelVolume);
			
			this.panelPrice.Initialize(this);
			this.panelVolume.Initialize(this);

			if (base.DesignMode == false) return;
			//this.chartRenderer.Initialize(this);
			BarScaleInterval chartShouldntCare = new BarScaleInterval(BarScale.Minute, 5);
			//REFLECTION_FAILS_FOR_DESIGNER BarsBasic.GenerateRandom(chartShouldntCare)
			//this.Initialize(BarsBasic.GenerateRandom(chartShouldntCare));
			Bars generated = new Bars("RANDOM", chartShouldntCare, "test-ChartControl-DesignMode");
			generated.GenerateAppend();
			this.Initialize(generated);
		}
Example #2
0
        public ChartControl()
        {
            this.ChartSettings         = new ChartSettings();     // was a component, used at InitializeComponent() (to draw SampleBars)
            this.ScriptExecutorObjects = new ScriptExecutorObjects();
            InitializeComponent();
            //if (this.ChartSettings == null)

            this.AutoScroll = false;
            //this.HScroll = true;
            this.hScrollBar.SmallChange = this.ChartSettings.ScrollNBarsPerOneKeyPress;

            panelsFolding = new List <PanelNamedFolding>();
            panelsFolding.Add(this.panelPrice);
            panelsFolding.Add(this.panelVolume);

            this.panelPrice.Initialize(this);
            this.panelVolume.Initialize(this);

            if (base.DesignMode == false)
            {
                return;
            }
            //this.chartRenderer.Initialize(this);
            BarScaleInterval chartShouldntCare = new BarScaleInterval(BarScale.Minute, 5);
            //REFLECTION_FAILS_FOR_DESIGNER BarsBasic.GenerateRandom(chartShouldntCare)
            //this.Initialize(BarsBasic.GenerateRandom(chartShouldntCare));
            Bars generated = new Bars("RANDOM", chartShouldntCare, "test-ChartControl-DesignMode");

            generated.GenerateAppend();
            this.Initialize(generated);
        }