当前位置: 首页>>代码示例>>C#>>正文


C# VScrollBar.Select方法代码示例

本文整理汇总了C#中System.Windows.Forms.VScrollBar.Select方法的典型用法代码示例。如果您正苦于以下问题:C# VScrollBar.Select方法的具体用法?C# VScrollBar.Select怎么用?C# VScrollBar.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.VScrollBar的用法示例。


在下文中一共展示了VScrollBar.Select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IndicatorsLayout

        /// <summary>
        ///     Constructor
        /// </summary>
        public IndicatorsLayout()
        {
            bannedEntryFilterIndicators = new List<string>();
            bannedEntryIndicators = new List<string>();
            bannedExitFilterIndicators = new List<string>();
            bannedExitIndicators = new List<string>();

            tsIndLayout = new ToolStrip();
            layoutBase = new Panel();
            flowLayoutIndicators = new FlowLayoutPanel();
            vScrollBar = new VScrollBar();
            cbxIndicatorSlot = new ToolStripComboBox();

            tsIndLayout.CanOverflow = false;

            cbxIndicatorSlot.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxIndicatorSlot.AutoSize = false;
            var items = new[]
                {
                    Language.T("Opening Point of the Position"),
                    Language.T("Opening Logic Condition"),
                    Language.T("Closing Point of the Position"),
                    Language.T("Closing Logic Condition")
                };
            foreach (string item in items)
                cbxIndicatorSlot.Items.Add(item);
            cbxIndicatorSlot.SelectedIndex = 0;
            cbxIndicatorSlot.SelectedIndexChanged += CbxIndicatorSlotSelectedIndexChanged;

            tsbtnSelectAll = new ToolStripButton
                {
                    Name = "tsbtnSelectAll",
                    DisplayStyle = ToolStripItemDisplayStyle.Image,
                    Image = Resources.optimizer_select_all,
                    ToolTipText = Language.T("Allow all indicators."),
                    Alignment = ToolStripItemAlignment.Right
                };
            tsbtnSelectAll.Click += ButtonsClick;

            tsbtnSelectNone = new ToolStripButton
                {
                    Name = "tsbtnSelectNone",
                    DisplayStyle = ToolStripItemDisplayStyle.Image,
                    Image = Resources.optimizer_select_none,
                    ToolTipText = Language.T("Ban all indicators."),
                    Alignment = ToolStripItemAlignment.Right
                };
            tsbtnSelectNone.Click += ButtonsClick;

            tsbtnStatus = new ToolStripButton
                {
                    Name = "tsbtnStatus",
                    Text = Language.T("banned"),
                    Alignment = ToolStripItemAlignment.Right
                };
            tsbtnStatus.Click += ButtonsClick;

            tsIndLayout.Items.Add(cbxIndicatorSlot);
            tsIndLayout.Items.Add(tsbtnStatus);
            tsIndLayout.Items.Add(tsbtnSelectNone);
            tsIndLayout.Items.Add(tsbtnSelectAll);

            // Layout base
            layoutBase.Parent = this;
            layoutBase.Dock = DockStyle.Fill;
            layoutBase.BackColor = LayoutColors.ColorControlBack;
            layoutBase.ForeColor = LayoutColors.ColorControlText;

            // Tool Strip Strategy
            tsIndLayout.Parent = this;
            tsIndLayout.Dock = DockStyle.Top;

            // flowLayoutIndicators
            flowLayoutIndicators.Parent = layoutBase;
            flowLayoutIndicators.AutoScroll = false;
            flowLayoutIndicators.AutoSize = true;
            flowLayoutIndicators.FlowDirection = FlowDirection.TopDown;
            flowLayoutIndicators.BackColor = LayoutColors.ColorControlBack;
            flowLayoutIndicators.ForeColor = LayoutColors.ColorControlText;

            // VScrollBarStrategy
            vScrollBar.Parent = layoutBase;
            vScrollBar.TabStop = true;
            vScrollBar.Scroll += VScrollBarScroll;

            InitBannedIndicators();
            SetStatusButton();
            ArrangeIndicatorsSlots();
            vScrollBar.Select();
        }
