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


C# Forms.ToolStripDropDownButton类代码示例

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


ToolStripDropDownButton类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripDropDownButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateButton

 public ToolStripItem CreateButton()
 {
     ToolStripDropDownButton menu = new ToolStripDropDownButton (Label);
     foreach (IUserInterfaceItem item in ChildNodes)
         menu.DropDownItems.Add (item.CreateMenuItem ());
     return menu;
 }
开发者ID:wanglehui,项目名称:mono-addins,代码行数:7,代码来源:MenuExtensionNode.cs

示例2: EditorToolStrip

        public EditorToolStrip()
        {
            var dropDown = new ToolStripDropDownButton();
            dropDown.Text = "Style";
            dropDown.Alignment = ToolStripItemAlignment.Right;
            dropDown.DropDownItems.Add("Default");
            dropDown.DropDownItems.Add("GitHub");

            var items = new ToolStripItem[] {
                dropDown,
                new ToolStripMenuItem("Some Button")
            };

            this._dataSourceMock = new Mock<IEditorToolStripDataSource>();
            this._dataSourceMock.Setup(m => m.NumberOfEditorToolStripItems(It.IsAny<Model.EditorToolStrip>()))
                .Returns(items.Length)
                .Verifiable();

            this._dataSourceMock.Setup(m => m.EditorToolStripItemForIndex(It.IsAny<Model.EditorToolStrip>(), It.IsAny<int>()))
                .Returns<Model.EditorToolStrip, int>((inst, index) =>
                {
                    return items[index];
                })
                .Verifiable();

            this._subject = new Model.EditorToolStrip(this._dataSourceMock.Object, null);
        }
开发者ID:pseudomuto,项目名称:muto-mark,代码行数:27,代码来源:EditorToolStrip.cs

示例3: InitMainMenu

        public void InitMainMenu()
        {
            ToolStripDropDownButton tsddbFile = new ToolStripDropDownButton("操作(&F)");
            this.menuBar.Items.Add(tsddbFile);
            tsmiNew = new ToolStripMenuItem("新窗口(&N)");
            tsddbFile.DropDownItems.Add(tsmiNew);
            tsmiNew.Click += new EventHandler(tsmiNew_Click);
            tsmiClose = new ToolStripMenuItem("关闭(&E)");
            tsddbFile.DropDownItems.Add(tsmiClose);
            tsmiClose.Click += new EventHandler(tsmiClose_Click);

            ToolStripDropDownButton tsddbGragh = new ToolStripDropDownButton("趋势图(&G)");
            this.menuBar.Items.Add(tsddbGragh);
            tsmiDayLine = new ToolStripMenuItem("日K线(&D)");
            tsddbGragh.DropDownItems.Add(tsmiDayLine);
            tsmiDayLine.Click += new EventHandler(tsmiToDayLine);
            tsmiFiveMinsLine = new ToolStripMenuItem("5分钟线(&M)");
            tsddbGragh.DropDownItems.Add(tsmiFiveMinsLine);
            tsmiFiveMinsLine.Click += new EventHandler(tsmiToFiveMinsLine);

            ToolStripDropDownButton tsddbTools = new ToolStripDropDownButton("工具(&T)");
            this.menuBar.Items.Add(tsddbTools);
            tsmiFormulaEditor = new ToolStripMenuItem("公式编辑器(&D)");
            tsddbTools.DropDownItems.Add(tsmiFormulaEditor);
            tsmiFormulaEditor.Click += new EventHandler(tsmiOpenFormulaEditor);
        }
开发者ID:inksmallfrog,项目名称:CSStock,代码行数:26,代码来源:StockForm.cs

示例4: ToolStripDropDownButtonPresentation

 /// <summary>
 /// Initializes a new instance of the 'ToolStripDropDownButtonPresentation' class.
 /// </summary>
 /// <param name="toolStripDropDownButton">ToolStripDropDownButton control.</param>
 public ToolStripDropDownButtonPresentation(ToolStripDropDownButton toolStripDropDownButton)
 {
     mToolStripDropDownButton = toolStripDropDownButton;
     if (mToolStripDropDownButton != null)
     {
         mToolStripDropDownButton.Click += new System.EventHandler(HandleDropDownButtonClick);
     }
 }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:12,代码来源:ToolStripDropDownButtonPresentation.cs

示例5: CreateStatusBarItem

        protected override void CreateStatusBarItem()
        {
            var tempStatusBarItem = new ToolStripDropDownButton();
            tempStatusBarItem.Text = _serialPort.Baud.ToString();
            foreach (var baudRate in BaudRates)
                tempStatusBarItem.DropDownItems.Add(baudRate.ToString());

            tempStatusBarItem.DropDownItemClicked += (sender, args) => SetBaudTo(args.ClickedItem.Text);
            _statusBarItem = tempStatusBarItem;
        }
