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


C# Forms.ToolStrip类代码示例

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


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

示例1: OnBarUpdate

        protected override void OnBarUpdate()
        {
            if (ChartControl == null || _x )
                return;
            if (!ChartControl.Controls.ContainsKey("TSEco_News"))
            {
                _myitem0 = new ToolStripSeparator();
                _myitem0.Name = "TradingStudiesEcoSeparator";

                _myitem1 = new ToolStripButton("Hide News");
                _myitem1.Text = "Hide News";
                _myitem1.Name = "TradingStudiesEcoNews";
                _myitem1.Click += ToolClick1;
                _myitem1.Enabled = true;
                _myitem1.ForeColor = Color.Black;
                _mystrip = (ToolStrip) ChartControl.Controls["tsrTool"];
                _mystrip.Items.Add(_myitem0);
                _mystrip.Items.Add(_myitem1);

                _sp = new Splitter();
                _sp.Name = "TSEco_Splitter";
                _sp.Dock = _dp == DockingPlace.Below ? DockStyle.Bottom : DockStyle.Top;
                ChartControl.Controls.Add(_sp);

                _so = new EcoNewsControl.EcoNewsControl(Cbi.Core.InstallDir + @"\Sounds", Cbi.Core.UserDataDir + @"bin\Custom\");
                _so.Dock = _dp == DockingPlace.Below ? DockStyle.Bottom : DockStyle.Top;
                _so.Name = "TSEco_News";
                ChartControl.Controls.Add(_so);
            }
            else
                _so = ChartControl.Controls["TSEco_News"] as EcoNewsControl.EcoNewsControl;
            _x = true;
        }
开发者ID:redrhino,项目名称:NinjaTrader.Base,代码行数:33,代码来源:EcoNewsIndicator.cs

示例2: FormBrowseMenus

        public FormBrowseMenus(ToolStrip menuStrip)
        {
            _menuStrip = menuStrip;

            CreateAdditionalMainMenuItems();
            Translate();
        }
开发者ID:vbjay,项目名称:gitextensions,代码行数:7,代码来源:FormBrowseMenus.cs

示例3: ClassBrowserPad

		public ClassBrowserPad()
		{
			instance = this;
			classBrowserTreeView.Dock         = DockStyle.Fill;
			classBrowserTreeView.ImageList    = ClassBrowserIconService.ImageList;
			classBrowserTreeView.AfterSelect += new TreeViewEventHandler(ClassBrowserTreeViewAfterSelect);
			
			contentPanel.Controls.Add(classBrowserTreeView);
			
			searchStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Searchbar");
			searchStrip.Stretch   = true;
			searchStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
			contentPanel.Controls.Add(searchStrip);
			
			toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Toolbar");
			toolStrip.Stretch   = true;
			toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
			contentPanel.Controls.Add(toolStrip);
			
			ProjectService.SolutionLoaded += ProjectServiceSolutionChanged;
			ProjectService.ProjectItemAdded += ProjectServiceSolutionChanged;
			ProjectService.ProjectItemRemoved += ProjectServiceSolutionChanged;
			ProjectService.ProjectAdded += ProjectServiceSolutionChanged; // rebuild view when project is added to solution
			ProjectService.SolutionFolderRemoved += ProjectServiceSolutionChanged; // rebuild view when project is removed from solution
			ProjectService.SolutionClosed += ProjectServiceSolutionClosed;
			
			ParserService.ParseInformationUpdated += new ParseInformationEventHandler(ParserServiceParseInformationUpdated);
			
			AmbienceService.AmbienceChanged += new EventHandler(AmbienceServiceAmbienceChanged);
			if (ProjectService.OpenSolution != null) {
				ProjectServiceSolutionChanged(null, null);
			}
			UpdateToolbars();
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:34,代码来源:ClassBrowser.cs

示例4: oTabAssemblyViewer

 public oTabAssemblyViewer(oTabManager parent, ToolStrip toolStrip, Panel panelMain, ToolStrip mainToolStrip, string tabTitle)
     : base(parent, toolStrip, panelMain, mainToolStrip, tabTitle)
 {
     InitializeComponents();
     panelMain.Controls.Add(this.assemblyViewControl);
     assemblyViewControl.Visible = false;
 }
开发者ID:obarhleam,项目名称:FunctionHacker,代码行数:7,代码来源:oTabAssemblyViewer.cs

示例5: ToolBarHelper

		public ToolBarHelper(ToolStrip parent)
		{
			Host = parent;
			
			//this.AllowsUserCustomization = true;
			//this.DisplayMode = NSToolbarDisplayMode.IconAndLabel;
		}
开发者ID:gabfr,项目名称:MonoMac.Windows.Form,代码行数:7,代码来源:ToolBarHelper.cs

示例6: VisualEnvironmentCompiler

 public VisualEnvironmentCompiler(InvokeDegegate beginInvoke, 
     SetFlagDelegate setCompilingButtonsEnabled, SetFlagDelegate setCompilingDebugEnabled, SetTextDelegate setStateText, 
     SetTextDelegate addTextToCompilerMessages, ToolStripMenuItem pluginsMenuItem, 
     ToolStrip pluginsToolStrip, ExecuteSourceLocationActionDelegate ExecuteSLAction, 
     ExecuteVisualEnvironmentCompilerActionDelegate ExecuteVECAction,
     PascalABCCompiler.Errors.ErrorsStrategyManager ErrorsManager, RunManager RunnerManager, DebugHelper DebugHelper,UserOptions UserOptions,System.Collections.Hashtable StandartDirectories,
     Dictionary<string, CodeFileDocumentControl> OpenDocuments, IWorkbench workbench)
 {
     this.StandartDirectories = StandartDirectories;
     this.ErrorsManager = ErrorsManager;
     this.ChangeVisualEnvironmentState += new ChangeVisualEnvironmentStateDelegate(onChangeVisualEnvironmentState);
     SetCompilingButtonsEnabled = setCompilingButtonsEnabled;
     SetDebugButtonsEnabled = setCompilingDebugEnabled;
     SetStateText = setStateText;
     AddTextToCompilerMessages = addTextToCompilerMessages;
     this.beginInvoke = beginInvoke;
     this.ExecuteSLAction=ExecuteSLAction;
     this.ExecuteVECAction = ExecuteVECAction;
     PluginsMenuItem = pluginsMenuItem;
     PluginsToolStrip = pluginsToolStrip;
     PluginsController = new VisualPascalABCPlugins.PluginsController(this, PluginsMenuItem, PluginsToolStrip, workbench);
     this.RunnerManager = RunnerManager;
     this.DebugHelper = DebugHelper;
     DebugHelper.Starting += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Starting);
     DebugHelper.Exited += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Exited);
     RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Starting);
     RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited);
     this.CodeCompletionParserController = WorkbenchServiceFactory.CodeCompletionParserController;
     this.CodeCompletionParserController.visualEnvironmentCompiler = this;
     this.UserOptions = UserOptions;
     this.OpenDocuments = OpenDocuments;
 }
