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

C# KryptonRibbon类代码示例

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

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



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

示例1: ViewDrawRibbonGroupColorButton

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupColorButton class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonColorButton">Reference to source color button definition.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public ViewDrawRibbonGroupColorButton(KryptonRibbon ribbon,
                                              KryptonRibbonGroupColorButton ribbonColorButton,
                                              NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonColorButton != null);
            Debug.Assert(needPaint != null);

            // Remember incoming references
            _ribbon = ribbon;
            _ribbonColorButton = ribbonColorButton;
            _needPaint = needPaint;
            _currentSize = _ribbonColorButton.ItemSizeCurrent;

            // Associate this view with the source component (required for design time selection)
            Component = _ribbonColorButton;

            // Create the different views for different sizes of the button
            CreateLargeButtonView();
            CreateMediumSmallButtonView();

            // Update all views to reflect current button state
            UpdateEnabledState();
            UpdateCheckedState();
            UpdateDropDownState();
            UpdateItemSizeState();

            // Hook into changes in the ribbon button definition
            _ribbonColorButton.PropertyChanged += new PropertyChangedEventHandler(OnButtonPropertyChanged);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:36,代码来源:ViewDrawRibbonGroupColorButton.cs


示例2: ViewDrawRibbonGroupClusterButtonImage

 /// <summary>
 /// Initialize a new instance of the ViewDrawRibbonGroupClusterButtonImage class.
 /// </summary>
 /// <param name="ribbon">Reference to owning ribbon control.</param>
 /// <param name="ribbonButton">Reference to ribbon group button definition.</param>
 public ViewDrawRibbonGroupClusterButtonImage(KryptonRibbon ribbon,
                                              KryptonRibbonGroupClusterButton ribbonButton)
     : base(ribbon)
 {
     Debug.Assert(ribbonButton != null);
     _ribbonButton = ribbonButton;
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:12,代码来源:ViewDrawRibbonGroupClusterButtonImage.cs


示例3: ViewDrawRibbonGroupCheckBox

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupCheckBox class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonCheckBox">Reference to source check box definition.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public ViewDrawRibbonGroupCheckBox(KryptonRibbon ribbon,
                                           KryptonRibbonGroupCheckBox ribbonCheckBox,
                                           NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonCheckBox != null);
            Debug.Assert(needPaint != null);

            // Remember incoming references
            _ribbon = ribbon;
            _ribbonCheckBox = ribbonCheckBox;
            _needPaint = needPaint;
            _currentSize = _ribbonCheckBox.ItemSizeCurrent;

            // Create delegate used to process end of click action
            _finishDelegateLarge = new EventHandler(ActionFinishedLarge);
            _finishDelegateMediumSmall = new EventHandler(ActionFinishedMediumSmall);

            // Associate this view with the source component (required for design time selection)
            Component = _ribbonCheckBox;

            // Create the different views for different sizes of the check box
            CreateLargeCheckBoxView();
            CreateMediumSmallCheckBoxView();

            // Update all views to reflect current check box state
            UpdateEnabledState();
            UpdateCheckState();
            UpdateItemSizeState();

            // Hook into changes in the ribbon check box definition
            _ribbonCheckBox.PropertyChanged += new PropertyChangedEventHandler(OnCheckBoxPropertyChanged);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:39,代码来源:ViewDrawRibbonGroupCheckBox.cs


示例4: ViewLayoutRibbonQATMini

        /// <summary>
        /// Initialize a new instance of the ViewLayoutRibbonQATMini class.
        /// </summary>
        /// <param name="ribbon">Owning control instance.</param>
        /// <param name="needPaintDelegate">Delegate for notifying paint/layout changes.</param>
        public ViewLayoutRibbonQATMini(KryptonRibbon ribbon,
                                       NeedPaintHandler needPaintDelegate)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            // Create the minibar border suitable for a caption area
            _border = new ViewDrawRibbonQATBorder(ribbon, needPaintDelegate, true);

            // Create minibar content that synchs with ribbon collection
            _borderContents = new ViewLayoutRibbonQATFromRibbon(ribbon, needPaintDelegate, false);
            _border.Add(_borderContents);

            // Separator gap before the extra button
            _extraSeparator = new ViewLayoutSeparator(SEP_GAP);

            // Need the extra button to show after the border area
            _extraButton = new ViewDrawRibbonQATExtraButtonMini(ribbon, needPaintDelegate);
            _extraButton.ClickAndFinish += new ClickAndFinishHandler(OnExtraButtonClick);

            // Add layout contents
            Add(_border, ViewDockStyle.Fill);
            Add(_extraSeparator, ViewDockStyle.Right);
            Add(_extraButton, ViewDockStyle.Right);
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:30,代码来源:ViewLayoutRibbonQATMini.cs


