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

[Bug]: KryptonCustomPaletteBase Illegal characters in path #1693

Closed
PWagner1 opened this issue Jul 28, 2024 · 3 comments
Closed

[Bug]: KryptonCustomPaletteBase Illegal characters in path #1693

PWagner1 opened this issue Jul 28, 2024 · 3 comments
Labels
area:toolkit All issues related to the toolkit components. bug Something isn't working fixed This issue has been fixed. version:90 All things to do with V90.
Milestone

Comments

@PWagner1
Copy link
Contributor

Using todays Alpha


Exception Caught

An unexpected error has occurred:

Class: D:\Development\Krypton\Standard-Toolkit\Source\Krypton Components\Krypton.Toolkit\Controls Toolkit\KryptonCustomPaletteBase.cs
Method: PerformUpgrade
Line: 2288
Message: Illegal characters in path.

Stacktrace:
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.GetFileName(String path)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamReader..ctor(String path)
at Krypton.Toolkit.KryptonCustomPaletteBase.PerformUpgrade(Stream stream) in D:\Development\Krypton\Standard-Toolkit\Source\Krypton Components\Krypton.Toolkit\Controls Toolkit\KryptonCustomPaletteBase.cs:line 2259


O&K

@PWagner1 PWagner1 added bug Something isn't working area:toolkit All issues related to the toolkit components. version:90 All things to do with V90. labels Jul 28, 2024
@PWagner1 PWagner1 added this to the Version 90 milestone Jul 28, 2024
@giduac
Copy link
Contributor

giduac commented Aug 15, 2024

@Wagnerp

Can you give some more info please:

  • What is the path that causes this
  • Add a sample program that demonstrates the bug

@giduac giduac self-assigned this Aug 15, 2024
@giduac giduac added the awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. label Aug 15, 2024
@PWagner1
Copy link
Contributor Author

@Wagnerp

Can you give some more info please:

  • What is the path that causes this
  • Add a sample program that demonstrates the bug

@giduac

Yes, so if you try importing & upgrading any custom XML palette in V90, it should trigger the issue. Use the ImportWithUpgrade function, I don't exactly know what's going wrong.

@giduac giduac removed the awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. label Aug 15, 2024
@giduac
Copy link
Contributor

giduac commented Aug 15, 2024

@Wagnerp

Give this a try, as this works normally here with the theme in the code snippet.

        private void kryptonButton4_Click(object sender, EventArgs e)
        {
            KryptonManager kryptonManager = new();
            
            string theme = @"D:\Krypton\Theme-Palettes\Palettes\Other\Asphalt_v19.xml";

            FileStream fileStream  = new FileStream(path: theme, mode: FileMode.Open);

            KryptonCustomPaletteBase kryptonCustomPaletteBase = new();
            kryptonCustomPaletteBase.ImportWithUpgrade(fileStream);

            kryptonManager.GlobalCustomPalette = kryptonCustomPaletteBase;
            kryptonManager.GlobalPaletteMode = PaletteMode.Custom;

            fileStream.Close();
            fileStream.Dispose();
        }

@giduac giduac assigned PWagner1 and unassigned giduac Aug 16, 2024
@PWagner1 PWagner1 added the in progress A fix for this issue is in the works. label Aug 17, 2024
@PWagner1 PWagner1 removed their assignment Aug 18, 2024
@PWagner1 PWagner1 added fixed This issue has been fixed. and removed in progress A fix for this issue is in the works. labels Aug 18, 2024
PWagner1 added a commit that referenced this issue Aug 19, 2024
Smurf-IV added a commit that referenced this issue Aug 20, 2024
…ettebase-illegal-characters-in-path

* Cleanup #1693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:toolkit All issues related to the toolkit components. bug Something isn't working fixed This issue has been fixed. version:90 All things to do with V90.
Projects
None yet
Development

No branches or pull requests

2 participants