AndrewDavid Posted October 7, 2021 Share Posted October 7, 2021 (edited) This just started happening. I have built several plugins in codelab, so I know what I am doing. I was building the HSVInvert plugin from Boltbait's tutorial and found this anomaly (another one). Before building the DLL, I created the 150X200 HSVInvert.png and placed it in the same folder as the CS file. When I selected File/Build DLL I got the first error message telling me the .png must be 16X16. Clicking OK took me to the build screen, but no 150X200 .png was showing. I double checked to ensure it was in the same folder. It was. At this time the icon started showing up next to my selection in the drop down menu next to HSVInvert. How can that happen if I haven't built the DLL? Here's a pic to show you what I am seeing. Flames.cs also shows up and has a 150X200 .png built, but it doesn't show up as an icon. That was the last DLL I built. I haven't even built the HSV Effect. Yes - I forgot to name it HSVInvert.sample.png Edited October 7, 2021 by AndrewDavid Removed pic Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 7, 2021 Share Posted October 7, 2021 10 minutes ago, AndrewDavid said: How can that happen if I haven't built the DLL? Here's the code used for icon detection. string imagePath = Path.ChangeExtension(scriptPath, ".png"); if (File.Exists(imagePath)) { recentItem.Image = UIUtil.GetBitmapFromFile(imagePath); } As you can see, your .png file will be used if it has the same name as your .cs file. https://forums.getpaint.net/topic/880-codelab-v63-for-advanced-users-released-september-27-2021/?do=findComment&comment=535123 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 21, 2021 Share Posted November 21, 2021 3 hours ago, BoltBait said: CodeLab v6.4 is released to support version 4.3.3+ of Paint.NET. Tested, Tried and True. Created a codelab build with a RTF file - exported to VS2022 - cleaned up the code (12 Issues), built the DLL, tested in Paint. You would almost think I know what I'm doing. Now - I would imagine adding Form Based to Codelab is practically impossible or a monumentis challenge I have so many issues trying to build a Forms based plugin in VS. I know they are a challenge, but they shouldn't be this difficult without a Template (Hint Hint) Could someone create 1 small form based plugin in VS2022/Net 6.0 to experience some of the issues I have encountered. It doesn't have to really do anything, just get it to display properly. I'll put it on my XMas wish list. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted November 22, 2021 Share Posted November 22, 2021 1 hour ago, AndrewDavid said: cleaned up the code (12 Issues) Were they actually issues? Or did you just blindly accept the Lightbulb suggestions? Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 22, 2021 Share Posted November 22, 2021 I wouldn't say blindly. Issues like simplifying, value is null, removing unnecessary references. The yellow warnings. I have one example that I didn't modify. private void OnWindowHelpButtonClicked(IWin32Window owner, string helpContent) Severity Code Description Project File Line Suppression State Message IDE0060 Remove unused parameter 'owner' ZoomBlurDeluxeEffect C:\Users\Andrew\Desktop\MyVS2022Plugins\ZoomBlurDeluxe\ZoomBlurDeluxeEffect\ZoomBlurDeluxe.cs 160 Active Removing owner just leads to more issues. Project compiles and works correctly. Quote Link to comment Share on other sites More sharing options...
midora Posted November 22, 2021 Share Posted November 22, 2021 6 hours ago, AndrewDavid said: private void OnWindowHelpButtonClicked(IWin32Window owner, string helpContent) The issue with this method is that it's called via reflection. paint.net should provide a method to override. In the moment the compiler guesses that this method is just a private one in your code and nobody calls it. And if owner is not used in the implementation of the method the compiler proposes to remove it. But that's not a good idea because the reflection code will try to set this parameter and fail. So to get rid of the warning you should use the owner parameter. Typically OnWindowHelpButtonClicked shows a dialog or a message box. The Show method of these objects allows to provide an owner as first parameter. I.e. MessageBox.Show(owner, ... This is a good idea because setting this parameter add the dialog to the dialog stack of the application. If the code doesn't use a dialog then try to assign the parameter to itself: owner = owner; (but this may generate an other warning). 1 Quote Link to comment Share on other sites More sharing options...
Red ochre Posted November 25, 2021 Share Posted November 25, 2021 I have just installed the latest paint.net (4.3.3) in 'tandem' with v4.2.16 and v3.5.11 (perhaps that's a tricycle 😄). I decided to name the program folders 'pdn4.3.3', 'pdn4.2.16' and 'pdn3.5.11'. Unfortunately this prevents the codelab v6.4 installer from detecting the installation.... I've just tried renaming the pdn4.3.3 folder back to 'paint.net' - the installer still tells me I have version 0.0 and asks if I want to proceed anyway. I aborted the installer. Is it possible to get the codelab v6.4 .dll without an installer?... or does the 'install anyway' choice allow me to specify a path? Many thanks Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 26, 2021 Share Posted November 26, 2021 1 hour ago, Red ochre said: does the 'install anyway' choice allow me to specify a path? No it does not. It is posted to GitHub should you wish to compile it yourself. Thanks for the heads up about 6.4. Quote Link to comment Share on other sites More sharing options...
Red ochre Posted November 28, 2021 Share Posted November 28, 2021 On 11/25/2021 at 11:40 PM, Red ochre said: I have just installed the latest paint.net (4.3.3) in 'tandem' with v4.2.16 and v3.5.11 (perhaps that's a tricycle 😄). I decided to name the program folders 'pdn4.3.3', 'pdn4.2.16' and 'pdn3.5.11'. Unfortunately this prevents the codelab v6.4 installer from detecting the installation.... I've just tried renaming the pdn4.3.3 folder back to 'paint.net' - the installer still tells me I have version 0.0 and asks if I want to proceed anyway. I aborted the installer. Is it possible to get the codelab v6.4 .dll without an installer?... or does the 'install anyway' choice allow me to specify a path? Many thanks Bump... Is there any way to safely extract the .dll from the installer or could someone share it, please? Would changing the program folder name have messed up a setting in the registry? @AndrewDavid Needing to install VS2022 and work out how to compile from Github seems like overkill! - but thanks anyway. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
otuncelli Posted November 28, 2021 Share Posted November 28, 2021 22 minutes ago, Red ochre said: Bump... Is there any way to safely extract the .dll from the installer or could someone share it, please? Would changing the program folder name have messed up a setting in the registry? @AndrewDavid Needing to install VS2022 and work out how to compile from Github seems like overkill! - but thanks anyway. The installer reads installation path from registry but it can't find it. You should only specify installation path during PDN installation and not change it afterwards. It'll break all plugin installers that tries to detect version/location and it can also mess up your PDN file associations. You can use portable versions. For extracting Codelab.dll, You can use ILSpy to extract the resource. https://github.com/icsharpcode/ILSpy The resource name you'd want to extract is Install.Attachments.Codelab.dll 1 Quote Link to comment Share on other sites More sharing options...
Red ochre Posted November 28, 2021 Share Posted November 28, 2021 2 hours ago, otuncelli said: The installer reads installation path from registry but it can't find it. You should only specify installation path during PDN installation and not change it afterwards. It'll break all plugin installers that tries to detect version/location and it can also mess up your PDN file associations. So I've discovered. 🙄 Thanks for the other advice. I've never used ILspy - I should, when I get the time. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
AndrewDavid Posted December 29, 2021 Share Posted December 29, 2021 Is this intentional? Explorer shows the "Date created" and never changes. Quote Link to comment Share on other sites More sharing options...
otuncelli Posted December 29, 2021 Share Posted December 29, 2021 (edited) @AndrewDavid This issue doesn't seem to be related to CodeLab or maybe I'm missing something? In explorer, right click column header and select "Date modified". This setting is for per folder. If you want it to be default for all folders, click "View menu"->"Options"->"View tab"->"Apply to all Folders" See here for detailed explanation: https://www.guidingtech.com/add-columns-folders-windows-10-file-explorer/ Edited December 29, 2021 by otuncelli 1 Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted December 29, 2021 Share Posted December 29, 2021 56 minutes ago, otuncelli said: "View menu"->"Options"->"View tab"->"Apply to all Folders" Thanks - this resolved the issue. Never knew there was this option. Or - forgot all about it. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted January 5, 2022 Share Posted January 5, 2022 Taken from @BoltBait's examples; I am trying to get "Arial" as the default selection. Yes I have Arial installed. Adamas is the first font I have installed. I have tried running Lesson 4 from Codelab, but the results are the same. I suspect the code to change the default Font selection has changed. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 5, 2022 Share Posted January 5, 2022 2 hours ago, AndrewDavid said: I am trying to get "Arial" as the default selection. Yes I have Arial installed. Adamas is the first font I have installed. I have tried running Lesson 4 from Codelab, but the results are the same. I suspect the code to change the default Font selection has changed. That has never worked in CodeLab. You'll have to take the code generated by CodeLab, and manually edit it. We should probably fix that though. 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
otuncelli Posted January 5, 2022 Share Posted January 5, 2022 (edited) 3 hours ago, toe_head2001 said: That has never worked in CodeLab. You'll have to take the code generated by CodeLab, and manually edit it. We should probably fix that though. I tried to fix this on my fork here: https://github.com/otuncelli/CodeLab Changes: https://github.com/BoltBait/CodeLab/compare/master...otuncelli:master I can create a PR if all seems OK and you're not planning to do something else? Edited January 5, 2022 by otuncelli Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 5, 2022 Share Posted January 5, 2022 6 minutes ago, otuncelli said: I can create a PR if all seems OK and you're not planning to do something else? Awesome; less work for me. I'll review the changes later tonight. 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
BoltBait Posted January 5, 2022 Share Posted January 5, 2022 2 hours ago, otuncelli said: I tried to fix this on my fork here: https://github.com/otuncelli/CodeLab Changes: https://github.com/BoltBait/CodeLab/compare/master...otuncelli:master I can create a PR if all seems OK and you're not planning to do something else? You haven't done anything to the UI Builder screen. Check to see how the Color Wheel control looks/works as far as a default value is handled. Also, how a default of "None" is handled. I'd say, you're about 50% there. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
otuncelli Posted January 6, 2022 Share Posted January 6, 2022 (edited) 4 hours ago, BoltBait said: You haven't done anything to the UI Builder screen. Check to see how the Color Wheel control looks/works as far as a default value is handled. Also, how a default of "None" is handled. I'd say, you're about 50% there. Yes, this is a partial fix. My intention was to fix the issue @AndrewDavid reported without breaking anything else. UI Designer seems to require more work that I can not afford currently. Edited January 6, 2022 by otuncelli Quote Link to comment Share on other sites More sharing options...
BoltBait Posted February 20, 2022 Share Posted February 20, 2022 CodeLab v6.5 Released This is only for Paint.NET 4.3.8+! Quick update today... Changes: ▪ Fix default font name for font control (otuncelli and toe_head2001)▪ Add support for new Folder Chooser control in Paint.NET v4.3.8 (toe_head2001)▪ Add filter toolbar to AutoCompleteBox (toe_head2001)▪ Minor code refactoring and bug fixes (toe_head2001) Grab the CodeLab DLL here: https://www.boltbait.com/pdn/CodeLab/ 2 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
toe_head2001 Posted February 20, 2022 Share Posted February 20, 2022 For those curious, the filter toolbar behaves similarly to one in Visual Studio. When the AutoCompleteBox is opened, the toolbar will display the different groups available. Example 1 Without scrolling through the whole list, we can see there are only Properties and Methods available on this object. And if we click the Properties icon, the other items are hidden: (this filtering already existed in CodeLab, but required keyboard hotkeys) Example 2 Let's only show Enums and Delegates... Easy peasy. Did you notice that black scrollbar? 1 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 10, 2022 Share Posted May 10, 2022 Screenshot of bugfix for @BoltBait Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
BoltBait Posted August 9, 2022 Share Posted August 9, 2022 CodeLab v6.6 Released This is only for Paint.NET 4.3.11+! Quick update today... Just a release of random stuff before we start tackling support for Paint.NET 4.4+ (UI tabs and GPU acceleration) Changes: ▪ Fix auto braces (toe_head2001)▪ Add option to disable auto-complete (toe_head2001)▪ Minor code refactoring and bug fixes (BoltBait and toe_head2001) Grab the CodeLab DLL here: https://www.boltbait.com/pdn/CodeLab/ 2 2 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
toe_head2001 Posted August 9, 2022 Share Posted August 9, 2022 The behavior of the Auto Complete box is designed to match the one found in Visual Studio. There are two reasons someone might want to disable it: The person is not accustom to the C# Auto Complete in Visual Studio, and thinks the behavior is annoying (for example, people that normally code in a language other than C#) Bugs in CodeLab that cause the behavior to deviate from the behavior found in Visual Studio. If you encounter bugs like this, please report them with repro steps! 2 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.