-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Feature Request]: Recursive updating of custom palette XML files #79
Comments
There are some themes in there that carry a version number in the file name. Updating all xml files in a directory structure with a certain number can be done. |
Hi @giduac Need to strip all (or delete) files of Hope this makes sense :) |
Can you please write that out more explicit and complete including the various conditions so we have a clear description of what should happen under which circumstances? |
Hi @giduac Yes sure
|
Some more questions please.
|
Hi @giduac I think I've got it... let me know if you want to see the full code... // Validate output path to check if it exists
ValidateOutputPath(ktxtOutputDirectory.Text);
// Loop through the file array
foreach (var paletteFile in GetPaletteFiles(ktxtInputDirectory.Text))
{
// Upgrade the file and store it into the newly created directory
kcpbUpgrader.ImportWithUpgrade(File.OpenRead(Path.GetFullPath(paletteFile)));
// Export the file
kcpbUpgrader.Export(File.OpenWrite($"{ktxtOutputDirectory}\\{paletteFile}.xml"), false);
} cc. @Smurf-IV |
Yeah sure, push the branch... |
|
@giduac It's still very much alpha software |
So, the logic works, but we hit a snag here... Any ideas @Smurf-IV? |
with which file does that happen? |
You've added an icon to the program that's outside of the repo... Does it happen with a specific file? |
Not enough information in the picture to give an appropriate answer |
Hi @giduac Please retry again using fixes implemented today |
There are a couple of problems in the program which you didn't see when writing the code. A good description and design saves you time and greatly improves quality. This usually delivers better solutions than pulling it from the sleeve on the go! So BACK to the drawing board, BEFORE you continue writing more code. Your previous preliminary list of what the program should accomplish.
Again the questions to:
A plan doesn't have to be written up from the go but can also grow and improved upon.... When you have completed this, reevaluate the code and make a plan to change the code to fall inline with your functional description. Post your findings here when you are done, if you like, and we'll discuss them.... |
Hi @giduac To answer the last reply, I think the code in the ST should be reset back to using 1 schema, rather than having 2. See https://github.com/Krypton-Suite/Standard-Toolkit/blob/811a1f683d0be639e962132ba8548e574642defc/Source/Krypton%20Components/Krypton.Toolkit/Controls%20Toolkit/KryptonCustomPaletteBase.cs As for error/version checking, The new UI design should act as a 'visual' wrapper to use these APIs and to allow bulk upgrading. The current design only allows a user to upgrade 1 file at a time. Linked FR: Krypton-Suite/Standard-Toolkit#1050 |
@Wagnerp Please complete the previous and make a good plan. |
First thing first is to 'rollback' |
@Wagnerp |
Stacktrace: ************** Exception Text ************** ************** Loaded Assemblies **************
|
Why does the code fail there..... |
That, I don't know yet |
Is it because I'm using ktxtOutputDirectory.Text = $@"{Path.GetFullPath(dialog.SelectedPath)}\Palette Version {GlobalStaticValues.CURRENT_SUPPORTED_PALETTE_VERSION}\"; |
If you want know more about strings and how special characters are handled read up on:
What does your plan tell you about where the output should be written to..... |
As per discussion Krypton-Suite/Standard-Toolkit#1552 (comment)
The text was updated successfully, but these errors were encountered: