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

C# Forms.Ribbon类代码示例

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

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



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

示例1: Init

        public void Init(HashTableSettings gSettings, Ribbon mainRibbon)
        {
            ribbon = mainRibbon;

            devSettings = (bool)gSettings["DeveloperMode"];

            appDir = Application.StartupPath + "\\";
            globalSettings = gSettings;

            // load recent files
            if (File.Exists(appDir + "recentFiles.xml"))
            {
                recentFiles = RecentFiles.LoadFromFile(appDir + "recentFiles.xml");
                recentFiles.ClearDeadEntires();
            }
            else
                recentFiles = new RecentFiles();

            RebuildRecentFilesMenu();

            baseDir = /*(string)gSettings["Base.Path"];*/Path.GetFullPath(ConfigurationManager.AppSettings[(devSettings ? "[email protected]" : "") + "Base.Path.Relative"].Replace("%STARTUP%", Application.StartupPath));
            if (!Directory.Exists(baseDir))
                throw new ApplicationException("Base directory does not exist! : " + baseDir);

            cdi = ICommonDeviceInterface.NewInterface((byte)globalSettings["CDI.Adapter"], baseDir);
            cdi.ResourceLoader.RegisterContentLoader(new LayerContentLoader());
            cdi.ResourceLoader.RegisterContentLoader(new BooScriptContentLoader());

            ShowHideGroups(false);
        }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:30,代码来源:MdiWindow.cs


示例2: RibbonTabGlyph

 public RibbonTabGlyph(BehaviorService behaviorService, RibbonDesigner designer, Ribbon ribbon)
    : base(new RibbonTabGlyphBehavior(designer, ribbon))
 {
    _behaviorService = behaviorService;
    _componentDesigner = designer;
    _ribbon = ribbon;
 }
开发者ID:shintadono,项目名称:System.Windows.Forms.Ribbon,代码行数:7,代码来源:RibbonTabGlyph.cs


示例3: RibbonQuickAccessToolbarGlyph

 public RibbonQuickAccessToolbarGlyph(BehaviorService behaviorService, RibbonDesigner designer, Ribbon ribbon)
     : base(new RibbonQuickAccessGlyphBehavior(designer, ribbon))
 {
     _behaviorService = behaviorService;
     _componentDesigner = designer;
     _ribbon = ribbon;
 }
开发者ID:daywrite,项目名称:EApp,代码行数:7,代码来源:RibbonQuickAccessToolbarGlyph.cs


示例4: RibbonDropDown

 internal RibbonDropDown(
     RibbonItem parentItem,
     IEnumerable<RibbonItem> items,
     Ribbon ownerRibbon)
     : this(parentItem, items, ownerRibbon, RibbonElementSizeMode.DropDown)
 {
 }
开发者ID:okyereadugyamfi,项目名称:softlogik,代码行数:7,代码来源:RibbonDropDown.cs


示例5: RibbonOrbDropDown

		internal RibbonOrbDropDown(Ribbon ribbon)
			: base()
		{
			DoubleBuffered = true;
			_ribbon = ribbon;
			_menuItems = new RibbonItemCollection();
			_recentItems = new RibbonItemCollection();
			_optionItems = new RibbonItemCollection();

			_menuItems.SetOwner(Ribbon);
			_recentItems.SetOwner(Ribbon);
			_optionItems.SetOwner(Ribbon);

			_optionsPadding = 6;
			Size = new System.Drawing.Size(527, 447);
			BorderRoundness = 8;

         AutoSizeContentButtons = DefaultAutoSizeContentButtons;
         ContentButtonsMinWidth = DefaultContentButtonsMinWidth;
         ContentRecentItemsMinWidth = DefaultContentRecentItemsMinWidth;

			//if (!(Site != null && Site.DesignMode))
			//{
			//   _keyboardHook = new GlobalHook(GlobalHook.HookTypes.Keyboard);
			//   _keyboardHook.KeyUp += new KeyEventHandler(_keyboardHook_KeyUp);
			//}
		}
