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


C# Forms.ToolStripSeparator类代码示例

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


ToolStripSeparator类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripSeparator类的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: Initialize

        public override bool Initialize( IPluginHost host )
        {
            if ( host == null ) return false;
            m_host = host;

            // Get a reference to the 'Tools' menu item container
            ToolStripItemCollection tsMenu = m_host.MainWindow.ToolsMenu.DropDownItems;

            // Add a separator at the bottom
            m_tsSeparator = new ToolStripSeparator();
            tsMenu.Add( m_tsSeparator );

            // Add menu item 'KeePassCompare'
            m_tsmiMenuItem = new ToolStripMenuItem();
            m_tsmiMenuItem.Text = "KeePassCompare Compare!";
            m_tsmiMenuItem.Click += this.OnMenuCompare;
            tsMenu.Add( m_tsmiMenuItem );

            // Add menu item 'KeePassCompare'
            m_tsmiMenuItem2 = new ToolStripMenuItem();
            m_tsmiMenuItem2.Text = "KeePassCompare Reset Colours";
            m_tsmiMenuItem2.Click += this.OnResetColors;
            tsMenu.Add( m_tsmiMenuItem2 );

            return true;
        }
开发者ID:CestLaGalere,项目名称:KeePassCompare,代码行数:26,代码来源:KeePassCompareExt.cs