开发者ID:RJefferys,项目名称:Hypertoken,代码行数:10,代码来源:SerialStatusbarGUI.cs

示例6: TTSFormManager

 public TTSFormManager(System.Windows.Forms.Form mdiparent, System.Windows.Forms.ToolStripDropDownButton workspacedropdown, System.Windows.Forms.ToolStripDropDownButton windowdropdown)
 {
     this.MDIParent = mdiparent;
     this.WorkspaceDropDown = workspacedropdown;
     this.WindowDropDown = windowdropdown;
     this.ClearWindows();
     this.ClearWorkspace();
     this.AddWorkspace(this.CurrentWorkspace, true);
     this.WindowDropDown.Text = "Windows (0)";
 }
开发者ID:jinpan,项目名称:Traders_IAP,代码行数:10,代码来源:TTSFormManager.cs

示例7: InitializeComponent

 private void InitializeComponent()
 {
     ComponentResourceManager manager = new ComponentResourceManager(typeof(PropertyVersionFilterControl));
     this.tsTop = new ToolStrip();
     this.tslField = new ToolStripLabel();
     this.tslPropertyName = new ToolStripLabel();
     this.tslIs = new ToolStripLabel();
     this.tsddValueOperation = new ToolStripDropDownButton();
     this.tsmiOperationEquals = new ToolStripMenuItem();
     this.tsmiOperationNotEquals = new ToolStripMenuItem();
     this.tsmiOperationSmaller = new ToolStripMenuItem();
     this.tsmiOperationLarger = new ToolStripMenuItem();
     this.tstbValue = new ToolStripTextBox();
     this.tsTop.SuspendLayout();
     base.SuspendLayout();
     this.tsTop.BackColor = Color.Transparent;
     manager.ApplyResources(this.tsTop, "tsTop");
     this.tsTop.GripStyle = ToolStripGripStyle.Hidden;
     this.tsTop.Items.AddRange(new ToolStripItem[] { this.tslField, this.tslPropertyName, this.tslIs, this.tsddValueOperation, this.tstbValue });
     this.tsTop.Name = "tsTop";
     this.tslField.Name = "tslField";
     manager.ApplyResources(this.tslField, "tslField");
     this.tslPropertyName.Name = "tslPropertyName";
     manager.ApplyResources(this.tslPropertyName, "tslPropertyName");
     this.tslIs.Name = "tslIs";
     manager.ApplyResources(this.tslIs, "tslIs");
     this.tsddValueOperation.DisplayStyle = ToolStripItemDisplayStyle.Text;
     this.tsddValueOperation.DropDownItems.AddRange(new ToolStripItem[] { this.tsmiOperationEquals, this.tsmiOperationNotEquals, this.tsmiOperationSmaller, this.tsmiOperationLarger });
     this.tsddValueOperation.Name = "tsddValueOperation";
     manager.ApplyResources(this.tsddValueOperation, "tsddValueOperation");
     this.tsmiOperationEquals.Name = "tsmiOperationEquals";
     manager.ApplyResources(this.tsmiOperationEquals, "tsmiOperationEquals");
     this.tsmiOperationEquals.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationNotEquals.Name = "tsmiOperationNotEquals";
     manager.ApplyResources(this.tsmiOperationNotEquals, "tsmiOperationNotEquals");
     this.tsmiOperationNotEquals.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationSmaller.Name = "tsmiOperationSmaller";
     manager.ApplyResources(this.tsmiOperationSmaller, "tsmiOperationSmaller");
     this.tsmiOperationSmaller.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationLarger.Name = "tsmiOperationLarger";
     manager.ApplyResources(this.tsmiOperationLarger, "tsmiOperationLarger");
     this.tsmiOperationLarger.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tstbValue.BorderStyle = BorderStyle.FixedSingle;
     manager.ApplyResources(this.tstbValue, "tstbValue");
     this.tstbValue.Name = "tstbValue";
     this.tstbValue.TextChanged += new EventHandler(this.tstbValue_TextChanged);
     manager.ApplyResources(this, "$this");
     base.AutoScaleMode = AutoScaleMode.Font;
     base.Controls.Add(this.tsTop);
     base.Name = "PropertyVersionFilterControl";
     this.tsTop.ResumeLayout(false);
     this.tsTop.PerformLayout();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:55,代码来源:PropertyVersionFilterControl.cs

示例8: GetClipboardContentTsmi

 public ToolStripMenuItem GetClipboardContentTsmi(ToolStripDropDownButton tsddb, ClipboardContentEnum et)
 {
     foreach (ToolStripMenuItem tsmi in tsddb.DropDownItems)
     {
         if ((ClipboardContentEnum)tsmi.Tag == et)
         {
             return tsmi;
         }
     }
     return new ToolStripMenuItem();
 }
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:11,代码来源:DestSelector.cs

示例9: StreamDetailsControl

        public StreamDetailsControl()
        {
            SuspendLayout();

            _lastWriteTime = new ToolStripLabel();
            _fileSize = new ToolStripLabel();
            _contentType = new ToolStripDropDownButton
            {
                DisplayStyle = ToolStripItemDisplayStyle.Text
            };
            _encoding = new ToolStripLabel();
            _bom = new ToolStripLabel
            {
                Text = "BOM"
            };
            _lineEnding = new ToolStripLabel();

            Items.AddRange(new ToolStripItem[]
            {
                _lastWriteTime,
                _fileSize,
                _contentType,
                _encoding,
                _bom,
                _lineEnding
            });
            Renderer = ToolStripSimpleRenderer.Instance;

            LastWriteTime = null;
            FileSize = null;
            HaveBom = false;
            LineTermination = null;
            Encoding = null;
            ContentType = null;

            ResumeLayout(false);
            PerformLayout();

            foreach (string name in _highlighterNames)
            {
                var item = new ToolStripMenuItem
                {
                    Text = name == _defaultHighlighterName ? Labels.PlainText : name,
                    Tag = name
                };

                item.Click += item_Click;

                _contentType.DropDownItems.Add(item);
            }
        }
开发者ID:netide,项目名称:netide,代码行数:51,代码来源:StreamDetailsControl.cs

示例10: RecentProjectsMenu

 public RecentProjectsMenu() : base(TextHelper.GetString("Label.RecentProjects"))
 {
     ToolbarSelector = new ToolStripDropDownButton();
     ToolbarSelector.Text = TextHelper.GetString("Label.RecentProjects").Replace("&", "");
     ToolbarSelector.DisplayStyle = ToolStripItemDisplayStyle.Image;
     ToolbarSelector.Image = Icons.Project.Img;
     ToolbarSelector.Enabled = false;
     string text = TextHelper.GetString("Label.ClearRecentProjects");
     clearItemMenu = new ToolStripMenuItem(text);
     clearItemMenu.Click += delegate{ ClearAllItems(); };
     clearItemToolbar = new ToolStripMenuItem(text);
     clearItemToolbar.Click += delegate { ClearAllItems(); };
     RebuildList();
 }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:14,代码来源:RecentProjectsMenu.cs

示例11: NuevaBotonDesplegable

 public void NuevaBotonDesplegable(String Nombre, Bitmap Imagen)
 {
     Titulo();
     tsdListaDesplegable = new ToolStripDropDownButton();
     tsdListaDesplegable.Name = Nombre;
     tsdListaDesplegable.Text = "  " + Nombre;
     tsdListaDesplegable.Font = new Font("Century Gothic", 12);
     tsdListaDesplegable.TextAlign = ContentAlignment.MiddleLeft;
     tsdListaDesplegable.Click += new EventHandler(CargarFormulario);
     tsdListaDesplegable.Image = Imagen;
     tsdListaDesplegable.ImageScaling = ToolStripItemImageScaling.None;
     tsdListaDesplegable.ImageAlign = ContentAlignment.MiddleLeft;
     tsdListaDesplegable.ForeColor = Color.LightGray;
     this.MenuAdmin.Items.Add(tsdListaDesplegable);
 }
开发者ID:EbricenterOrg,项目名称:Seguridad,代码行数:15,代码来源:Constructor.cs

示例12: FilterBranchHelper

        public FilterBranchHelper(ToolStripComboBox toolStripBranches, ToolStripDropDownButton toolStripDropDownButton2, RevisionGrid RevisionGrid)
            : this()
        {
            this._NO_TRANSLATE_toolStripBranches = toolStripBranches;
            this._NO_TRANSLATE_toolStripDropDownButton2 = toolStripDropDownButton2;
            this._NO_TRANSLATE_RevisionGrid = RevisionGrid;

            this._NO_TRANSLATE_toolStripDropDownButton2.DropDownItems.AddRange(new ToolStripItem[] {
                this.localToolStripMenuItem,
                this.remoteToolStripMenuItem});

            this._NO_TRANSLATE_toolStripBranches.DropDown += this.toolStripBranches_DropDown;
            this._NO_TRANSLATE_toolStripBranches.TextUpdate += this.toolStripBranches_TextUpdate;
            this._NO_TRANSLATE_toolStripBranches.Leave += this.toolStripBranches_Leave;
            this._NO_TRANSLATE_toolStripBranches.KeyUp += this.toolStripBranches_KeyUp;
        }
开发者ID:Copro,项目名称:gitextensions,代码行数:16,代码来源:FilterBranchHelper.cs

示例13: SetText

        public static void SetText(ToolStripDropDownButton dropdownButton, string text)
        {
            MethodInvoker miSetText = delegate
            {
                dropdownButton.Text = text;
            };

            if (dropdownButton.Owner.InvokeRequired)
            {
                dropdownButton.Owner.Invoke(miSetText);
            }
            else
            {
                miSetText();
            }
        }
开发者ID:NORENBUCH,项目名称:XrmToolBox,代码行数:16,代码来源:ToolStripStatusDelegates.cs

示例14: PathHistoryToolbar

        /// <summary>Initializes a new instance of the <see cref="PathHistoryToolbar"/> class.</summary>
        /// <param name="view">Host history view.</param>
        public PathHistoryToolbar(PathHistoryView view)
        {
            _view = view;

            _view.LogOptionsChanged += OnLogOptionsChanged;

            Items.AddRange(
                new ToolStripItem[]
                {
                    // left-aligned
                    _btnRefresh = new ToolStripButton(Resources.StrRefresh, CachedResources.Bitmaps["ImgRefresh"], OnRefreshButtonClick)
                        {
                            DisplayStyle = ToolStripItemDisplayStyle.Image,
                        },
                    new ToolStripSeparator(),
                    _btnDateOrder = new ToolStripButton(Resources.StrDateOrder, CachedResources.Bitmaps["ImgDateOrder"], OnDateOrderButtonClick)
                        {
                            Checked = _view.LogOptions.Order == RevisionQueryOrder.DateOrder,
                            DisplayStyle = ToolStripItemDisplayStyle.Image,
                        },
                    _btnTopoOrder = new ToolStripButton(Resources.StrTopoOrder, CachedResources.Bitmaps["ImgTopoOrder"], OnTopoOrderButtonClick)
                        {
                            Checked = _view.LogOptions.Order == RevisionQueryOrder.TopoOrder,
                            DisplayStyle = ToolStripItemDisplayStyle.Image,
                        },
                    new ToolStripSeparator(),
                    _btnLimit = new ToolStripDropDownButton(string.Empty, null,
                        new ToolStripItem[]
                        {
                            new ToolStripMenuItem(Resources.StrlUnlimited, null, OnLimitOptionClick) { Tag = 0 },
                            new ToolStripMenuItem( "100 " + Resources.StrlCommits, null, OnLimitOptionClick) { Tag = 100 },
                            new ToolStripMenuItem( "500 " + Resources.StrlCommits, null, OnLimitOptionClick) { Tag = 500 },
                            new ToolStripMenuItem("1000 " + Resources.StrlCommits, null, OnLimitOptionClick) { Tag = 1000 },
                            new ToolStripMenuItem("2000 " + Resources.StrlCommits, null, OnLimitOptionClick) { Tag = 2000 },
                            new ToolStripMenuItem("5000 " + Resources.StrlCommits, null, OnLimitOptionClick) { Tag = 5000 },
                        }),
                    // right-aligned
                    _btnShowDetails = new ToolStripButton(Resources.StrAutoShowDiff, CachedResources.Bitmaps["ImgDiff"], OnShowDetailsButtonClick)
                        {
                            Checked = _view.ShowDetails,
                            DisplayStyle = ToolStripItemDisplayStyle.ImageAndText,
                            Alignment = ToolStripItemAlignment.Right,
                        }
                });
            UpdateLimitButtonText();
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:48,代码来源:PathHistoryToolBar.cs

示例15: FilterBranchHelper

        public FilterBranchHelper(ToolStripComboBox toolStripBranches, ToolStripDropDownButton toolStripDropDownButton2, RevisionGrid RevisionGrid)
            : this()
        {
            this._NO_TRANSLATE_toolStripBranches = toolStripBranches;
            this._NO_TRANSLATE_toolStripDropDownButton2 = toolStripDropDownButton2;
            this._NO_TRANSLATE_RevisionGrid = RevisionGrid;

            this._NO_TRANSLATE_toolStripDropDownButton2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.localToolStripMenuItem,
            this.remoteToolStripMenuItem});

            this._NO_TRANSLATE_toolStripBranches.DropDown += new System.EventHandler(this.toolStripBranches_DropDown);
            this._NO_TRANSLATE_toolStripBranches.TextUpdate += new System.EventHandler(this.toolStripBranches_TextUpdate);
            this._NO_TRANSLATE_toolStripBranches.Leave += new System.EventHandler(this.toolStripBranches_Leave);
            this._NO_TRANSLATE_toolStripBranches.KeyUp += new System.Windows.Forms.KeyEventHandler(this.toolStripBranches_KeyUp);

            InitToolStripBranchFilter();
        }
开发者ID:rschoening,项目名称:gitextensions,代码行数:18,代码来源:RevisionGrid.cs


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