开发者ID:samuraitruong,项目名称:comitdownloader,代码行数:27,代码来源:RibbonOrbDropDown.cs


示例6: RibbonMouseSensor

 /// <summary>
 /// Creates a new Sensor for specified objects
 /// </summary>
 /// <param name="control">Control to listen mouse events</param>
 /// <param name="ribbon">Ribbon that will be affected</param>
 /// <param name="tabs">Tabs that will be sensed</param>
 /// <param name="panels">Panels that will be sensed</param>
 /// <param name="items">Items that will be sensed</param>
 public RibbonMouseSensor(Control control, Ribbon ribbon, IEnumerable<RibbonTab> tabs, IEnumerable<RibbonPanel> panels, IEnumerable<RibbonItem> items)
     : this(control, ribbon)
 {
     if (tabs != null) Tabs.AddRange(tabs);
     if (panels != null) Panels.AddRange(panels);
     if (items != null) Items.AddRange(items);
 }
开发者ID:KeizouToyoda,项目名称:RibbonControl,代码行数:15,代码来源:RibbonMouseSensor.cs


示例7: FindRibbonItem

        /// <summary>
        /// Find Ribbon Item
        /// </summary>
        /// <param name="ribbon">express Ribbon</param>
        /// <param name="ribbonTabText">express Ribbon Tab Text</param>
        /// <param name="ribbonItemName">express Ribbon Item Name</param>
        /// <returns>RibbonItem</returns>
        public static RibbonItem FindRibbonItem(Ribbon ribbon, string ribbonTabText, string ribbonItemName)
        {
            if (ribbon == null ||
                ribbon.Tabs == null ||
                ribbon.Tabs.Count.Equals(0) ||
                string.IsNullOrEmpty(ribbonTabText) ||
                string.IsNullOrEmpty(ribbonItemName))
            {
                return null;
            }

            foreach (RibbonTab tab in ribbon.Tabs)
            {
                if (ribbonTabText.Trim().Equals(tab.Text.Trim()))
                {
                    foreach (RibbonPanel panel in tab.Panels)
                    {
                        foreach (RibbonItem item in panel.Items)
                        {
                            if (ribbonItemName.Equals(item.Name))
                            {
                                return item;
                            }
                        }
                    }
                }
            }

            return null;
        }
开发者ID:daywrite,项目名称:EApp,代码行数:37,代码来源:RibbonHelper.cs


示例8: RibbonTextEventArgs

 public RibbonTextEventArgs(Ribbon owner, Graphics g, Rectangle clip, RibbonItem item, Rectangle bounds, string text, StringFormat format)
     : base(owner, g, clip, item, bounds)
 {
     Text = text;
     Style = FontStyle.Regular;
     Format = format;
     Color = Color.Empty;
 }
开发者ID:iraychen,项目名称:OfficeRibbon,代码行数:8,代码来源:RibbonTextEventArgs.cs


示例9: RibbonCanvasEventArgs

 public RibbonCanvasEventArgs(
     Ribbon owner, Graphics g, Rectangle bounds, Control canvas, object relatedObject
     )
 {
     Owner = owner;
     Graphics = g;
     Bounds = bounds;
     Canvas = canvas;
     RelatedObject = relatedObject;
 }
开发者ID:taozhengbo,项目名称:sdrsharp_experimental,代码行数:10,代码来源:RibbonCanvasEventArgs.cs


示例10: RibbonToolTipRenderEventArgs

		public RibbonToolTipRenderEventArgs(Ribbon owner, Graphics g, Rectangle clip, string Text, Image tipImage, Color color, FontStyle style, StringFormat format, Font font)
			: base(owner, g, clip)
		{
			_text = Text;
			_color = Color;
			_style = style;
			_format = format;
			_image = tipImage;
			_font = font;
		}
开发者ID:iraychen,项目名称:OfficeRibbon,代码行数:10,代码来源:RibbonToolTipRenderEventArgs.cs


