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


C# Forms.Ribbon类代码示例

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


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


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