开发者ID:Slav76,项目名称:pascalabcnet,代码行数:32,代码来源:VisualEnvironmentCompiler.cs

示例7: Workspace

        /// <summary>
        /// The default constructor sets the base controls.
        /// </summary>
        protected Workspace()
        {
            // Graphical measures
            Graphics g = CreateGraphics();
            SizeF sizeString = g.MeasureString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890", Font);
            Data.HorizontalDLU = (sizeString.Width/62)/4;
            Data.VerticalDLU = sizeString.Height/8;
            g.Dispose();

            TsTradeControl = new ToolStrip();
            MainMenuStrip = new MenuStrip();
            PnlWorkspace = new Panel();
            StatusStrip = new StatusStrip();

            // Panel Workspace
            PnlWorkspace.Parent = this;
            PnlWorkspace.Dock = DockStyle.Fill;
            PnlWorkspace.Padding = new Padding(2);
            PnlWorkspace.AllowDrop = true;
            PnlWorkspace.DragEnter += Workspace_DragEnter;
            PnlWorkspace.DragDrop += WorkspaceDragDrop;

            // Tool Strip Trade control
            TsTradeControl.Parent = this;
            TsTradeControl.Dock = DockStyle.Top;

            // Main menu
            MainMenuStrip.Parent = this;
            MainMenuStrip.Dock = DockStyle.Top;

            // Status bar
            StatusStrip.Parent = this;
            StatusStrip.Dock = DockStyle.Bottom;
        }
开发者ID:kalaytan,项目名称:Forex-Strategy-Trader,代码行数:37,代码来源:Workspace.cs

示例8: Initialize

 protected override void Initialize(ToolStrip toolStrip)
 {
     toolStrip.Padding = new Padding(0, 0, 0, 5);
     toolStrip.Width = Width;
     toolStrip.Height = toolStrip.Items.Count * HEIGHT + 5;
     toolStrip.AutoSize = false;
 }
开发者ID:rizwan3d,项目名称:elalang,代码行数:7,代码来源:ToolMenuRenderer.cs

示例9: Initialize

 protected override void Initialize(ToolStrip toolStrip)
 {
     this.toolStrip = toolStrip;
     this.toolStrip.ImageScalingSize = ScaleHelper.Scale(new Size(16, 16));
     this.toolStrip.Paint += this.OnToolStripPaint;
     base.Initialize(toolStrip);
 }
开发者ID:ImaginationSydney,项目名称:flashdevelop,代码行数:7,代码来源:DockPanelStripRenderer.cs

