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