示例3: AddRecentFileItem

 public void AddRecentFileItem(string filePath, ToolStripMenuItemBase m_FileMenuItem)
 {
     int num = m_FileMenuItem.DropDownItems.IndexOfKey("HistorySeparator");
     if (num == -1)
     {
         ToolStripSeparator separator = new ToolStripSeparator();
         separator.Name = "HistorySeparator";
         m_FileMenuItem.DropDownItems.Insert(m_FileMenuItem.DropDownItems.Count - 2, separator);
         num = m_FileMenuItem.DropDownItems.Count - 3;
     }
     if (m_FileMenuItem.DropDownItems.ContainsKey(filePath.Trim().ToLower()))
     {
         m_FileMenuItem.DropDownItems.RemoveByKey(filePath.Trim().ToLower());
     }
     else if ((m_FileMenuItem.DropDownItems.Count - num) == 8)
     {
         m_FileMenuItem.DropDownItems.RemoveAt(m_FileMenuItem.DropDownItems.Count - 3);
     }
     ToolStripMenuItemBase base2 = new ToolStripMenuItemBase();
     base2.Text = RecentFileUtil.FormatFileName(filePath.Trim());
     base2.Tag = filePath.Trim();
     base2.Name = filePath.Trim().ToLower();
     base2.Click += new EventHandler(this.OpenRecentProject);
     m_FileMenuItem.DropDownItems.Insert(num + 1, base2);
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:25,代码来源:RecentFileUIMrg.cs

示例4: GetExtendedContextMenu

        public ToolStripMenuItem GetExtendedContextMenu()
        {
            #region Context Menu
            base.SpecificContextMenu = new ToolStripMenuItem("Class [" + this.Name + "]");

            ToolStripMenuItem ToolStripMenuItem_DisplayDataTable = new ToolStripMenuItem("Display Data Table");
            ToolStripMenuItem_DisplayDataTable.Click += new System.EventHandler(this.ToolStripMenuItem_DisplayDataTable);
            base.SpecificContextMenu.DropDownItems.Add(ToolStripMenuItem_DisplayDataTable);

            ToolStripMenuItem ToolStripMenuItem_DisplayHistograms = new ToolStripMenuItem("Display Histograms");
            ToolStripMenuItem_DisplayHistograms.Click += new System.EventHandler(this.ToolStripMenuItem_DisplayHistograms);
            base.SpecificContextMenu.DropDownItems.Add(ToolStripMenuItem_DisplayHistograms);

            if (cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptor().IsConnectedToDatabase)
            {
                ToolStripMenuItem ToolStripMenuItem_DisplaySingleCellHistogram = new ToolStripMenuItem("Single Cell Histogram");
                ToolStripMenuItem_DisplaySingleCellHistogram.Click += new System.EventHandler(this.ToolStripMenuItem_DisplaySingleCellHistogram);
                base.SpecificContextMenu.DropDownItems.Add(ToolStripMenuItem_DisplaySingleCellHistogram);
            }

            ToolStripSeparator ToolStripSep = new ToolStripSeparator();
            base.SpecificContextMenu.DropDownItems.Add(ToolStripSep);

            ToolStripMenuItem ToolStripMenuItem_SetAsActivePlate = new ToolStripMenuItem("Set as Active");
            ToolStripMenuItem_SetAsActivePlate.Click += new System.EventHandler(this.ToolStripMenuItem_SetAsActivePlate);
            base.SpecificContextMenu.DropDownItems.Add(ToolStripMenuItem_SetAsActivePlate);
            #endregion
            return base.SpecificContextMenu;
        }
开发者ID:cyrenaique,项目名称:HCSA,代码行数:29,代码来源:cWellClass.cs

示例5: RefeshMenu

        private void RefeshMenu()
        {
            flowLayoutPanel1.Controls.Clear();

            if (!Directory.Exists(filepath)) Directory.CreateDirectory(filepath);

            string[] s1 = Directory.GetFiles(filepath);

            foreach (string str in s1)
            {
                FileInfo fi = new FileInfo(str);
                if (fi.Extension.ToLower() != ".bat") continue;
                MenuItem item = new MenuItem();
                item.Text = fi.Name.Replace(fi.Extension, "");
                item.Tag = fi.FullName;
                contextMenuStrip1.Items.Add(item);
            }

            System.Windows.Forms.ToolStripSeparator tls = new ToolStripSeparator();
            contextMenuStrip1.Items.Add(tls);

            System.Windows.Forms.ToolStripMenuItem itemEdit = new ToolStripMenuItem();
            itemEdit.Text = "Edit";
            contextMenuStrip1.Items.Add(itemEdit);

            System.Windows.Forms.ToolStripMenuItem itemrefsh = new ToolStripMenuItem();
            itemrefsh.Text = "Refsh";
            contextMenuStrip1.Items.Add(itemrefsh);

            System.Windows.Forms.ToolStripMenuItem itemexit = new ToolStripMenuItem();
            itemexit.Text = "Exit";
            contextMenuStrip1.Items.Add(itemexit);
        }
开发者ID:menterleo,项目名称:BatRunner,代码行数:33,代码来源:frmMenuContext.cs

示例6: LoadMenus

        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        public void LoadMenus(string name)
        {
            this.DropDownItems.Clear();

            IList<GridRelatedInfo> list = ADInfoBll.Instance.GetGridRelatedInfo(name);
            if (list == null || list.Count == 0)
            {
                this.Visible = false;
                return;
            }

            foreach (GridRelatedInfo info in list)
            {
                ToolStripItem item;
                if (info.Name.ToUpper() == "SEPARATOR")
                {
                    item = new ToolStripSeparator();
                }
                else
                {
                    item = new ToolStripMenuItem();
                    item.Name = info.Name + "toolStripMenuItem";
                    item.Size = new System.Drawing.Size(172, 22);
                    item.Text = info.Text;
                    item.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
                    item.Tag = info;
                }

                this.DropDownItems.Add(item);
            }

            this.DropDownOpened -= new EventHandler(GridGotoDetailFormToolStripItem_DropDownOpened);
            this.DropDownOpened += new EventHandler(GridGotoDetailFormToolStripItem_DropDownOpened);
        }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:38,代码来源:GridGotoFormToolStripItem.cs

示例7: AddToolStripSeparator

        public ToolStripSeparator AddToolStripSeparator()
        {
            var strip = new ToolStripSeparator();
            Items.Add(strip);

            return strip;
        }
开发者ID:ArsenShnurkov,项目名称:ICSharpCode.TextEditorEx,代码行数:7,代码来源:ContextMenuStripEx.cs

示例8: QuickTextBox

        public QuickTextBox()
        {
            this.SuspendLayout();

            this.Multiline = true;
            this.MaxLength = 640000;
            this.ScrollBars = ScrollBars.Vertical;
            this.Font = new System.Drawing.Font("Tahoma", 8.25F);

            _ContextMenuStrip = new ContextMenuStrip();
            _ToolStripMenuItem = new ToolStripMenuItem("全选(&A)");
            _ToolStripMenuItem.Click += new EventHandler(SelectAllEx);
            _ContextMenuStrip.Items.Add(_ToolStripMenuItem);
            _ToolStripMenuItem = new ToolStripMenuItem("拷贝(&C)");
            _ToolStripMenuItem.Click += new EventHandler(CopyEx);
            _ContextMenuStrip.Items.Add(_ToolStripMenuItem);
            _ToolStripMenuItem = new ToolStripMenuItem("粘贴(&P)");
            _ToolStripMenuItem.Click += new EventHandler(PasteEx);
            _ContextMenuStrip.Items.Add(_ToolStripMenuItem);
            _ToolStripMenuItem = new ToolStripMenuItem("剪切(&T)");
            _ToolStripMenuItem.Click += new EventHandler(CutEx);
            _ContextMenuStrip.Items.Add(_ToolStripMenuItem);
            ToolStripSeparator separator = new ToolStripSeparator();
            _ContextMenuStrip.Items.Add(separator);
            _ToolStripMenuItem = new ToolStripMenuItem("还原(&F)");
            _ToolStripMenuItem.Click += new EventHandler(ClearEx);
            _ContextMenuStrip.Items.Add(_ToolStripMenuItem);
            this.ContextMenuStrip = _ContextMenuStrip;
            this.ResumeLayout(false);
        }
开发者ID:ViniciusConsultor,项目名称:geansoft,代码行数:30,代码来源:QuickTextBox.cs

示例9: InitStatus

        /// <summary> 
        /// 初始化任务栏
        /// </summary>
        private void InitStatus()
        {
            this.stsStatus.SuspendLayout();
            // Timer
            ToolStripStatusLabel tsslblTimer = new ToolStripStatusLabel();
            tsslblTimer.Name = "tsslblTimer";
            tsslblTimer.Text = Utility.GetLongSysDateTimeString();

            ToolStripSeparator tssp1 = new ToolStripSeparator();

            ToolStripStatusLabel tsslblUser = new ToolStripStatusLabel();
            tsslblUser.Name = "tsslblUser";
            tsslblUser.Text = "登录人员:";

            ToolStripSeparator tssp2 = new ToolStripSeparator();

            ToolStripStatusLabel tsslblABName = new ToolStripStatusLabel();
            tsslblABName.Name = "tsslblABName";
            tsslblABName.Text = "当前账本:";

            ToolStripSeparator tssp3 = new ToolStripSeparator();

            ToolStripStatusLabel tsslblIP = new ToolStripStatusLabel();
            tsslblIP.Name = "tsslblIP";
            tsslblIP.Text = "IP:";

            this.stsStatus.Items.AddRange(new ToolStripItem[] { tsslblTimer, tssp1, tsslblUser, tssp2, tsslblABName, tssp3, tsslblIP});

            this.stsStatus.ResumeLayout(false);
            this.stsStatus.PerformLayout();
        }
开发者ID:rogerluo,项目名称:Stror,代码行数:34,代码来源:Mainform.cs

示例10: AddMenuItem

        private ToolStripItem AddMenuItem(string menu, string id, string name, Keys shortcutKeys, string iconKey, bool enabled)
        {
            ToolStripItem[] results = _mainMenu.Items.Find(menu, false);
            if (results.Length == 0)
            {
                throw new AGSEditorException("Menu " + menu + " not found");
            }
            ToolStripMenuItem topMenu = (ToolStripMenuItem)results[0];
            ToolStripItem newItem;

            if (name == MenuCommand.MENU_TEXT_SEPARATOR)
            {
                newItem = new ToolStripSeparator();
            }
            else
            {
                newItem = new ToolStripMenuItem(name, null, _onClick, id);
                ((ToolStripMenuItem)newItem).ShortcutKeys = shortcutKeys;
                if (iconKey != null)
                {
                    newItem.Image = Factory.GUIController.ImageList.Images[iconKey];
                }
				newItem.Enabled = enabled;
            }
            topMenu.DropDownItems.Add(newItem);
			return newItem;
        }
开发者ID:Aquilon96,项目名称:ags,代码行数:27,代码来源:MainMenuManager.cs

示例11: CheckBuiltInContextMenu

        /// <summary>
        /// Assigns the ContextMenuStrip control to the HexBox control.
        /// </summary>
        void CheckBuiltInContextMenu()
        {
            if (Util.DesignMode)
                return;

            if (this._contextMenuStrip == null)
            {
                ContextMenuStrip cms = new ContextMenuStrip();
                _cutToolStripMenuItem = new ToolStripMenuItem(CutMenuItemTextInternal, CutMenuItemImage, new EventHandler(CutMenuItem_Click));
                cms.Items.Add(_cutToolStripMenuItem);
                _copyToolStripMenuItem = new ToolStripMenuItem(CopyMenuItemTextInternal, CopyMenuItemImage, new EventHandler(CopyMenuItem_Click));
                cms.Items.Add(_copyToolStripMenuItem);
                _pasteToolStripMenuItem = new ToolStripMenuItem(PasteMenuItemTextInternal, PasteMenuItemImage, new EventHandler(PasteMenuItem_Click));
                cms.Items.Add(_pasteToolStripMenuItem);
                _toolStripSeparator = new ToolStripSeparator();
                cms.Items.Add(_toolStripSeparator);
                _selectAllToolStripMenuItem = new ToolStripMenuItem(SelectAllMenuItemTextInternal, SelectAllMenuItemImage, new EventHandler(SelectAllMenuItem_Click));
                cms.Items.Add(_selectAllToolStripMenuItem);
                cms.Opening += new CancelEventHandler(BuildInContextMenuStrip_Opening);

                _contextMenuStrip = cms;
            }

            if (this._hexBox.ByteProvider == null && this._hexBox.ContextMenuStrip == this._contextMenuStrip)
                this._hexBox.ContextMenuStrip = null;
            else if (this._hexBox.ByteProvider != null && this._hexBox.ContextMenuStrip == null)
                this._hexBox.ContextMenuStrip = _contextMenuStrip;
        }
开发者ID:Diegoisawesome,项目名称:Be.HexEditor,代码行数:31,代码来源:BuiltInContextMenu.cs

示例12: InitializeComponent

 private void InitializeComponent()
 {
     this.menuToolsAntialiasing = new PdnMenuItem();
     this.menuToolsAlphaBlending = new PdnMenuItem();
     this.menuToolsSeperator = new ToolStripSeparator();
     // 
     // ToolsMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
         {
             this.menuToolsAntialiasing,
             this.menuToolsAlphaBlending,
             this.menuToolsSeperator
         });
     this.Name = "Menu.Tools";
     this.Text = PdnResources.GetString("Menu.Tools.Text");
     // 
     // menuToolsAntiAliasing
     // 
     this.menuToolsAntialiasing.Name = "AntiAliasing";
     this.menuToolsAntialiasing.Click += new System.EventHandler(MenuToolsAntiAliasing_Click);
     //
     // menuToolsAlphaBlending
     //
     this.menuToolsAlphaBlending.Name = "AlphaBlending";
     this.menuToolsAlphaBlending.Click += new EventHandler(MenuToolsAlphaBlending_Click);
 }