示例5: VisualPopupGroup

        /// <summary>
        /// Initialize a new instance of the VisualPopupGroup class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonGroup">Reference to ribbon group for display.</param>
        /// <param name="renderer">Drawing renderer.</param>
        public VisualPopupGroup(KryptonRibbon ribbon,
                                KryptonRibbonGroup ribbonGroup,
                                IRenderer renderer)
            : base(renderer, true)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonGroup != null);

            // Remember references needed later
            _ribbon = ribbon;
            _ribbonGroup = ribbonGroup;

            // Create a view element for drawing the group
            _viewGroup = new ViewDrawRibbonGroup(ribbon, ribbonGroup, NeedPaintDelegate);
            _viewGroup.Collapsed = false;

            // Create the background that will contain the actual group instance
            _viewBackground = new ViewDrawRibbonGroupsBorder(ribbon, true, NeedPaintDelegate);
            _viewBackground.Add(_viewGroup);

            // Attach the root to the view manager instance
            ViewManager = new ViewRibbonPopupGroupManager(this, ribbon, _viewBackground, _viewGroup, NeedPaintDelegate);

            // Create and add a hidden button to act as the focus target
            _hiddenFocusTarget = new Button();
            _hiddenFocusTarget.TabStop = false;
            _hiddenFocusTarget.Location = new Point(-_hiddenFocusTarget.Width, -_hiddenFocusTarget.Height);
            CommonHelper.AddControlToParent(this, _hiddenFocusTarget);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:35,代码来源:VisualPopupGroup.cs


示例6: ViewDrawRibbonGroupSeparator

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupSeparator class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonSeparator">Reference to group separator definition.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public ViewDrawRibbonGroupSeparator(KryptonRibbon ribbon,
                                            KryptonRibbonGroupSeparator ribbonSeparator,
                                            NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonSeparator != null);
            Debug.Assert(needPaint != null);

            _ribbon = ribbon;
            _ribbonSeparator = ribbonSeparator;
            _needPaint = needPaint;

            // Associate this view with the source component (required for design time selection)
            Component = _ribbonSeparator;

            if (_ribbon.InDesignMode)
            {
                // At design time we need to know when the user right clicks the label
                ContextClickController controller = new ContextClickController();
                controller.ContextClick += new MouseEventHandler(OnContextClick);
                MouseController = controller;
            }

            // Define back reference to view for the separator definition
            _ribbonSeparator.SeparatorView = this;

            // Hook into changes in the ribbon separator definition
            _ribbonSeparator.PropertyChanged += new PropertyChangedEventHandler(OnSeparatorPropertyChanged);

            // Default the preferred size
            _lastShape = PaletteRibbonShape.Office2007;
            _preferredSize = _preferredSize2007;
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:39,代码来源:ViewDrawRibbonGroupSeparator.cs


示例7: ViewDrawRibbonGroupLabel

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupLabel class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonLabel">Reference to source label definition.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public ViewDrawRibbonGroupLabel(KryptonRibbon ribbon,
                                        KryptonRibbonGroupLabel ribbonLabel,
                                        NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonLabel != null);
            Debug.Assert(needPaint != null);

            // Remember incoming references
            _ribbon = ribbon;
            _ribbonLabel = ribbonLabel;
            _needPaint = needPaint;

            // Associate this view with the source component (required for design time selection)
            Component = _ribbonLabel;

            // Give paint delegate to label so its palette changes are redrawn
            _ribbonLabel.ViewPaintDelegate = needPaint;

            // Create the different views for different sizes of the label
            CreateLargeLabelView();
            CreateMediumSmallLabelView();

            // Update all views to reflect current label state
            UpdateEnabledState();
            UpdateImageSmallState();
            UpdateItemSizeState();

            // Hook into changes in the ribbon button definition
            _ribbonLabel.PropertyChanged += new PropertyChangedEventHandler(OnLabelPropertyChanged);
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:37,代码来源:ViewDrawRibbonGroupLabel.cs