开发者ID:jorgealvarado212,项目名称:Forex-Strategy-Builder,代码行数:93,代码来源:IndicatorsLayout.cs

示例2: IndicatorsLayout

        /// <summary>
        /// Constructor
        /// </summary>
        public IndicatorsLayout()
        {
            tsIndLayout = new ToolStrip();
            layoutBase = new Panel();
            flowLayoutIndicators = new FlowLayoutPanel();
            vScrollBar = new VScrollBar();
            cbxIndicatorSlot = new ToolStripComboBox();

            tsIndLayout.CanOverflow = false;

            cbxIndicatorSlot.DropDownStyle = ComboBoxStyle.DropDownList;
            cbxIndicatorSlot.AutoSize = false;
            cbxIndicatorSlot.Items.AddRange(new string[] {
                Language.T("Opening Point of the Position"),
                Language.T("Opening Logic Condition"),
                Language.T("Closing Point of the Position"),
                Language.T("Closing Logic Condition")
            });
            cbxIndicatorSlot.SelectedIndex = 0;
            cbxIndicatorSlot.SelectedIndexChanged += new EventHandler(CbxIndicatorSlot_SelectedIndexChanged);

            tsbtnSelectAll = new ToolStripButton();
            tsbtnSelectAll.Name = "tsbtnSelectAll";
            tsbtnSelectAll.Click       += new EventHandler(Buttons_Click);
            tsbtnSelectAll.DisplayStyle = ToolStripItemDisplayStyle.Image;
            tsbtnSelectAll.Image        = Properties.Resources.optimizer_select_all;
            tsbtnSelectAll.ToolTipText  = Language.T("Allow all indicators.");
            tsbtnSelectAll.Alignment    = ToolStripItemAlignment.Right;

            tsbtnSelectNone = new ToolStripButton();
            tsbtnSelectNone.Name         = "tsbtnSelectNone";
            tsbtnSelectNone.Click       += new EventHandler(Buttons_Click);
            tsbtnSelectNone.DisplayStyle = ToolStripItemDisplayStyle.Image;
            tsbtnSelectNone.Image        = Properties.Resources.optimizer_select_none;
            tsbtnSelectNone.ToolTipText  = Language.T("Bann all indicators.");
            tsbtnSelectNone.Alignment    = ToolStripItemAlignment.Right;

            tsbtnStatus = new ToolStripButton();
            tsbtnStatus.Name      = "tsbtnStatus";
            tsbtnStatus.Text      = Language.T("banned");
            tsbtnStatus.Click    += new EventHandler(Buttons_Click);
            tsbtnStatus.Alignment = ToolStripItemAlignment.Right;

            tsIndLayout.Items.Add(cbxIndicatorSlot);
            tsIndLayout.Items.Add(tsbtnStatus);
            tsIndLayout.Items.Add(tsbtnSelectNone);
            tsIndLayout.Items.Add(tsbtnSelectAll);

            // Layout base
            layoutBase.Parent = this;
            layoutBase.Dock      = DockStyle.Fill;
            layoutBase.BackColor = LayoutColors.ColorControlBack;

            // Tool Strip Strategy
            tsIndLayout.Parent = this;
            tsIndLayout.Dock   = DockStyle.Top;

            // flowLayoutIndicators
            flowLayoutIndicators.Parent = layoutBase;
            flowLayoutIndicators.AutoScroll    = false;
            flowLayoutIndicators.AutoSize      = true;
            flowLayoutIndicators.FlowDirection = FlowDirection.TopDown;
            flowLayoutIndicators.BackColor     = LayoutColors.ColorControlBack;

            // VScrollBarStrategy
            vScrollBar.Parent  = layoutBase;
            vScrollBar.TabStop = true;
            vScrollBar.Scroll += new ScrollEventHandler(VScrollBar_Scroll);

            InitBannedIndicators();
            SetStatusButton();
            ArrangeIndicatorsSlots();
            vScrollBar.Select();
        }
开发者ID:nuggett11,项目名称:Forex-Strategy-Builder,代码行数:77,代码来源:Generator+-+Indicators.cs


注:本文中的System.Windows.Forms.VScrollBar.Select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。