开发者ID:metadeta96,项目名称:openpdn,代码行数:28,代码来源:ToolsMenu.cs

示例13: AttachMenuToTrayIcon

        /// <summary>
        /// Attach the default context menu into tray icon for Win32 Window (for restoring form and exit application)
        /// </summary>
        /// <param name="parent">
        /// The parent.
        /// </param>
        /// <param name="trayIcon">
        /// The tray Icon.
        /// </param>
        /// <param name="showInTaskbarOnRestore">
        /// The show In Taskbar On Restore.
        /// </param>
        internal static void AttachMenuToTrayIcon(Form parent, NotifyIcon trayIcon, bool showInTaskbarOnRestore)
        {
            // Restore window and put it to front
            var restoreWindowHandler = new EventHandler(
                (o, e) =>
                    {
                        parent.Show();
                        parent.ShowInTaskbar = showInTaskbarOnRestore;
                        parent.WindowState = FormWindowState.Normal;
                        NativeMethods.ShowToFront(parent.Handle);
                    });

            var mnuShow = new ToolStripMenuItem("Show Main Window", null, restoreWindowHandler);
            var toolStripSeparator = new ToolStripSeparator();
            var mnuExit = new ToolStripMenuItem("Exit", null, (o, e) => { Environment.Exit(0); });

            var trayIconMenuStrip = new ContextMenuStrip();
            trayIconMenuStrip.Items.Add(mnuShow);
            trayIconMenuStrip.Items.Add(toolStripSeparator);
            trayIconMenuStrip.Items.Add(mnuExit);

            // Attach the handler for double-clicking the tray icon
            trayIcon.DoubleClick -= restoreWindowHandler;
            trayIcon.DoubleClick += restoreWindowHandler;

            // Attach the menu strip to the tray icon
            trayIcon.ContextMenuStrip = trayIconMenuStrip;
        }
