• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.ToolStrip类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: CreatePanStatus_v2

        private void CreatePanStatus_v2()
        {
            ToolStrip toolStrip1 = new ToolStrip();
            //ToolStripTextBox toolStripTextBox1 = new ToolStripTextBox();

            //ToolStripButton button = new ToolStripButton();
            //button.Text = "result 1";
            //button.Click += ToolStripButton1_Click;
            //toolStrip1.Items.Add(button);
            //ToolStripButton toolStripButton2 = new ToolStripButton();
            //toolStripButton2.Text = "result 2";
            //toolStripButton2.Click += ToolStripButton2_Click;
            //toolStrip1.Items.Add(toolStripButton2);

            toolStrip1.Items.Add(CreateToolStripButton("result 1", (sender, eventArgs) => ActivePanResult(1)));
            toolStrip1.Items.Add(CreateToolStripButton("result 2", (sender, eventArgs) => ActivePanResult(2)));
            toolStrip1.Items.Add(CreateToolStripButton("result 3", (sender, eventArgs) => ActivePanResult(3)));
            toolStrip1.Items.Add(CreateToolStripButton("result 4", (sender, eventArgs) => ActivePanResult(4)));
            toolStrip1.Items.Add(CreateToolStripButton("messages", (sender, eventArgs) => ActivePanResult(5)));

            pan_status_v2 = new Panel();
            pan_status_v2.Size = new Size(0, 20);
            pan_status_v2.BackColor = Color.DarkGreen;
            pan_status_v2.Dock = DockStyle.Bottom;
            pan_status_v2.Controls.Add(toolStrip1);

        }
开发者ID:labeuze,项目名称:source,代码行数:27,代码来源:RunSourceStatus.cs


示例17: ChangeSelection

 private static bool ChangeSelection(ToolStrip start, ToolStrip toolStrip)
 {
     if ((toolStrip == null) || (start == null))
     {
         return false;
     }
     if (start == toolStrip)
     {
         return false;
     }
     if (ModalMenuFilter.InMenuMode)
     {
         if (ModalMenuFilter.GetActiveToolStrip() == start)
         {
             ModalMenuFilter.RemoveActiveToolStrip(start);
             start.NotifySelectionChange(null);
         }
         ModalMenuFilter.SetActiveToolStrip(toolStrip);
     }
     else
     {
         toolStrip.FocusInternal();
     }
     start.SnapFocusChange(toolStrip);
     toolStrip.SelectNextToolStripItem(null, toolStrip.RightToLeft != RightToLeft.Yes);
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:ToolStripManager.cs


示例18: GetEnableVS2012Style

        public bool GetEnableVS2012Style(ToolStrip strip)
        {
            if (strips.ContainsKey(strip))
                return strips[strip].EnableVS2012Style;

            return false;
        }
开发者ID:Jeidai,项目名称:VisualSAIStudio,代码行数:7,代码来源:VS2012ToolStripExtender.cs


示例19: usbDevice

        public usbDevice(string letter,List<Drive> drives,string serial)
        {

            InitializeComponent();
            this.serial = serial;
            this.drives = drives;
            this.letter = letter;
            syncdetails = new List<string[]>();
           // this.usbserial = usbserial;
            this.Load += (s, a) =>
                             {
                                 this.ContextMenuStrip = contextMenuStrip1;
                frm = this.FindForm();
               
              lb = (ListView) frm.Controls.Find("listView1", true)[0];

              ts = (ToolStrip)frm.Controls.Find("toolStrip1", true)[0];
              lblSyncType = (ToolStripLabel)ts.Items.Find("lblSyncType", true)[0];
                panel1=(Panel)frm.Controls.Find("panel1",true)[0];
                label3 = (Label)frm.Controls.Find("label3", true)[0];
                label2 = (Label)frm.Controls.Find("label2", true)[0];
               // regBtn = (Button)frm.Controls.Find("btnRegister", true)[0];
                treeview = (TreeView)frm.Controls.Find("treeView1", true)[0];
                string lt = letter.Substring(0, 1);
                serial = DriveInformation.getSerial(lt + ":\\"); //USB.FindDriveLetter(lt + ":").SerialNumber;
                //Thread secondaryThread=new Thread(new ThreadStart(getDeviceData));
                //secondaryThread.Start();

                LoadDevice();
            };
        }
开发者ID:iogbonna,项目名称:smartsync,代码行数:31,代码来源:usbDevice.cs


示例20: PropagateStateRecursive

        private void PropagateStateRecursive(ToolStrip strip)
        {
            if (strip == null) return;

            var anyEnabled = ActualItems(strip.Items).Any(SelfEnabled);
            strip.Enabled = anyEnabled;
        }
开发者ID:xeno-by,项目名称:datavault,代码行数:7,代码来源:CommandMapping.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ToolStripArrowRenderEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Forms.ToolBarButtonClickEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap