ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupCheckBox.ViewDrawRibbonGroupCheckBox C# (CSharp) 메소드

ViewDrawRibbonGroupCheckBox() 공개 메소드

Initialize a new instance of the ViewDrawRibbonGroupCheckBox class.
public ViewDrawRibbonGroupCheckBox ( KryptonRibbon ribbon, KryptonRibbonGroupCheckBox ribbonCheckBox, NeedPaintHandler needPaint ) : System
ribbon KryptonRibbon Reference to owning ribbon control.
ribbonCheckBox KryptonRibbonGroupCheckBox Reference to source check box definition.
needPaint NeedPaintHandler Delegate for notifying paint requests.
리턴 System
        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);
        }