Skip to content

Commit

Permalink
Merge pull request #624 from Krypton-Suite/alpha-documentation
Browse files Browse the repository at this point in the history
* Fix typos
  • Loading branch information
Smurf-IV authored Feb 5, 2022
2 parents be18ba4 + 12aa2ff commit 6c30018
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class KryptonWebBrowser : WebBrowser

#region Identity
/// <summary>
/// Initialize a new instance of the KryptonWrapLabel class.
/// Initialize a new instance of the KryptonWebBrowser class.
/// </summary>
public KryptonWebBrowser()
{
Expand Down Expand Up @@ -192,8 +192,10 @@ private void OnKryptonContextMenuDisposed(object sender, EventArgs e)

#endregion MenuStrip Overrides

#region Pallete Controls
#region Palette Controls

/// <summary>Sets the palette being used.</summary>
/// <param name="palette">The chosen palette.</param>
private void SetPalette(IPalette palette)
{
if (palette != _palette)
Expand All @@ -220,6 +222,9 @@ private void SetPalette(IPalette palette)
}
}

/// <summary>Called when there is a change in base renderer or base palette.</summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void OnBaseChanged(object sender, EventArgs e)
{
// Change in base renderer or base palette require we fetch the latest renderer
Expand Down Expand Up @@ -256,6 +261,6 @@ protected virtual void OnGlobalPaletteChanged(object sender, EventArgs e)
[EditorBrowsable(EditorBrowsableState.Never)]
public IPalette GetResolvedPalette() => _palette;

#endregion Pallete Controls
#endregion Palette Controls
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,8 @@ private bool CanProcessMnemonic()
return true;
}

/// <summary>Sets the palette.</summary>
/// <param name="palette">The palette.</param>
private void SetPalette(IPalette palette)
{
if (palette != _palette)
Expand Down Expand Up @@ -807,6 +809,9 @@ private void SetPalette(IPalette palette)
// Change in base renderer or base palette require we fetch the latest renderer
private void OnBaseChanged(object sender, EventArgs e) => Renderer = _palette.GetRenderer();

/// <summary>Called when [global palette changed].</summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void OnGlobalPaletteChanged(object sender, EventArgs e)
{
// We only care if we are using the global palette
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ namespace Krypton.Toolkit
internal class ExceptionHandler
{
#region Constructor
/// <summary>Initializes a new instance of the <see cref="ExceptionHandler" /> class.</summary>
public ExceptionHandler()
{

}
#endregion

#region Methods
/// <summary>
/// Captures the exception.
/// </summary>
/// <summary>Captures the exception.</summary>
/// <param name="exception">The exception.</param>
/// <param name="title">The title.</param>
/// <param name="buttons">The buttons.</param>
Expand All @@ -55,11 +54,9 @@ public static void CaptureException(Exception exception, string title = @"Except
}
}

/// <summary>
/// Captures a stacktrace of the exception.
/// </summary>
/// <summary>Captures a stack trace of the exception.</summary>
/// <param name="exc">The incoming exception.</param>
/// <param name="fileName">The file to write the exception stacktrace to.</param>
/// <param name="fileName">The file to write the exception stack trace to.</param>
public static void PrintStackTrace(Exception exc, string fileName)
{
try
Expand All @@ -77,18 +74,15 @@ public static void PrintStackTrace(Exception exc, string fileName)

writer.Dispose();
}
catch
catch (Exception e)
{

throw;
CaptureException(e);
}
}

/// <summary>
/// Captures a stacktrace of the exception.
/// </summary>
/// <summary>Captures a stack trace of the exception.</summary>
/// <param name="exc">The incoming exception.</param>
/// <param name="fileName">The file to write the exception stacktrace to.</param>
/// <param name="fileName">The file to write the exception stack trace to.</param>
public static void PrintExceptionStackTrace(Exception exc, string fileName)
{
try
Expand All @@ -106,10 +100,9 @@ public static void PrintExceptionStackTrace(Exception exc, string fileName)

writer.Dispose();
}
catch
catch (Exception e)
{

throw;
CaptureException(e);
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// *****************************************************************************
#region BSD 3-Clause License
// *****************************************************************************
// BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit)
// by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2022. All rights reserved.
// Version 6.0.0
// *****************************************************************************
#endregion

namespace Krypton.Toolkit
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// *****************************************************************************
#region BSD 3-Clause License
// *****************************************************************************
// BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit)
// by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2022. All rights reserved.
// Version 6.0.0
// *****************************************************************************
#endregion

namespace Krypton.Toolkit
{
internal class IconUtilities
{
/// <summary>Initializes a new instance of the <see cref="IconUtilities" /> class.</summary>
public IconUtilities()
{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// *****************************************************************************
#region BSD 3-Clause License
// *****************************************************************************
// BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit)
// by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2022. All rights reserved.
// Version 6.0.0
// *****************************************************************************
#endregion

namespace Krypton.Toolkit
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#endregion


namespace Krypton.Toolkit.Utilities
namespace Krypton.Toolkit
{
/// <summary>
/// Helper class for high DPI.
Expand All @@ -38,14 +38,14 @@ public static class PaletteImageScaler
/// <param name="pal">KryptonPalette</param>
public static void ScalePalette(float factorDpiX, float factorDpiY, KryptonPalette pal)
{
if (pal == null
// || pal.HasAlreadyBeenScaled
if (pal == null
//|| pal.HasAlreadyBeenScaled
)
{
return;
}

// pal.HasAlreadyBeenScaled = true;
//pal.HasAlreadyBeenScaled = true;

var scaleFactor = new SizeF( factorDpiX, factorDpiY);

Expand Down Expand Up @@ -128,6 +128,9 @@ public static void ScalePalette(float factorDpiX, float factorDpiY, KryptonPalet
}

// helper method for scaling KyrptonPaletteButtonSpecTyped
/// <summary>Scales the type of the button spec image.</summary>
/// <param name="bst">The ButtonSpecType.</param>
/// <param name="scaleFactor">The scale factor.</param>
private static void ScaleButtonSpecImageType(KryptonPaletteButtonSpecTyped bst, SizeF scaleFactor)
{
bst.Image = GetScaledImage(bst.Image, scaleFactor);
Expand All @@ -142,6 +145,10 @@ private static void ScaleButtonSpecImageType(KryptonPaletteButtonSpecTyped bst,
}

// scales an image and also makes magenta transparent
/// <summary>Gets the scaled image.</summary>
/// <param name="img">The image.</param>
/// <param name="scaleFactor">The scale factor.</param>
/// <returns>A scaled image, based on the scaleFactor.</returns>
private static Image GetScaledImage(Image img, SizeF scaleFactor)
{
if (img == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,23 @@ public class RoundedRectangleF
#endregion

#region Properties
/// <summary>Gets the path.</summary>
/// <value>The path.</value>
public GraphicsPath Path => _graphicsPath;

/// <summary>Gets the rectangle.</summary>
/// <value>The rectangle.</value>
public RectangleF Rect => new (_x, _y, _width, _height);

#endregion

#region Constructors
/// <summary>Initializes a new instance of the <see cref="RoundedRectangleF" /> class.</summary>
/// <param name="width">The width.</param>
/// <param name="height">The height.</param>
/// <param name="radius">The radius.</param>
/// <param name="x">The x axis.</param>
/// <param name="y">The y axis.</param>
public RoundedRectangleF(float width, float height, float radius, float x = 0, float y = 0)
{
_x = x;
Expand Down

0 comments on commit 6c30018

Please sign in to comment.