Ejemplo n.º 1
0
        /// <summary>
        /// Initialize a new instance of the NavigatorBar class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorBar(KryptonNavigator navigator,
                            NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _barAnimation      = true;
            _barFirstItemInset = 0;
            _barLastItemInset  = 0;
            _barOrientation    = VisualOrientation.Top;
            _barMinimumHeight  = _defaultBarMinimumHeight;
            _barMultiline      = BarMultiline.Singleline;
            _checkButtonStyle  = ButtonStyle.Standalone;
            _tabStyle          = TabStyle.HighProfile;
            _tabBorderStyle    = TabBorderStyle.RoundedOutsizeMedium;
            _itemAlignment     = RelativePositionAlign.Near;
            _itemMinimumSize   = _defaultItemMinimumSize;
            _itemMaximumSize   = _defaultItemMaximumSize;
            _itemOrientation   = ButtonOrientation.Auto;
            _itemSizing        = BarItemSizing.SameHeight;
            _barMapImage       = MapKryptonPageImage.Small;
            _barMapText        = MapKryptonPageText.TextTitle;
            _barMapExtraText   = MapKryptonPageText.None;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialize a new instance of the PageToToolTipMapping class.
        /// </summary>
        /// <param name="page">Page to source values from.</param>
        /// <param name="mapImage">How to map the image from the page to the tooltip.</param>
        /// <param name="mapText">How to map the text from the page to the tooltip.</param>
        /// <param name="mapExtraText">How to map the extra text from the page to the tooltip.</param>
        public PageToToolTipMapping(KryptonPage page,
                                    MapKryptonPageImage mapImage,
                                    MapKryptonPageText mapText,
                                    MapKryptonPageText mapExtraText)
        {
            Debug.Assert(page != null);

            _page         = page;
            _mapImage     = mapImage;
            _mapText      = mapText;
            _mapExtraText = mapExtraText;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialize a new instance of the PageToToolTipMapping class.
        /// </summary>
        /// <param name="page">Page to source values from.</param>
        /// <param name="mapImage">How to map the image from the page to the tooltip.</param>
        /// <param name="mapText">How to map the text from the page to the tooltip.</param>
        /// <param name="mapExtraText">How to map the extra text from the page to the tooltip.</param>
        public PageToToolTipMapping(KryptonPage page,
                                    MapKryptonPageImage mapImage,
                                    MapKryptonPageText mapText,
                                    MapKryptonPageText mapExtraText)
        {
            Debug.Assert(page != null);

            _page = page;
            _mapImage = mapImage;
            _mapText = mapText;
            _mapExtraText = mapExtraText;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initialize a new instance of the HeaderGroupMappingBase class.
        /// </summary>
        /// <param name="navigator">Reference to owning navogator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public HeaderGroupMappingBase(KryptonNavigator navigator,
                                      NeedPaintHandler needPaint)
            : base(needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference to owning control
            _navigator = navigator;

            // Set initial values to the default
            _mapImage       = GetMapImageDefault();
            _mapHeading     = GetMapHeadingDefault();
            _mapDescription = GetMapDescriptionDefault();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initialize a new instance of the HeaderGroupMappingBase class.
        /// </summary>
        /// <param name="navigator">Reference to owning navogator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public HeaderGroupMappingBase(KryptonNavigator navigator,
                                      NeedPaintHandler needPaint)
            : base(needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference to owning control
            _navigator = navigator;

            // Set initial values to the default
            _mapImage = GetMapImageDefault();
            _mapHeading = GetMapHeadingDefault();
            _mapDescription = GetMapDescriptionDefault();
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Initialize a new instance of the NavigatorPopupPage class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorToolTips(KryptonNavigator navigator,
                                NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);
            Debug.Assert(needPaint != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _allowPageToolTips = false;
            _allowButtonSpecToolTips = false;
            _mapImage = MapKryptonPageImage.ToolTip;
            _mapText = MapKryptonPageText.ToolTipTitle;
            _mapExtraText = MapKryptonPageText.ToolTipBody;
        }
        /// <summary>
        /// Initialize a new instance of the NavigatorOutlookFull class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorOutlookFull(KryptonNavigator navigator,
                                    NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _overflowMapImage = MapKryptonPageImage.Small;
            _overflowMapText = MapKryptonPageText.None;
            _overflowMapExtraText = MapKryptonPageText.None;
            _stackMapImage = MapKryptonPageImage.MediumSmall;
            _stackMapText = MapKryptonPageText.TextTitle;
            _stackMapExtraText = MapKryptonPageText.None;
        }
        /// <summary>
        /// Initialize a new instance of the NavigatorOutlookFull class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorOutlookFull(KryptonNavigator navigator,
                                    NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _overflowMapImage     = MapKryptonPageImage.Small;
            _overflowMapText      = MapKryptonPageText.None;
            _overflowMapExtraText = MapKryptonPageText.None;
            _stackMapImage        = MapKryptonPageImage.MediumSmall;
            _stackMapText         = MapKryptonPageText.TextTitle;
            _stackMapExtraText    = MapKryptonPageText.None;
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Initialize a new instance of the NavigatorPopupPage class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorToolTips(KryptonNavigator navigator,
                                 NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);
            Debug.Assert(needPaint != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            AllowPageToolTips       = false;
            AllowButtonSpecToolTips = false;
            _mapImage    = MapKryptonPageImage.ToolTip;
            MapText      = MapKryptonPageText.ToolTipTitle;
            MapExtraText = MapKryptonPageText.ToolTipBody;
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Initialize a new instance of the NavigatorButton class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorButton(KryptonNavigator navigator,
                               NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create collection for use defined and fixed buttons
            _buttonSpecs = new NavigatorButtonSpecCollection(navigator);
            _fixedSpecs  = new NavFixedButtonSpecCollection(navigator);

            // Create the fixed buttons
            _fixedPrevious = new ButtonSpecNavPrevious(_navigator);
            _fixedNext     = new ButtonSpecNavNext(_navigator);
            _fixedContext  = new ButtonSpecNavContext(_navigator);
            _fixedClose    = new ButtonSpecNavClose(_navigator);

            // Hook into the click events for the buttons
            _fixedPrevious.Click += new EventHandler(OnPreviousClick);
            _fixedNext.Click     += new EventHandler(OnNextClick);
            _fixedContext.Click  += new EventHandler(OnContextClick);
            _fixedClose.Click    += new EventHandler(OnCloseClick);

            // Add fixed buttons into the display collection
            _fixedSpecs.AddRange(new ButtonSpecNavFixed[] { _fixedPrevious, _fixedNext, _fixedContext, _fixedClose });

            // Default fields
            _displayLogic     = ButtonDisplayLogic.Context;
            _mapTextContext   = MapKryptonPageText.TextTitle;
            _mapImageContext  = MapKryptonPageImage.Small;
            _actionClosed     = CloseButtonAction.RemovePageAndDispose;
            _actionContext    = ContextButtonAction.SelectPage;
            _actionPrevious   = _actionNext = DirectionButtonAction.ModeAppropriateAction;
            _displayPrevious  = _displayNext = _displayContext = _displayClosed = ButtonDisplay.Logic;
            _shortcutClose    = DEFAULT_SHORTCUT_CLOSE;
            _shortcutContext  = DEFAULT_SHORTCUT_CONTEXT;
            _shortcutNext     = DEFAULT_SHORTCUT_NEXT;
            _shortcutPrevious = DEFAULT_SHORTCUT_PREVIOUS;
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Initialize a new instance of the NavigatorStack class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorStack(KryptonNavigator navigator,
                              NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _checkButtonStyle = ButtonStyle.NavigatorStack;
            _borderEdgeStyle = PaletteBorderStyle.ControlClient;
            _stackAnimation = true;
            _stackOrientation = Orientation.Vertical;
            _stackAlignment = RelativePositionAlign.Center;
            _itemOrientation = ButtonOrientation.Auto;
            _stackMapImage = MapKryptonPageImage.Small;
            _stackMapText = MapKryptonPageText.TextTitle;
            _stackMapExtraText = MapKryptonPageText.None;
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Initialize a new instance of the NavigatorStack class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorStack(KryptonNavigator navigator,
                              NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _checkButtonStyle  = ButtonStyle.NavigatorStack;
            _borderEdgeStyle   = PaletteBorderStyle.ControlClient;
            _stackAnimation    = true;
            _stackOrientation  = Orientation.Vertical;
            _stackAlignment    = RelativePositionAlign.Center;
            _itemOrientation   = ButtonOrientation.Auto;
            _stackMapImage     = MapKryptonPageImage.Small;
            _stackMapText      = MapKryptonPageText.TextTitle;
            _stackMapExtraText = MapKryptonPageText.None;
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Initialize a new instance of the NavigatorBar class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorBar(KryptonNavigator navigator,
                            NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _barAnimation = true;
            _barFirstItemInset = 0;
            _barLastItemInset = 0;
            _barOrientation = VisualOrientation.Top;
            _barMinimumHeight = _defaultBarMinimumHeight;
            _barMultiline = BarMultiline.Singleline;
            _checkButtonStyle = ButtonStyle.Standalone;
            _tabStyle = TabStyle.HighProfile;
            _tabBorderStyle = TabBorderStyle.RoundedOutsizeMedium;
            _itemAlignment = RelativePositionAlign.Near;
            _itemMinimumSize = _defaultItemMinimumSize;
            _itemMaximumSize = _defaultItemMaximumSize;
            _itemOrientation = ButtonOrientation.Auto;
            _itemSizing = BarItemSizing.SameHeight;
            _barMapImage = MapKryptonPageImage.Small;
            _barMapText = MapKryptonPageText.TextTitle;
            _barMapExtraText = MapKryptonPageText.None;
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Gets the image that matches the mapping request.
        /// </summary>
        /// <param name="mapping">Image mapping.</param>
        /// <returns>Image reference.</returns>
        public virtual Image GetImageMapping(MapKryptonPageImage mapping)
        {
            Image ret = null;

            // Recover the first preference value
            switch (mapping)
            {
                case MapKryptonPageImage.Small:
                case MapKryptonPageImage.SmallMedium:
                case MapKryptonPageImage.SmallMediumLarge:
                    ret = ImageSmall;
                    break;
                case MapKryptonPageImage.Medium:
                case MapKryptonPageImage.MediumLarge:
                case MapKryptonPageImage.MediumSmall:
                    ret = ImageMedium;
                    break;
                case MapKryptonPageImage.Large:
                case MapKryptonPageImage.LargeMedium:
                case MapKryptonPageImage.LargeMediumSmall:
                    ret = ImageLarge;
                    break;
                case MapKryptonPageImage.ToolTip:
                    ret = ToolTipImage;
                    break;
            }

            // If nothing found then...
            if (ret == null)
            {
                // Recover the second preference value
                switch (mapping)
                {
                    case MapKryptonPageImage.MediumSmall:
                        ret = ImageSmall;
                        break;
                    case MapKryptonPageImage.SmallMedium:
                    case MapKryptonPageImage.SmallMediumLarge:
                    case MapKryptonPageImage.LargeMedium:
                    case MapKryptonPageImage.LargeMediumSmall:
                        ret = ImageMedium;
                        break;
                    case MapKryptonPageImage.MediumLarge:
                        ret = ImageLarge;
                        break;
                }
            }

            // If nothing found then...
            if (ret == null)
            {
                // Recover the third preference value
                switch (mapping)
                {
                    case MapKryptonPageImage.LargeMediumSmall:
                        ret = ImageSmall;
                        break;
                    case MapKryptonPageImage.SmallMediumLarge:
                        ret = ImageLarge;
                        break;
                }
            }

            return ret;
        }
Ejemplo n.º 15
0
 /// <summary>
 /// Resets the StackMapImage property to its default value.
 /// </summary>
 public void ResetStackMapImage()
 {
     StackMapImage = MapKryptonPageImage.MediumSmall;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Resets the OverflowMapImage property to its default value.
 /// </summary>
 public void ResetOverflowMapImage()
 {
     OverflowMapImage = MapKryptonPageImage.Small;
 }
 /// <summary>
 /// Resets the MapImage property to its default value.
 /// </summary>
 public void ResetMapImage()
 {
     MapImage = GetMapImageDefault();
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Resets the BarMapImage property to its default value.
 /// </summary>
 public void ResetBarMapImage()
 {
     BarMapImage = MapKryptonPageImage.Small;
 }
 /// <summary>
 /// Gets the image that matches the mapping request.
 /// </summary>
 /// <param name="mapping">Image mapping.</param>
 /// <returns>Image reference.</returns>
 public override Image GetImageMapping(MapKryptonPageImage mapping)
 {
     return(Page.GetImageMapping(mapping));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Resets the MapImage property to its default value.
 /// </summary>
 public void ResetMapImage()
 {
     MapImage = GetMapImageDefault();
 }
 /// <summary>
 /// Gets the image that matches the mapping request.
 /// </summary>
 /// <param name="mapping">Image mapping.</param>
 /// <returns>Image reference.</returns>
 public override Image GetImageMapping(MapKryptonPageImage mapping)
 {
     return Page.GetImageMapping(mapping);
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Resets the MiniMapImage property to its default value.
 /// </summary>
 public void ResetMiniMapImage()
 {
     MiniMapImage = MapKryptonPageImage.None;
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Resets the MapImage property to its default value.
 /// </summary>
 public void ResetMapImage()
 {
     MapImage = MapKryptonPageImage.ToolTip;
 }
Ejemplo n.º 24
0
        /// <summary>
        /// Initialize a new instance of the NavigatorButton class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorButton(KryptonNavigator navigator,
                               NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create collection for use defined and fixed buttons
            _buttonSpecs = new NavigatorButtonSpecCollection(navigator);
            _fixedSpecs = new NavFixedButtonSpecCollection(navigator);

            // Create the fixed buttons
            _fixedPrevious = new ButtonSpecNavPrevious(_navigator);
            _fixedNext = new ButtonSpecNavNext(_navigator);
            _fixedContext = new ButtonSpecNavContext(_navigator);
            _fixedClose = new ButtonSpecNavClose(_navigator);

            // Hook into the click events for the buttons
            _fixedPrevious.Click += new EventHandler(OnPreviousClick);
            _fixedNext.Click += new EventHandler(OnNextClick);
            _fixedContext.Click += new EventHandler(OnContextClick);
            _fixedClose.Click += new EventHandler(OnCloseClick);

            // Add fixed buttons into the display collection
            _fixedSpecs.AddRange(new ButtonSpecNavFixed[] { _fixedPrevious, _fixedNext, _fixedContext, _fixedClose });

            // Default fields
            _displayLogic = ButtonDisplayLogic.Context;
            _mapTextContext = MapKryptonPageText.TextTitle;
            _mapImageContext = MapKryptonPageImage.Small;
            _actionClosed = CloseButtonAction.RemovePageAndDispose;
            _actionContext = ContextButtonAction.SelectPage;
            _actionPrevious = _actionNext = DirectionButtonAction.ModeAppropriateAction;
            _displayPrevious = _displayNext = _displayContext = _displayClosed = ButtonDisplay.Logic;
            _shortcutClose = _defaultShortcutClose;
            _shortcutContext = _defaultShortcutContext;
            _shortcutNext = _defaultShortcutNext;
            _shortcutPrevious = _defaultShortcutPrevious;
        }