Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
* Files
Browse files Browse the repository at this point in the history
  • Loading branch information
PWagner1 committed May 25, 2018
1 parent ab40876 commit cd30ef5
Show file tree
Hide file tree
Showing 3,781 changed files with 892,938 additions and 3,279 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
// *****************************************************************************
// BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
// © Component Factory Pty Ltd, 2006-2018, All rights reserved.
// The software and associated documentation supplied hereunder are the
// proprietary information of Component Factory Pty Ltd, 13 Swallows Close,
// Mornington, Vic 3931, Australia and are supplied subject to licence terms.
//
// Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV) 2017 - 2018. All rights reserved. (https://github.com/Wagnerp/Krypton-NET-4.7)
// Version 4.7.0.0 www.ComponentFactory.com
// *****************************************************************************

using System.Drawing;
using System.ComponentModel.Design;

namespace Krypton.Navigator
{
internal class KryptonPageActionList : DesignerActionList
{
#region Instance Fields
private readonly KryptonPage _page;
private readonly IComponentChangeService _serviceComponentChange;
private DesignerActionItemCollection _actions;
#endregion

#region Identity
/// <summary>
/// Initialize a new instance of the KryptonPageActionList class.
/// </summary>
/// <param name="owner">Designer that owns this action list instance.</param>
public KryptonPageActionList(KryptonPageDesigner owner)
: base(owner.Component)
{
// Remember designer and actual component instance being designed
_page = (KryptonPage)owner.Component;

// Cache service used to notify when a property has changed
_serviceComponentChange = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}
#endregion

#region Public
/// <summary>
/// Gets and sets the page text.
/// </summary>
public string TextShort
{
get => _page.Text;

set
{
if (!_page.Text.Equals(value))
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.Text, value);
_page.Text = value;
}
}
}

/// <summary>
/// Gets and sets the page title text.
/// </summary>
public string TextTitle
{
get => _page.TextTitle;

set
{
if (!_page.TextTitle.Equals(value))
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.TextTitle, value);
_page.TextTitle = value;
}
}
}

/// <summary>
/// Gets and sets the page description text.
/// </summary>
public string TextDescription
{
get => _page.TextDescription;

set
{
if (!_page.TextDescription.Equals(value))
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.TextDescription, value);
_page.TextDescription = value;
}
}
}

/// <summary>
/// Gets and sets the page tooltip title text.
/// </summary>
public string ToolTipTitle
{
get => _page.ToolTipTitle;

set
{
if (!_page.ToolTipTitle.Equals(value))
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.ToolTipTitle, value);
_page.ToolTipTitle = value;
}
}
}

/// <summary>
/// Gets and sets the page tooltip body text.
/// </summary>
public string ToolTipBody
{
get => _page.ToolTipBody;

set
{
if (!_page.ToolTipBody.Equals(value))
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.ToolTipBody, value);
_page.ToolTipBody = value;
}
}
}

/// <summary>
/// Gets and sets the page tooltip image.
/// </summary>
public Image ToolTipImage
{
get => _page.ToolTipImage;

set
{
if (_page.ToolTipImage != value)
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.ToolTipImage, value);
_page.ToolTipImage = value;
}
}
}

/// <summary>
/// Gets and sets the small page image.
/// </summary>
public Image ImageSmall
{
get => _page.ImageSmall;

set
{
if (_page.ImageSmall != value)
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.ImageSmall, value);
_page.ImageSmall = value;
}
}
}

/// <summary>
/// Gets and sets the medium page image.
/// </summary>
public Image ImageMedium
{
get => _page.ImageMedium;

set
{
if (_page.ImageMedium != value)
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.ImageMedium, value);
_page.ImageMedium = value;
}
}
}

/// <summary>
/// Gets and sets the large page image.
/// </summary>
public Image ImageLarge
{
get => _page.ImageLarge;

set
{
if (_page.ImageLarge != value)
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.ImageLarge, value);
_page.ImageLarge = value;
}
}
}

/// <summary>
/// Gets and sets the large page image.
/// </summary>
public bool PageInOverflowBarForOutlookMode
{
get => _page.AreFlagsSet(KryptonPageFlags.PageInOverflowBarForOutlookMode);

set
{
_serviceComponentChange.OnComponentChanged(_page, null, _page.AreFlagsSet(KryptonPageFlags.PageInOverflowBarForOutlookMode), value);

if (value)
{
_page.SetFlags(KryptonPageFlags.PageInOverflowBarForOutlookMode);
}
else
{
_page.ClearFlags(KryptonPageFlags.PageInOverflowBarForOutlookMode);
}
}
}
#endregion

#region Public Override
/// <summary>
/// Returns the collection of DesignerActionItem objects contained in the list.
/// </summary>
/// <returns>A DesignerActionItem array that contains the items in this list.</returns>
public override DesignerActionItemCollection GetSortedActionItems()
{
// Only create the list of items once
if (_actions == null)
{
_actions = new DesignerActionItemCollection
{
new DesignerActionHeaderItem("Appearance"),
new DesignerActionPropertyItem("TextShort", "Text", "Appearance", "The page text."),
new DesignerActionPropertyItem("TextTitle", "Text Title", "Appearance", "The title text for the page."),
new DesignerActionPropertyItem("TextDescription", "Text Description", "Appearance", "The description text for the page."),
new DesignerActionPropertyItem("ImageSmall", "Image Small", "Appearance", "The small image that represents the page."),
new DesignerActionPropertyItem("ImageMedium", "Image Medium", "Appearance", "The medium image that represents the page."),
new DesignerActionPropertyItem("ImageLarge", "Image Large", "Appearance", "The large image that represents the page."),
new DesignerActionPropertyItem("ToolTipTitle", "Tooltip Title", "Appearance", "The tooltip title text for the page."),
new DesignerActionPropertyItem("ToolTipBody", "Tooltip Body", "Appearance", "The tooltip body text for the page."),
new DesignerActionPropertyItem("ToolTipImage", "Tooltip Image", "Appearance", "The tooltip image that represents the page."),
new DesignerActionHeaderItem("Flags"),
new DesignerActionPropertyItem("PageInOverflowBarForOutlookMode", "Page in Overflow Bar for Outlook mode", "Flags", "Should the page be shown on the overflow bar for the Outlook mode.")
};
}

return _actions;
}
#endregion
}
}
Loading

0 comments on commit cd30ef5

Please sign in to comment.