Exemplo 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;
        }
Exemplo 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;
        }
Exemplo 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;
        }
Exemplo 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();
        }
Exemplo 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();
        }
        /// <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;
        }
Exemplo n.º 7
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;
        }
Exemplo n.º 8
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 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;
        }
        /// <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;
        }
Exemplo 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;
        }
Exemplo 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;
        }
Exemplo n.º 13
0
 /// <summary>
 /// Resets the StackMapExtraText property to its default value.
 /// </summary>
 public void ResetStackMapExtraText()
 {
     StackMapExtraText = MapKryptonPageText.None;
 }
Exemplo n.º 14
0
 /// <summary>
 /// Resets the StackMapText property to its default value.
 /// </summary>
 public void ResetStackMapText()
 {
     StackMapText = MapKryptonPageText.TextTitle;
 }
Exemplo n.º 15
0
 /// <summary>
 /// Resets the OverflowMapExtraText property to its default value.
 /// </summary>
 public void ResetOverflowMapExtraText()
 {
     OverflowMapExtraText = MapKryptonPageText.None;
 }
Exemplo n.º 16
0
 /// <summary>
 /// Resets the BarMapExtraText property to its default value.
 /// </summary>
 public void ResetBarMapExtraText()
 {
     BarMapExtraText = MapKryptonPageText.None;
 }
Exemplo n.º 17
0
 /// <summary>
 /// Resets the BarMapText property to its default value.
 /// </summary>
 public void ResetBarMapText()
 {
     BarMapText = MapKryptonPageText.TextTitle;
 }
Exemplo n.º 18
0
        /// <summary>
        /// Gets the string that matches the mapping request.
        /// </summary>
        /// <param name="mapping">Text mapping.</param>
        /// <returns>Matching string.</returns>
        public virtual string GetTextMapping(MapKryptonPageText mapping)
        {
            string ret = string.Empty;

            // Recover the first preference value
            switch (mapping)
            {
                case MapKryptonPageText.Text:
                case MapKryptonPageText.TextTitle:
                case MapKryptonPageText.TextTitleDescription:
                case MapKryptonPageText.TextDescription:
                    ret = Text;
                    break;
                case MapKryptonPageText.Title:
                case MapKryptonPageText.TitleDescription:
                case MapKryptonPageText.TitleText:
                    ret = TextTitle;
                    break;
                case MapKryptonPageText.Description:
                case MapKryptonPageText.DescriptionText:
                case MapKryptonPageText.DescriptionTitle:
                case MapKryptonPageText.DescriptionTitleText:
                    ret = TextDescription;
                    break;
                case MapKryptonPageText.ToolTipTitle:
                    ret = ToolTipTitle;
                    break;
                case MapKryptonPageText.ToolTipBody:
                    ret = ToolTipBody;
                    break;
            }

            // If nothing found then...
            if (string.IsNullOrEmpty(ret))
            {
                // Recover the second preference value
                switch (mapping)
                {
                    case MapKryptonPageText.TitleText:
                    case MapKryptonPageText.DescriptionText:
                        ret = Text;
                        break;
                    case MapKryptonPageText.TextTitle:
                    case MapKryptonPageText.TextTitleDescription:
                    case MapKryptonPageText.DescriptionTitle:
                    case MapKryptonPageText.DescriptionTitleText:
                        ret = TextTitle;
                        break;
                    case MapKryptonPageText.TextDescription:
                    case MapKryptonPageText.TitleDescription:
                        ret = TextDescription;
                        break;
                }
            }

            // If nothing found then...
            if (string.IsNullOrEmpty(ret))
            {
                // Recover the third preference value
                switch (mapping)
                {
                    case MapKryptonPageText.DescriptionTitleText:
                        ret = Text;
                        break;
                    case MapKryptonPageText.TextTitleDescription:
                        ret = TextDescription;
                        break;
                }
            }

            // We do not want to return a null
            if (ret == null)
                ret = string.Empty;

            return ret;
        }
Exemplo n.º 19
0
 /// <summary>
 /// Resets the MiniMapText property to its default value.
 /// </summary>
 public void ResetMiniMapText()
 {
     MiniMapText = MapKryptonPageText.TextTitle;
 }
 /// <summary>
 /// Gets the string that matches the mapping request.
 /// </summary>
 /// <param name="mapping">Text mapping.</param>
 /// <returns>Matching string.</returns>
 public override string GetTextMapping(MapKryptonPageText mapping)
 {
     return(Page.GetTextMapping(mapping));
 }
 /// <summary>
 /// Resets the StackMapText property to its default value.
 /// </summary>
 public void ResetStackMapText()
 {
     StackMapText = MapKryptonPageText.None;
 }
Exemplo n.º 22
0
 /// <summary>
 /// Resets the MapExtraText property to its default value.
 /// </summary>
 public void ResetMapExtraText()
 {
     MapExtraText = MapKryptonPageText.ToolTipBody;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Resets the MapText property to its default value.
 /// </summary>
 public void ResetMapText()
 {
     MapText = MapKryptonPageText.ToolTipTitle;
 }
 /// <summary>
 /// Resets the MapHeading property to its default value.
 /// </summary>
 public void ResetMapHeading()
 {
     MapHeading = GetMapHeadingDefault();
 }
 /// <summary>
 /// Resets the MapDescription property to its default value.
 /// </summary>
 public void ResetMapDescription()
 {
     MapDescription = GetMapDescriptionDefault();
 }
Exemplo n.º 26
0
 /// <summary>
 /// Resets the MiniMapExtraText property to its default value.
 /// </summary>
 public void ResetMiniMapExtraText()
 {
     MiniMapExtraText = MapKryptonPageText.None;
 }
Exemplo n.º 27
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;
        }
Exemplo n.º 28
0
 /// <summary>
 /// Resets the MapText property to its default value.
 /// </summary>
 public void ResetMapText()
 {
     MapText = MapKryptonPageText.ToolTipTitle;
 }
 /// <summary>
 /// Resets the StackMapText property to its default value.
 /// </summary>
 public void ResetStackMapText()
 {
     StackMapText = MapKryptonPageText.TextTitle;
 }
 /// <summary>
 /// Gets the string that matches the mapping request.
 /// </summary>
 /// <param name="mapping">Text mapping.</param>
 /// <returns>Matching string.</returns>
 public override string GetTextMapping(MapKryptonPageText mapping)
 {
     return Page.GetTextMapping(mapping);
 }
Exemplo n.º 31
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;
        }