Skip to content

Commit

Permalink
Merge pull request #1021 from Krypton-Suite/alpha-kmbox
Browse files Browse the repository at this point in the history
Alpha kmbox
  • Loading branch information
Smurf-IV authored May 28, 2023
2 parents 95c5201 + a85dac9 commit 3df847f
Show file tree
Hide file tree
Showing 10 changed files with 494 additions and 145 deletions.
6 changes: 6 additions & 0 deletions Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
=======

## 2023-11-xx - Build 2311 - November 2023
* Added ability to embed links into the `KryptonMessageBox` content. The new options are:-
- `ContentAreaType` - Defines content area type of a `KryptonMessageBox`, default is normal
- `LinkLabelCommand` - Specifies a `KryptonCommand` if using the `MessageBoxContentAreaType.LinkLabel` type.
- `LinkLaunchArgument` - Specifies the `ProcessStartInfo` if a `LinkLabelCommand` has not been defined.
- `LinkAreaStart` - Specifies the start of a link if using the `MessageBoxContentAreaType.LinkLabel` type.
- `LinkAreaEnd` - Specifies the end of a link if using the `MessageBoxContentAreaType.LinkLabel` type.
* Added `KryptonLanguageManager` to the `KryptonManager` action list
* Resolved [#1008](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1008), Krypton Save/Open file dialogs are not accessible from the toolbox
* Implemented [#1007](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1007), A way to alter all of the strings in the toolkit to language specific strings
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public double Opacity

#endregion

#region methods
#region Implementation

#region public methods

Expand Down Expand Up @@ -605,61 +605,61 @@ protected override void OnMouseDown(MouseEventArgs e)
switch (e.Button)
{
case MouseButtons.Left:
{
// prevents showing the context menu if pressing the right mouse
// button while holding the left
ContextMenuStrip = null;

Point mouseLocation = e.Location;

if (_thumbRectangle.Contains(mouseLocation))
{
_thumbClicked = true;
_thumbPosition = _orientation == ScrollBarOrientation.Vertical ? mouseLocation.Y - _thumbRectangle.Y : mouseLocation.X - _thumbRectangle.X;
_thumbState = ScrollBarState.Pressed;
// prevents showing the context menu if pressing the right mouse
// button while holding the left
ContextMenuStrip = null;

Invalidate(_thumbRectangle);
}
else if (_topArrowRectangle.Contains(mouseLocation))
{
_topArrowClicked = true;
_topButtonState = ScrollBarArrowButtonState.UpPressed;
Point mouseLocation = e.Location;

Invalidate(_topArrowRectangle);

ProgressThumb(true);
}
else if (_bottomArrowRectangle.Contains(mouseLocation))
{
_bottomArrowClicked = true;
_bottomButtonState = ScrollBarArrowButtonState.DownPressed;
if (_thumbRectangle.Contains(mouseLocation))
{
_thumbClicked = true;
_thumbPosition = _orientation == ScrollBarOrientation.Vertical ? mouseLocation.Y - _thumbRectangle.Y : mouseLocation.X - _thumbRectangle.X;
_thumbState = ScrollBarState.Pressed;

Invalidate(_bottomArrowRectangle);
Invalidate(_thumbRectangle);
}
else if (_topArrowRectangle.Contains(mouseLocation))
{
_topArrowClicked = true;
_topButtonState = ScrollBarArrowButtonState.UpPressed;

ProgressThumb(true);
}
else
{
_trackPosition =
_orientation == ScrollBarOrientation.Vertical ?
mouseLocation.Y : mouseLocation.X;
Invalidate(_topArrowRectangle);

if (_trackPosition <
(_orientation == ScrollBarOrientation.Vertical ?
_thumbRectangle.Y : _thumbRectangle.X))
ProgressThumb(true);
}
else if (_bottomArrowRectangle.Contains(mouseLocation))
{
_topBarClicked = true;
_bottomArrowClicked = true;
_bottomButtonState = ScrollBarArrowButtonState.DownPressed;

Invalidate(_bottomArrowRectangle);

ProgressThumb(true);
}
else
{
_bottomBarClicked = true;
_trackPosition =
_orientation == ScrollBarOrientation.Vertical ?
mouseLocation.Y : mouseLocation.X;

if (_trackPosition <
(_orientation == ScrollBarOrientation.Vertical ?
_thumbRectangle.Y : _thumbRectangle.X))
{
_topBarClicked = true;
}
else
{
_bottomBarClicked = true;
}

ProgressThumb(true);
}

ProgressThumb(true);
break;
}

break;
}
case MouseButtons.Right:
_trackPosition =
_orientation == ScrollBarOrientation.Vertical ? e.Y : e.X;
Expand Down Expand Up @@ -948,18 +948,18 @@ protected override bool ProcessDialogKey(Keys keyData)

return true;
case Keys.PageDown:
{
if (_value + _largeChange > _maximum)
{
Value = _maximum;
}
else
{
Value += _largeChange;
}
if (_value + _largeChange > _maximum)
{
Value = _maximum;
}
else
{
Value += _largeChange;
}

return true;
}
return true;
}
case Keys.Home:
Value = _minimum;

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3df847f

Please sign in to comment.