Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* Implement #1089 #1122

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
=======

## 2023-11-xx - Build 2311 - November 2023
* Implemented [#1089](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1089), `KryptonProgressBar` in StatusStrips
* Resolved [#1072](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1072), Clicking "RootItem->Items" in a designer causes an exception to be thrown
* Resolved [#1109](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1109), KryptonPropertyGrid 'jagged' text
* Resolved [#1108](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1108), KryptonPropertyGrid background colour/text don't display correctly for some (most) themes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#region BSD License
/*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2023 - 2023. All rights reserved.
*/
#endregion


namespace Krypton.Toolkit
{
/*[ToolboxItem(false)]
[ToolboxBitmap(typeof(KryptonButton), "ToolboxBitmaps.KryptonButton.bmp")]
[DesignerCategory(@"code")]
[DesignTimeVisible(false)]
[DefaultProperty(nameof(Value))]
[DefaultEvent(nameof(ProgressChanged))]
public class KryptonContextMenuProgressBar : KryptonContextMenuItemBase
{
public override int ItemChildCount { get; }

public override KryptonContextMenuItemBase? this[int index] => throw new NotImplementedException();

public override bool ProcessShortcut(Keys keyData)
{
throw new NotImplementedException();
}

public override ViewBase GenerateView(IContextMenuProvider provider, object parent, ViewLayoutStack columns, bool standardStyle,
bool imageColumn)
{
throw new NotImplementedException();
}
}*/
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public override DesignerActionItemCollection GetSortedActionItems()
actions.Add(new KryptonDesignerActionItem(new DesignerVerb(@"Populate from Base", OnPopulateClick), "Actions"));
actions.Add(new KryptonDesignerActionItem(new DesignerVerb(@"Import from Xml file...", OnImportClick), "Actions"));
actions.Add(new KryptonDesignerActionItem(new DesignerVerb(@"Export to Xml file...", OnExportClick), "Actions"));
actions.Add(new KryptonDesignerActionItem(new DesignerVerb(@"Export theme to binary", OnExportToBinaryClick), "Actions"));
actions.Add(new KryptonDesignerActionItem(new DesignerVerb(@"Upgrade Palette", OnUpgradePalette), "Actions"));
// TODO: Uncomment when binary serialisation is implemented
//actions.Add(new KryptonDesignerActionItem(new DesignerVerb(@"Export theme to binary", OnExportToBinaryClick), "Actions"));
}

return actions;
Expand Down Expand Up @@ -102,6 +104,35 @@ private void OnImportClick(object sender, EventArgs e)

private void OnExportClick(object sender, EventArgs e) => _palette?.Export();

private void OnUpgradePalette(object sender, EventArgs e)
{
try
{
using var kofd = new KryptonOpenFileDialog
{
CheckFileExists = true,
CheckPathExists = true,
DefaultExt = @"xml",
Filter = @"Palette files (*.xml)|*.xml|All files (*.*)|(*.*)",
Title = @"Load Custom Palette"
};

string paletteFileName = (kofd.ShowDialog() == DialogResult.OK)
? kofd.FileName
: string.Empty;
if (string.IsNullOrWhiteSpace(paletteFileName))
{
return;
}

_palette.ImportWithUpgrade(File.OpenRead(paletteFileName));
}
catch (Exception exc)
{
ExceptionHandler.CaptureException(exc);
}
}

private void OnExportToBinaryClick(object sender, EventArgs e) => DebugTools.NotImplemented(@"OnExportToBinaryClick", @"KryptonPaletteActionList", 105);

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private void InitializeComponent()
_buttonDelete.ImageAlign = ContentAlignment.MiddleLeft;
_buttonDelete.ImageIndex = 9;
_buttonDelete.ImageList = _imageList;
_buttonDelete.Location = new Point( 316, 688);
_buttonDelete.Location = new Point(316, 688);
_buttonDelete.Name = nameof(_buttonDelete);
_buttonDelete.Size = new Size(184, 32);
_buttonDelete.TabIndex = 14;
Expand All @@ -355,7 +355,7 @@ private void InitializeComponent()
_buttonMoveUp.ImageAlign = ContentAlignment.MiddleLeft;
_buttonMoveUp.ImageIndex = 10;
_buttonMoveUp.ImageList = _imageList;
_buttonMoveUp.Location = new Point( 21, 29);
_buttonMoveUp.Location = new Point(21, 29);
_buttonMoveUp.Name = nameof(_buttonMoveUp);
_buttonMoveUp.Size = new Size(184, 32);
_buttonMoveUp.TabIndex = 1;
Expand All @@ -370,7 +370,7 @@ private void InitializeComponent()
_buttonMoveDown.ImageAlign = ContentAlignment.MiddleLeft;
_buttonMoveDown.ImageIndex = 11;
_buttonMoveDown.ImageList = _imageList;
_buttonMoveDown.Location = new Point( 21, 70);
_buttonMoveDown.Location = new Point(21, 70);
_buttonMoveDown.Name = nameof(_buttonMoveDown);
_buttonMoveDown.Size = new Size(184, 32);
_buttonMoveDown.TabIndex = 2;
Expand All @@ -385,7 +385,7 @@ private void InitializeComponent()
_buttonAddCheckBox.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddCheckBox.ImageIndex = 6;
_buttonAddCheckBox.ImageList = _imageList;
_buttonAddCheckBox.Location = new Point( 21, 275);
_buttonAddCheckBox.Location = new Point(21, 275);
_buttonAddCheckBox.Name = nameof(_buttonAddCheckBox);
_buttonAddCheckBox.Size = new Size(184, 32);
_buttonAddCheckBox.TabIndex = 7;
Expand All @@ -400,7 +400,7 @@ private void InitializeComponent()
_buttonAddCheckButton.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddCheckButton.ImageIndex = 7;
_buttonAddCheckButton.ImageList = _imageList;
_buttonAddCheckButton.Location = new Point( 21, 316);
_buttonAddCheckButton.Location = new Point(21, 316);
_buttonAddCheckButton.Name = nameof(_buttonAddCheckButton);
_buttonAddCheckButton.Size = new Size(184, 32);
_buttonAddCheckButton.TabIndex = 8;
Expand All @@ -415,7 +415,7 @@ private void InitializeComponent()
_buttonAddRadioButton.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddRadioButton.ImageIndex = 5;
_buttonAddRadioButton.ImageList = _imageList;
_buttonAddRadioButton.Location = new Point( 21, 357);
_buttonAddRadioButton.Location = new Point(21, 357);
_buttonAddRadioButton.Name = nameof(_buttonAddRadioButton);
_buttonAddRadioButton.Size = new Size(184, 32);
_buttonAddRadioButton.TabIndex = 9;
Expand All @@ -430,7 +430,7 @@ private void InitializeComponent()
_buttonAddLinkLabel.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddLinkLabel.ImageIndex = 8;
_buttonAddLinkLabel.ImageList = _imageList;
_buttonAddLinkLabel.Location = new Point( 21, 398);
_buttonAddLinkLabel.Location = new Point(21, 398);
_buttonAddLinkLabel.Name = nameof(_buttonAddLinkLabel);
_buttonAddLinkLabel.Size = new Size(184, 32);
_buttonAddLinkLabel.TabIndex = 10;
Expand All @@ -445,7 +445,7 @@ private void InitializeComponent()
_buttonAddSeparator.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddSeparator.ImageIndex = 4;
_buttonAddSeparator.ImageList = _imageList;
_buttonAddSeparator.Location = new Point( 21, 234);
_buttonAddSeparator.Location = new Point(21, 234);
_buttonAddSeparator.Name = nameof(_buttonAddSeparator);
_buttonAddSeparator.Size = new Size(184, 32);
_buttonAddSeparator.TabIndex = 6;
Expand All @@ -460,7 +460,7 @@ private void InitializeComponent()
_buttonAddItem.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddItem.ImageIndex = 2;
_buttonAddItem.ImageList = _imageList;
_buttonAddItem.Location = new Point( 21, 111);
_buttonAddItem.Location = new Point(21, 111);
_buttonAddItem.Name = nameof(_buttonAddItem);
_buttonAddItem.Size = new Size(184, 32);
_buttonAddItem.TabIndex = 3;
Expand All @@ -475,7 +475,7 @@ private void InitializeComponent()
_buttonAddItems.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddItems.ImageIndex = 3;
_buttonAddItems.ImageList = _imageList;
_buttonAddItems.Location = new Point( 21, 152);
_buttonAddItems.Location = new Point(21, 152);
_buttonAddItems.Name = nameof(_buttonAddItems);
_buttonAddItems.Size = new Size(184, 32);
_buttonAddItems.TabIndex = 4;
Expand All @@ -490,7 +490,7 @@ private void InitializeComponent()
_buttonAddHeading.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddHeading.ImageIndex = 1;
_buttonAddHeading.ImageList = _imageList;
_buttonAddHeading.Location = new Point( 21, 193);
_buttonAddHeading.Location = new Point(21, 193);
_buttonAddHeading.Name = nameof(_buttonAddHeading);
_buttonAddHeading.Size = new Size(184, 32);
_buttonAddHeading.TabIndex = 5;
Expand All @@ -505,7 +505,7 @@ private void InitializeComponent()
_buttonAddMonthCalendar.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddMonthCalendar.ImageIndex = 13;
_buttonAddMonthCalendar.ImageList = _imageList;
_buttonAddMonthCalendar.Location = new Point( 21, 521);
_buttonAddMonthCalendar.Location = new Point(21, 521);
_buttonAddMonthCalendar.Name = nameof(_buttonAddMonthCalendar);
_buttonAddMonthCalendar.Size = new Size(184, 32);
_buttonAddMonthCalendar.TabIndex = 13;
Expand Down Expand Up @@ -539,7 +539,7 @@ private void InitializeComponent()
_buttonAddColorColumns.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddColorColumns.ImageIndex = 0;
_buttonAddColorColumns.ImageList = _imageList;
_buttonAddColorColumns.Location = new Point( 21, 439);
_buttonAddColorColumns.Location = new Point(21, 439);
_buttonAddColorColumns.Name = nameof(_buttonAddColorColumns);
_buttonAddColorColumns.Size = new Size(184, 32);
_buttonAddColorColumns.TabIndex = 11;
Expand All @@ -554,7 +554,7 @@ private void InitializeComponent()
_buttonAddImageSelect.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddImageSelect.ImageIndex = 12;
_buttonAddImageSelect.ImageList = _imageList;
_buttonAddImageSelect.Location = new Point( 21, 480);
_buttonAddImageSelect.Location = new Point(21, 480);
_buttonAddImageSelect.Name = nameof(_buttonAddImageSelect);
_buttonAddImageSelect.Size = new Size(184, 32);
_buttonAddImageSelect.TabIndex = 12;
Expand All @@ -569,7 +569,7 @@ private void InitializeComponent()
_buttonAddComboBox.ImageAlign = ContentAlignment.MiddleLeft;
_buttonAddComboBox.ImageIndex = 14;
_buttonAddComboBox.ImageList = _imageList;
_buttonAddComboBox.Location = new Point( 21, 562);
_buttonAddComboBox.Location = new Point(21, 562);
_buttonAddComboBox.Name = nameof(_buttonAddComboBox);
_buttonAddComboBox.Size = new Size(184, 32);
_buttonAddComboBox.TabIndex = 14;
Expand Down
Loading