示例10: ToolStripRenderEventArgs

 /// <include file='doc\ToolStripRenderEventArgs.uex' path='docs/doc[@for="ToolStripRenderEventArgs.ToolStripRenderEventArgs"]/*' />
 /// <devdoc>
 ///  This class represents all the information to render the toolStrip
 /// </devdoc>        
 public ToolStripRenderEventArgs(Graphics g, ToolStrip toolStrip) {
     this.toolStrip = toolStrip;
     this.graphics = g;
     this.affectedBounds = new Rectangle(Point.Empty, toolStrip.Size);
    
    
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:ToolStripRenderEventArgs.cs

示例11: StringEditor

        public StringEditor()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StringEditor));
            txtText = new TextBox();
            txtText.Top = 5;
            txtText.Left = 50;
            txtText.Width = 140;
            txtText.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top|AnchorStyles.Right;
            txtText.TextChanged += TxtText_TextChanged;
            Controls.Add(txtText);

            ToolStrip tlsInsert = new ToolStrip();
            insertButton = new ToolStripButton();

            insertButton.Click += InsertButton_Click;

            insertButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
            insertButton.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image")));
            insertButton.ImageTransparentColor = System.Drawing.Color.Magenta;
            insertButton.Size = new System.Drawing.Size(32, 22);

            tlsInsert.Dock = DockStyle.None;
            tlsInsert.Items.Add(insertButton);
            tlsInsert.Location = new System.Drawing.Point(0, 2);

            Controls.Add(tlsInsert);
        }
开发者ID:jakakordez,项目名称:Eternal,代码行数:27,代码来源:StringEditor.cs

示例12: SetupMaster

        public SetupMaster()
        {
            InitializeComponent();
            this.FormBorderStyle = FormBorderStyle.None;

            var toolStrip = new ToolStrip();
            toolStrip.Dock = DockStyle.Fill;
            tableLayoutPanel1.Controls.Add(toolStrip);
            tableLayoutPanel1.SetCellPosition(toolStrip, new TableLayoutPanelCellPosition(0, 0));
            tableLayoutPanel1.SetColumnSpan(toolStrip, 3);

            //---Add list Menu
            //---Setting
            listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.SetupEmployee });
            listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.SetupRole });
            listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.AssignEmployeeRole });
            listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.SystemConfiguration });

            //---SO
            listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Sold, MenuName = ProgramName.MappingMenu });

            //---IN
            listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Inventory, MenuName = ProgramName.SetupBillOfMaterial });

            btnManage_Click(btnSetting, null);
            btnSetting.Focus();
        }
开发者ID:hpbaotho,项目名称:pos-project-th,代码行数:27,代码来源:SetupMaster.cs

示例13: ToolStripRenderEventArgs

		public ToolStripRenderEventArgs (Graphics g, ToolStrip toolStrip, Rectangle affectedBounds, Color backColor)
		{
			this.graphics = g;
			this.tool_strip = toolStrip;
			this.affected_bounds = affectedBounds;
			this.back_color = backColor;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:ToolStripRenderEventArgs.cs

示例14: MainForm

        public MainForm()
        {
            InitializeComponent();
            _treeViewHandler = new TreeViewHandler(treeView1, treeMenu);

            TabControl = tabControl1;
            ListAnalysis = listAnalysis;
            ListAnalysis.Columns[0].Width = -1;
            LblAnalysis = lblAnalysis;

            DgBody = dgBody;
            DgVariables = dgVariables;
            RtbILSpy = rtbILSpy;

            TreeView = treeView1;
            ToolStrip = toolStrip1;

            InstructionMenuStrip = instructionMenu;
            VariableMenu = variableMenu;
            ExceptionHandlerMenu = exceptionHandlerMenu;

            TreeMenuStrip = treeMenu;
            txtMagicRegex.Text = Settings.Default.MagicRegex;

            InitializeBody();

            cbSearchType.SelectedIndex = 0;
        }
开发者ID:AssassinUKG,项目名称:dnEditor,代码行数:28,代码来源:MainForm.cs

示例15: ToolStripOptionsToolbarSection

        public ToolStripOptionsToolbarSection(ListControl listControl)
            : base(listControl)
        {
            _listControl = listControl;

            _toolStrip = new ToolStrip();
            _toolStrip.AutoSize = true;
            _toolStrip.Visible = false;
            _toolStrip.Anchor = AnchorStyles.None;
            _toolStrip.Dock = DockStyle.None;
            _toolStrip.GripStyle = ToolStripGripStyle.Hidden;
            _toolStrip.TabIndex = 0;
            _toolStrip.Text = "List options";
            _toolStrip.CanOverflow = true;
            _toolStrip.Renderer = new MyRenderer();
            _toolStrip.BackColor = Color.Transparent;
            _toolStrip.Layout += _toolStrip_Layout;
            AddDefaultToolStripButtons();
            _toolStrip.CreateControl();

            listControl.Controls.Add(_toolStrip);

            listControl.Columns.GroupedItems.DataChanged += GroupedItems_DataChanged;
            HandleEnablingGroupButtons();
        }
开发者ID:CecleCW,项目名称:ProductMan,代码行数:25,代码来源:OptionsToolbarSection.cs


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