开发者ID:tu-tran,项目名称:FareLiz,代码行数:40,代码来源:GUIBuilder.cs

示例14: AddMenuItems

 private void AddMenuItems() {
     var toolsMenu = m_host.MainWindow.ToolsMenu.DropDownItems;
     m_toolsSeparator = new ToolStripSeparator();
     toolsMenu.Add(m_toolsSeparator);
     m_mainPopup = new ToolStripMenuItem();
     m_mainPopup.Text = "KeePassQiniu";
     toolsMenu.Add(m_mainPopup);
     m_uploadToolItem = new ToolStripMenuItem();
     m_uploadToolItem.Text = "立即上传";
     m_uploadToolItem.Click += OnMenuBackupNow;
     m_uploadToolItem.Enabled = false;
     m_mainPopup.DropDownItems.Add(m_uploadToolItem);
     m_downToolItem = new ToolStripMenuItem();
     m_downToolItem.Text = "立即下载";
     m_downToolItem.Click += OnMenuDown;
     m_downToolItem.Enabled = true;
     m_mainPopup.DropDownItems.Add(m_downToolItem);
     m_toolsSeparator = new ToolStripSeparator();
     m_mainPopup.DropDownItems.Add(m_toolsSeparator);
     var autoBackup = new ToolStripMenuItem();
     autoBackup.Text = "自动同步";
     autoBackup.Checked = KeePassQiniuConfig.Default.AutoSync;
     autoBackup.Click += OnMenuAutomaticBackup;
     autoBackup.Enabled = true;
     m_mainPopup.DropDownItems.Add(autoBackup);
     var configure = new ToolStripMenuItem();
     configure.Text = "配置...";
     configure.Click += OnMenuConfig;
     configure.Enabled = true;
     m_mainPopup.DropDownItems.Add(configure);
 }