示例11: RibbonMouseSensor

        /// <summary>
        /// Creates a new Sensor for the specified RibbonTab
        /// </summary>
        /// <param name="control">Control to listen to mouse events</param>
        /// <param name="ribbon">Ribbon that will be affected</param>
        /// <param name="tab">Tab that will be sensed, from which all panels and items will be extracted to sensing also.</param>
        public RibbonMouseSensor(Control control, Ribbon ribbon, RibbonTab tab)
            : this(control, ribbon)
        {
            Tabs.Add(tab);
            Panels.AddRange(tab.Panels);

            foreach (RibbonPanel panel in tab.Panels)
            {
                Items.AddRange(panel.Items);
            }
        }
开发者ID:taozhengbo,项目名称:sdrsharp_experimental,代码行数:17,代码来源:RibbonMouseSensor.cs


示例12: RibbonSensor

        public RibbonSensor(Control control, Ribbon ribbon, RibbonTab tabToSense)
        {
            _ribbon = ribbon;
            _control = control;
            _tab = tabToSense;

            _control.MouseMove += new MouseEventHandler(_control_MouseMove);
            _control.MouseDown += new MouseEventHandler(_control_MouseDown);
            _control.MouseUp += new MouseEventHandler(_control_MouseUp);
            _control.MouseLeave += new EventHandler(_control_MouseLeave);
        }
开发者ID:okyereadugyamfi,项目名称:softlogik,代码行数:11,代码来源:RibbonSensor.cs


示例13: RibbonQuickAccessToolbar

        internal RibbonQuickAccessToolbar(Ribbon ownerRibbon)
        {
            if (ownerRibbon == null) throw new ArgumentNullException("ownerRibbon");

             SetOwner(ownerRibbon);

             _dropDownButton = new RibbonButton();
             _dropDownButton.SetOwner(ownerRibbon);
             _dropDownButton.SmallImage = CreateDropDownButtonImage();

             _margin = new Padding(9);
             _padding = new Padding(3, 0, 0, 0);
             _items = new RibbonQuickAccessToolbarItemCollection(this);
             _sensor = new RibbonMouseSensor(ownerRibbon, ownerRibbon, Items);
             _DropDownButtonVisible = true;
        }
开发者ID:JamesMasterman,项目名称:SeaScan,代码行数:16,代码来源:RibbonQuickAccessToolbar.cs


示例14: RibbonOrbDropDown

        internal RibbonOrbDropDown(Ribbon ribbon)
            : base()
        {
            DoubleBuffered = true;
            _ribbon = ribbon;
            _menuItems = new RibbonItemCollection();
            _recentItems = new RibbonItemCollection();
            _optionItems = new RibbonItemCollection();

            _menuItems.SetOwner(Ribbon);
            _recentItems.SetOwner(Ribbon);
            _optionItems.SetOwner(Ribbon);

            _optionsPadding = 6;
            Size = new System.Drawing.Size(527, 447);
            BorderRoundness = 8;
        }
开发者ID:daywrite,项目名称:EApp,代码行数:17,代码来源:RibbonOrbDropDown.cs


示例15: AddRibbonButton

        public static void AddRibbonButton(Ribbon ribbon, 
                                           string tabText, 
                                           string buttonName,
                                           string text, 
                                           Image image, 
                                           string tooltip, 
                                           bool enable, 
                                           bool isChecked,
                                           RibbonButtonAlignment alignment,
                                           EventHandler clickHandler)
        {
            if (ribbon == null)
            {
                return;
            }

            RibbonItem ribbonItem = null;

            if (RibbonModulePluginProvider.Ribbon_Separator.Equals(buttonName))
            {
                ribbonItem = new RibbonSeparator();
            }
            else
            {
                ribbonItem = new RibbonButton();
                ribbonItem.Text = text;
                ribbonItem.Image = image;
                ribbonItem.ToolTip = tooltip;
                ribbonItem.Enabled = enable;
                ribbonItem.Checked = isChecked;
                ribbonItem.Click += new EventHandler(clickHandler);
            }

            ribbonItem.Name = buttonName;

            RibbonTab ribbonTab = RibbonHelper.FindRibbonTab(ribbon, tabText);

            if (ribbonTab == null)
            {
                return;
            }

            int panelIndex = alignment == RibbonButtonAlignment.Right ? 1 : 0;

            ribbonTab.Panels[panelIndex].Items.Add(ribbonItem);
        }