示例8: CalculatedValues

        /// <summary>
        /// Initialize a new instance of the CalculatedValues class.
        /// </summary>
        /// <param name="ribbon">Source control instance.</param>
        public CalculatedValues(KryptonRibbon ribbon)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            _lastShape = PaletteRibbonShape.Inherit;
        }
开发者ID:yp25,项目名称:Krypton,代码行数:11,代码来源:CalculatedValues.cs


示例9: ButtonSpecMinimizeRibbon

        /// <summary>
        /// Initialize a new instance of the ButtonSpecMinimizeRibbon class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        public ButtonSpecMinimizeRibbon(KryptonRibbon ribbon)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            // Fix the type
            ProtectedType = PaletteButtonSpecStyle.RibbonMinimize;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:12,代码来源:ButtonSpecMinimizeRibbon.cs


示例10: ViewDrawRibbonDesignCluster

 /// <summary>
 /// Initialize a new instance of the ViewDrawRibbonDesignCluster class.
 /// </summary>
 /// <param name="ribbon">Reference to owning ribbon control.</param>
 /// <param name="ribbonCluster">Reference to cluster definition.</param>
 /// <param name="needPaint">Delegate for notifying paint requests.</param>
 public ViewDrawRibbonDesignCluster(KryptonRibbon ribbon,
                                    KryptonRibbonGroupCluster ribbonCluster,
                                    NeedPaintHandler needPaint)
     : base(ribbon, needPaint)
 {
     Debug.Assert(ribbonCluster != null);
     _ribbonCluster = ribbonCluster;
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:14,代码来源:ViewDrawRibbonDesignCluster.cs


示例11: ViewDrawRibbonGroupGalleryImage

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupGalleryImage class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonGallery">Reference to ribbon group gallery definition.</param>
        public ViewDrawRibbonGroupGalleryImage(KryptonRibbon ribbon,
                                               KryptonRibbonGroupGallery ribbonGallery)
            : base(ribbon)
        {
            Debug.Assert(ribbonGallery != null);

            _ribbonGallery = ribbonGallery;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:13,代码来源:ViewDrawRibbonGroupGalleryImage.cs


示例12: ViewDrawRibbonDesignGroupContainer

 /// <summary>
 /// Initialize a new instance of the ViewDrawRibbonDesignGroup class.
 /// </summary>
 /// <param name="ribbon">Reference to owning ribbon control.</param>
 /// <param name="ribbonGroup">Associated ribbon group.</param>
 /// <param name="needPaint">Delegate for notifying paint requests.</param>
 public ViewDrawRibbonDesignGroupContainer(KryptonRibbon ribbon,
                                           KryptonRibbonGroup ribbonGroup,
                                           NeedPaintHandler needPaint)
     : base(ribbon, needPaint)
 {
     Debug.Assert(ribbonGroup != null);
     _ribbonGroup = ribbonGroup;
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:14,代码来源:ViewDrawRibbonDesignGroupContainer.cs


示例13: AppButtonController

 /// <summary>
 /// Initialize a new instance of the AppButtonController class.
 /// </summary>
 public AppButtonController(KryptonRibbon ribbon)
 {
     _ribbon = ribbon;
     _updateTimer = new Timer();
     _updateTimer.Interval = 1;
     _updateTimer.Tick += new EventHandler(OnUpdateTimer);
     _keyboard = false;
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:11,代码来源:AppButtonController.cs


示例14: KryptonRibbonActionList

        /// <summary>
        /// Initialize a new instance of the KryptonRibbonActionList class.
        /// </summary>
        /// <param name="owner">Designer that owns this action list instance.</param>
        public KryptonRibbonActionList(KryptonRibbonDesigner owner)
            : base(owner.Component)
        {
            // Remember the ribbon instance
            _ribbon = (KryptonRibbon)owner.Component;

            // Cache service used to notify when a property has changed
            _service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:13,代码来源:KryptonRibbonActionList.cs


示例15: PaletteRibbonStyles

        /// <summary>
        /// Initialize a new instance of the PaletteRibbonStyles class.
        /// </summary>
        /// <param name="ribbon">Source ribbon control instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteRibbonStyles(KryptonRibbon ribbon,
                                   NeedPaintHandler needPaint)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:14,代码来源:PaletteRibbonStyles.cs


示例16: ViewDrawRibbonRecentDocs

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonRecentDocs class.
        /// </summary>
        /// <param name="ribbon">Source ribbon control.</param>
        public ViewDrawRibbonRecentDocs(KryptonRibbon ribbon)
        {
            Debug.Assert(ribbon != null);
            _ribbon = ribbon;

            // Use a class to convert from ribbon recent docs to content interface
            _contentProvider = new RibbonRecentDocsTitleToContent(ribbon.StateCommon.RibbonGeneral,
                                                                  ribbon.StateCommon.RibbonAppMenuDocsTitle);
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:13,代码来源:ViewDrawRibbonRecentDocs.cs


示例17: ViewDrawRibbonGroupClusterColorButtonImage

 /// <summary>
 /// Initialize a new instance of the ViewDrawRibViewDrawRibbonGroupClusterColorButtonImagebonGroupClusterButtonImage class.
 /// </summary>
 /// <param name="ribbon">Reference to owning ribbon control.</param>
 /// <param name="ribbonColorButton">Reference to ribbon group color button definition.</param>
 public ViewDrawRibbonGroupClusterColorButtonImage(KryptonRibbon ribbon,
                                                   KryptonRibbonGroupClusterColorButton ribbonColorButton)
     : base(ribbon)
 {
     Debug.Assert(ribbonColorButton != null);
     _ribbonColorButton = ribbonColorButton;
     _selectedColor = ribbonColorButton.SelectedColor;
     _emptyBorderColor = ribbonColorButton.EmptyBorderColor;
     _selectedRect = ribbonColorButton.SelectedRect;
 }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:15,代码来源:ViewDrawRibbonGroupClusterColorButtonImage.cs


示例18: ViewDrawRibbonGroupLabelImage

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupLabelImage class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonLabel">Reference to ribbon group label definition.</param>
        /// <param name="large">Show the large image.</param>
        public ViewDrawRibbonGroupLabelImage(KryptonRibbon ribbon,
                                             KryptonRibbonGroupLabel ribbonLabel,
                                             bool large)
            : base(ribbon)
        {
            Debug.Assert(ribbonLabel != null);

            _ribbonLabel = ribbonLabel;
            _large = large;
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:16,代码来源:ViewDrawRibbonGroupLabelImage.cs


示例19: ViewDrawRibbonQATOverflow

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonQATOverflow class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="needPaintDelegate">Delegate for notifying paint/layout changes.</param>
        public ViewDrawRibbonQATOverflow(KryptonRibbon ribbon,
                                         NeedPaintHandler needPaintDelegate)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(needPaintDelegate != null);

            // Remember incoming references
            _ribbon = ribbon;
            _needPaintDelegate = needPaintDelegate;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:15,代码来源:ViewDrawRibbonQATOverflow.cs


示例20: ViewDrawRibbonGroupClusterEdge

        /// <summary>
        /// Initialize a new instance of the ViewDrawRibbonGroupClusterEdge class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon..</param>
        /// <param name="palette">Palette source for drawing details.</param>
        public ViewDrawRibbonGroupClusterEdge(KryptonRibbon ribbon,
                                              PaletteBorderEdge palette)
            : base(palette, Orientation.Vertical)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(palette != null);

            _ribbon = ribbon;
            _palette = palette;
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:15,代码来源:ViewDrawRibbonGroupClusterEdge.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# LASTINPUTINFO类代码示例发布时间:2022-05-24
下一篇:
C# KryptonAccessController类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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