开发者ID:Hxs1990,项目名称:KeePassQiniu,代码行数:31,代码来源:KeePassQiniuExt.cs

示例15: GenerateMenu

    /// <summary>
    /// Création et immersion des éléments de menu
    /// </summary>
    private void GenerateMenu() {
      if ( !Registry.Has( MainKeys.KeyMainMenu ) ) return;

      ToolStripMenuItem itemReport = new ToolStripMenuItem( "Etat du gestionnaire des plugins dynamiques", global::Psl.Properties.Resources.IconProperties, itemReport_OnClick );
      itemReport.MergeAction = MergeAction.Insert;
      itemReport.MergeIndex = 9000;
      itemReport.ImageTransparentColor = System.Drawing.Color.Magenta;

      ToolStripSeparator itemReportSep = new ToolStripSeparator();
      itemReportSep.MergeAction = MergeAction.Insert;
      itemReportSep.MergeIndex = 9000;

      ToolStripMenuItem itemAbout = new ToolStripMenuItem( "A propos du gestionnaire des plugins dynamiques", global::Psl.Properties.Resources.IconAbout, itemAbout_OnClick );
      itemAbout.MergeAction = MergeAction.Insert;
      itemAbout.MergeIndex = 9000;
      itemAbout.ImageTransparentColor = System.Drawing.Color.Magenta;

      ToolStripMenuItem itemHelpAbout = new ToolStripMenuItem( "A propos..." );
      itemHelpAbout.MergeAction = MergeAction.MatchOnly;
      itemHelpAbout.MergeIndex = 1;
      itemHelpAbout.DropDownItems.Add( itemAbout );

      ToolStripMenuItem menuHelp = new ToolStripMenuItem( "&?" );
      menuHelp.MergeAction = MergeAction.MatchOnly;
      menuHelp.MergeIndex = 9999;
      menuHelp.DropDownItems.Add( itemHelpAbout );
      menuHelp.DropDownItems.Add( itemReportSep );
      menuHelp.DropDownItems.Add( itemReport    );

      MenuStrip mainMenu = new MenuStrip();
      mainMenu.Items.Add( menuHelp );

      Registry.MergeInMainMenu( mainMenu );
    }
开发者ID:NicolasR,项目名称:Composants,代码行数:37,代码来源:PluginManagerInternalMenu.cs


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