开发者ID:daywrite,项目名称:EApp,代码行数:46,代码来源:RibbonExtensionHelper.cs


示例16: RibbonDropDown

        internal RibbonDropDown(RibbonItem parentItem, IEnumerable<RibbonItem> items, Ribbon ownerRibbon, RibbonElementSizeMode measuringSize)
            : this()
        {
            _items = items;
            _ownerRibbon = ownerRibbon;
            _sizingGripHeight = 12;
            _parentItem = parentItem;
            _sensor = new RibbonMouseSensor(this, OwnerRibbon, items);
            _MeasuringSize = measuringSize;

            if (Items != null)
                foreach (RibbonItem item in Items)
                {
                    item.SetSizeMode(RibbonElementSizeMode.DropDown);
                    item.SetCanvas(this);
                }

            UpdateSize();
        }
开发者ID:daywrite,项目名称:EApp,代码行数:19,代码来源:RibbonDropDown.cs


示例17: MenuToolPanel

		public MenuToolPanel(MainMDIForm parent)
		{
			mParent = parent;

			Text = "Menu";

			mRibbon = new Ribbon();
			mRibbon.Location = new Point(0, 0);
			mRibbon.Width = this.Width;
			mRibbon.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;

			Controls.Add(mRibbon);

			InitRibbon();

			InitShortcuts();

			UpdateRecentPackFiles();

			Height = mRibbon.Height;
		}
开发者ID:Megamatt01,项目名称:peggle-edit,代码行数:21,代码来源:MenuToolPanel.cs


示例18: CreateItem

        /// <summary>
        /// Creates an item of the specified type and adds it to the specified collection
        /// </summary>
        /// <param name="ribbon"></param>
        /// <param name="collection"></param>
        /// <param name="t"></param>
        protected virtual void CreateItem(Ribbon ribbon, RibbonItemCollection collection, Type t)
        {
            IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost;

            if (host != null && collection != null && ribbon != null)
            {
                DesignerTransaction transaction = host.CreateTransaction("AddRibbonItem_" + Component.Site.Name);

                MemberDescriptor member = TypeDescriptor.GetProperties(Component)["Items"];
                base.RaiseComponentChanging(member);

                RibbonItem item = host.CreateComponent(t) as RibbonItem;

                if (!(item is RibbonSeparator)) item.Text = item.Site.Name;

                collection.Add(item);
                ribbon.OnRegionsChanged();

                base.RaiseComponentChanged(member, null, null);
                transaction.Commit();
            }
        }
开发者ID:KeizouToyoda,项目名称:RibbonControl,代码行数:28,代码来源:RibbonElementWithItemCollectionDesigner.cs


示例19: SetOwner

      internal override void SetOwner(Ribbon owner)
      {
         base.SetOwner(owner);

         _buttons.SetOwner(owner);
         _dropDownItems.SetOwner(owner);
      }
开发者ID:shintadono,项目名称:System.Windows.Forms.Ribbon,代码行数:7,代码来源:RibbonButtonList.cs


示例20: SetOwner

 /// <summary>
 /// Sets the value of the Owner Property
 /// </summary>
 internal void SetOwner(Ribbon owner)
 {
     _owner = owner;
     _tabs.SetOwner(owner);
 }
开发者ID:KeizouToyoda,项目名称:RibbonControl,代码行数:8,代码来源:RibbonContext.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Forms.RibbonButton类代码示例发布时间:2022-05-26
下一篇:
C# Forms.RetrieveVirtualItemEventArgs类代码示例发布时间: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