diff --git a/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs b/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs index a201fd9..471da3d 100644 --- a/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs +++ b/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs @@ -11,7 +11,7 @@ using System.Reflection; namespace AM2RLauncher; /// -/// Class that checks for Updates and then Updates the Launcher. +/// Class that checks for Updates and then updates the Launcher. /// //TODO: Mac support for auto updater in general public static class LauncherUpdater diff --git a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/BigColorButton.cs b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/BigColorButton.cs index b5719e7..5a51df2 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/BigColorButton.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/BigColorButton.cs @@ -1,7 +1,15 @@ namespace AM2RLauncher; +/// +/// A custom button implementation for the AM2RLauncher. +/// Generates a big with AM2R colors. +/// public class BigColorButton : ColorButton { + /// + /// Initializes a + /// + /// The text that should be displayed on the button. public BigColorButton(string text) { Text = text; diff --git a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/CustomButton.cs b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/CustomButton.cs index 8d19349..f0314ec 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/CustomButton.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/CustomButton.cs @@ -17,7 +17,7 @@ public class CustomButton : Drawable /// Whether or not the mouse is hovering over this . bool hover; - /// + /// Whether or not the mouse is pressed down over this . bool mouseDown; /// Gets or sets the disabled color of this control. @@ -79,7 +79,6 @@ public class CustomButton : Drawable /// /// Event raised when this control is clicked. /// - /// protected virtual void OnClick(EventArgs e) { if (Click != null) @@ -94,7 +93,6 @@ public class CustomButton : Drawable } /// Event raised when this control is resized. - /// protected override void OnSizeChanged(EventArgs e) { base.OnSizeChanged(e); @@ -105,7 +103,6 @@ public class CustomButton : Drawable /// /// Event raised when the mouse is pressed down over this control's bounding box. /// - /// protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); @@ -118,7 +115,6 @@ public class CustomButton : Drawable /// /// Event raised when the mouse enters this control's bounding box. /// - /// protected override void OnMouseEnter(MouseEventArgs e) { Cursor = new Cursor(CursorType.Pointer); @@ -130,7 +126,6 @@ public class CustomButton : Drawable /// /// Event raised when the mouse leaves this control's bounding box. /// - /// protected override void OnMouseLeave(MouseEventArgs e) { Cursor = new Cursor(CursorType.Default); @@ -139,6 +134,9 @@ public class CustomButton : Drawable Invalidate(); } + /// + /// Event raised, when this control gets focused. + /// protected override void OnGotFocus(EventArgs e) { hover = true; @@ -146,6 +144,9 @@ public class CustomButton : Drawable Invalidate(); } + /// + /// Event raised, when this control looses focus. + /// protected override void OnLostFocus(EventArgs e) { hover = false; @@ -153,6 +154,9 @@ public class CustomButton : Drawable Invalidate(); } + /// + /// Event raised, when a key is pressed down. + /// protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); diff --git a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/ImageButton.cs b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/ImageButton.cs index f22f45e..46cd83e 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/ImageButton.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/ImageButton.cs @@ -42,7 +42,6 @@ public class ImageButton : CustomButton /// /// Event raised when this control is loading. /// - /// protected override void OnLoad(EventArgs e) { base.OnLoad(e); @@ -56,7 +55,6 @@ public class ImageButton : CustomButton /// /// Event raised when this control has finished loading. /// - /// protected override void OnLoadComplete(EventArgs e) { base.OnLoadComplete(e); @@ -91,7 +89,6 @@ public class ImageButton : CustomButton /// /// Event raised to draw this control. /// - /// protected override void OnPaint(Eto.Forms.PaintEventArgs pe) { var image = this.Enabled ? Image : DisabledImage; diff --git a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/LauncherCheckbox.cs b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/LauncherCheckbox.cs index dc5e5c1..27b77b5 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/LauncherCheckbox.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/LauncherCheckbox.cs @@ -2,8 +2,16 @@ using Eto.Forms; namespace AM2RLauncher; +/// +/// A custom AM2RLauncher-themed checkbox. +/// public class LauncherCheckbox : CheckBox { + /// + /// Initializes a new . + /// + /// The text that should be displayed next to the checkbox. + /// The checked state of the checkbox. public LauncherCheckbox(string text, bool? checkedState = false) { Text = text; diff --git a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/SmallColorButton.cs b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/SmallColorButton.cs index a1ec799..ee4add0 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/SmallColorButton.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/SmallColorButton.cs @@ -2,10 +2,18 @@ using Eto.Drawing; namespace AM2RLauncher; +/// +/// A custom button implementation for the AM2RLauncher. +/// Generates a small with AM2R colors. +/// public class SmallColorButton : ColorButton { private Font smallButtonFont = new Font(SystemFont.Default, 10); + /// + /// Initializes a new . + /// + /// The text that should be displayed on the button. public SmallColorButton(string text) { Font = smallButtonFont; diff --git a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/Spacer.cs b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/Spacer.cs index 8f109ab..85398d0 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/Spacer.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/Spacer.cs @@ -2,8 +2,15 @@ using Eto.Forms; namespace AM2RLauncher; +/// +/// A custom control that acts as a spacer between other controls. +/// public class Spacer : Label { + /// + /// Initialize a new . + /// + /// The height of the spacer in pixel. public Spacer(int height) { Height = height; diff --git a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/URLImageButton.cs b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/URLImageButton.cs index 5ffac2f..97505bb 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/URLImageButton.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/CustomControls/URLImageButton.cs @@ -4,8 +4,17 @@ using Pablo.Controls; namespace AM2RLauncher; +/// +/// An , that when clicked opens a URL. +/// public class URLImageButton : ImageButton { + /// + /// Initializes a new + /// + /// The image that should be drawn. + /// The URL that should get opened. + /// The tool tip for the control. public URLImageButton(Bitmap image, string url, string tooltip = "") { Image = image; @@ -14,6 +23,12 @@ public class URLImageButton : ImageButton Click += (_, _) => CrossPlatformOperations.OpenURL(url); } + /// + /// Initializes a new + /// + /// The image as a byte array that should be drawn. + /// The URL that should get opened. + /// The tool tip for the control. public URLImageButton(byte[] image, string url, string tooltip = "") : this(new Bitmap(image), url, tooltip) {