コード例 #1
0
        private void InitializeParameterControlTabs()
        {
            tabParameterControl = new TabControl();
            tbpRiskManager      = new TabPage();
            tbpStrategyManager  = new TabPage();
            tbpStrategy         = new TabPage();

            //
            // tabParameterControl
            //
            tabParameterControl.Name = "tabParameterControl";
            tabParameterControl.Size = new Size(400, 600);
            tabParameterControl.SelectedIndexChanged += (s, e) =>
            {
                SuspendLayout();
                DrawTabPage();
                ResumeLayout();
            };

            //
            // Risk Manager Tab Page
            //
            tbpRiskManager.Name = "tbpRiskManager";
            tbpRiskManager.Text = "Risk Manager";

            //
            // Strategy Manager Tab Page
            //
            tbpStrategyManager.Name = "tbpStrategyManager";
            tbpStrategyManager.Text = "Strategy Manager";

            //
            // Active Strategy Tab Page
            //
            tbpStrategy.Name = "tbpStrategy";
            tbpStrategy.Text = "Strategy";

            //
            // Add and Arrange
            //
            tabParameterControl.TabPages.AddRange(new TabPage[]
            {
                tbpRiskManager,
                tbpStrategyManager,
                tbpStrategy
            });
            tabParameterControl.DockTo(pnlNewSimControls, ControlEdge.Bottom, 10);
            pnlLeft.Controls.Add(tabParameterControl);
        }