本文整理汇总了C#中KryptonRibbon类的典型用法代码示例。如果您正苦于以下问题:C# KryptonRibbon类的具体用法?C# KryptonRibbon怎么用?C# KryptonRibbon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KryptonRibbon类属于命名空间,在下文中一共展示了KryptonRibbon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}