Fix some docs

pull/35/head
Miepee 4 years ago
parent 33f8e974cd
commit 3b6fac264d

@ -11,7 +11,7 @@ using System.Reflection;
namespace AM2RLauncher;
/// <summary>
/// Class that checks for Updates and then Updates the Launcher.
/// Class that checks for Updates and then updates the Launcher.
/// </summary>
//TODO: Mac support for auto updater in general
public static class LauncherUpdater

@ -1,7 +1,15 @@
namespace AM2RLauncher;
/// <summary>
/// A custom button implementation for the AM2RLauncher.
/// Generates a big <see cref="ColorButton"/> with AM2R colors.
/// </summary>
public class BigColorButton : ColorButton
{
/// <summary>
/// Initializes a <see cref="BigColorButton"/>
/// </summary>
/// <param name="text">The text that should be displayed on the button.</param>
public BigColorButton(string text)
{
Text = text;

@ -17,7 +17,7 @@ public class CustomButton : Drawable
/// <summary>Whether or not the mouse is hovering over this <see cref="CustomButton"/>.</summary>
bool hover;
/// <summary></summary>
/// <summary>Whether or not the mouse is pressed down over this <see cref="CustomButton"/>.</summary>
bool mouseDown;
/// <summary>Gets or sets the disabled color of this control.</summary>
@ -79,7 +79,6 @@ public class CustomButton : Drawable
/// <summary>
/// Event raised when this control is clicked.
/// </summary>
/// <param name="e"></param>
protected virtual void OnClick(EventArgs e)
{
if (Click != null)
@ -94,7 +93,6 @@ public class CustomButton : Drawable
}
/// <summary>Event raised when this control is resized.</summary>
/// <param name="e"></param>
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
@ -105,7 +103,6 @@ public class CustomButton : Drawable
/// <summary>
/// Event raised when the mouse is pressed down over this control's bounding box.
/// </summary>
/// <param name="e"></param>
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
@ -118,7 +115,6 @@ public class CustomButton : Drawable
/// <summary>
/// Event raised when the mouse enters this control's bounding box.
/// </summary>
/// <param name="e"></param>
protected override void OnMouseEnter(MouseEventArgs e)
{
Cursor = new Cursor(CursorType.Pointer);
@ -130,7 +126,6 @@ public class CustomButton : Drawable
/// <summary>
/// Event raised when the mouse leaves this control's bounding box.
/// </summary>
/// <param name="e"></param>
protected override void OnMouseLeave(MouseEventArgs e)
{
Cursor = new Cursor(CursorType.Default);
@ -139,6 +134,9 @@ public class CustomButton : Drawable
Invalidate();
}
/// <summary>
/// Event raised, when this control gets focused.
/// </summary>
protected override void OnGotFocus(EventArgs e)
{
hover = true;
@ -146,6 +144,9 @@ public class CustomButton : Drawable
Invalidate();
}
/// <summary>
/// Event raised, when this control looses focus.
/// </summary>
protected override void OnLostFocus(EventArgs e)
{
hover = false;
@ -153,6 +154,9 @@ public class CustomButton : Drawable
Invalidate();
}
/// <summary>
/// Event raised, when a key is pressed down.
/// </summary>
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);

@ -42,7 +42,6 @@ public class ImageButton : CustomButton
/// <summary>
/// Event raised when this control is loading.
/// </summary>
/// <param name="e"></param>
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
@ -56,7 +55,6 @@ public class ImageButton : CustomButton
/// <summary>
/// Event raised when this control has finished loading.
/// </summary>
/// <param name="e"></param>
protected override void OnLoadComplete(EventArgs e)
{
base.OnLoadComplete(e);
@ -91,7 +89,6 @@ public class ImageButton : CustomButton
/// <summary>
/// Event raised to draw this control.
/// </summary>
/// <param name="pe"></param>
protected override void OnPaint(Eto.Forms.PaintEventArgs pe)
{
var image = this.Enabled ? Image : DisabledImage;

@ -2,8 +2,16 @@ using Eto.Forms;
namespace AM2RLauncher;
/// <summary>
/// A custom AM2RLauncher-themed checkbox.
/// </summary>
public class LauncherCheckbox : CheckBox
{
/// <summary>
/// Initializes a new <see cref="LauncherCheckbox"/>.
/// </summary>
/// <param name="text">The text that should be displayed next to the checkbox.</param>
/// <param name="checkedState">The checked state of the checkbox.</param>
public LauncherCheckbox(string text, bool? checkedState = false)
{
Text = text;

@ -2,10 +2,18 @@ using Eto.Drawing;
namespace AM2RLauncher;
/// <summary>
/// A custom button implementation for the AM2RLauncher.
/// Generates a small <see cref="ColorButton"/> with AM2R colors.
/// </summary>
public class SmallColorButton : ColorButton
{
private Font smallButtonFont = new Font(SystemFont.Default, 10);
/// <summary>
/// Initializes a new <see cref="SmallColorButton"/>.
/// </summary>
/// <param name="text">The text that should be displayed on the button.</param>
public SmallColorButton(string text)
{
Font = smallButtonFont;

@ -2,8 +2,15 @@ using Eto.Forms;
namespace AM2RLauncher;
/// <summary>
/// A custom control that acts as a spacer between other controls.
/// </summary>
public class Spacer : Label
{
/// <summary>
/// Initialize a new <see cref="Spacer"/>.
/// </summary>
/// <param name="height">The height of the spacer in pixel.</param>
public Spacer(int height)
{
Height = height;

@ -4,8 +4,17 @@ using Pablo.Controls;
namespace AM2RLauncher;
/// <summary>
/// An <see cref="ImageButton"/>, that when clicked opens a URL.
/// </summary>
public class URLImageButton : ImageButton
{
/// <summary>
/// Initializes a new <see cref="URLImageButton"/>
/// </summary>
/// <param name="image">The image that should be drawn.</param>
/// <param name="url">The URL that should get opened.</param>
/// <param name="tooltip">The tool tip for the control.</param>
public URLImageButton(Bitmap image, string url, string tooltip = "")
{
Image = image;
@ -14,6 +23,12 @@ public class URLImageButton : ImageButton
Click += (_, _) => CrossPlatformOperations.OpenURL(url);
}
/// <summary>
/// Initializes a new <see cref="URLImageButton"/>
/// </summary>
/// <param name="image">The image as a byte array that should be drawn.</param>
/// <param name="url">The URL that should get opened.</param>
/// <param name="tooltip">The tool tip for the control.</param>
public URLImageButton(byte[] image, string url, string tooltip = "") : this(new Bitmap(image), url, tooltip)
{

Loading…
Cancel
Save