當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。