Jump to content
How to Install Plugins ×

CodeLab v6.12 for Paint.NET 5.0.12 (Updated February 11, 2024)


Recommended Posts

CodeLab 3.3 Released

This is only for Paint.NET 4.0.6+!

 

Big update today...

 

Changes:

▪ Added Posterize to File > New Template (BoltBait)
▪ Comments in the UICode region are ignored (BoltBait)
▪ Added "Auto" to the View > Theme menu. CodeLab now tries to match your paint.net theme. (BoltBait)

▪ On the UI Builder screen, relaxed the validation of the Min, Default, and Max fields. (BoltBait)
▪ Added and fixed some snippets (toe_head2001)
▪ Added Debug Output window (toe_head2001)
▪ Fixed the AutoComplete box erroneously showing after typing var and void (toe_head2001)
▪ Fixed syntax highlighting within #if blocks (toe_head2001)
▪ Fixed some issues in Autocomplete (toe_head2001)
▪ Updated to the latest ScintillaNET editor (toe_head2001)
▪ Fixed Format Document and gave it a shortcut key (Ctrl+M) (toe_head2001)
▪ Other small bug fixes and code refactoring (toe_head2001 and BoltBait)

 

Grab the CodeLab DLL here:

http://www.boltbait.com/pdn/CodeLab/

 

 

Also, for those people stuck in the past (wearing bell bottom pants, running Windows XP with Paint.NET 3.5.11), I ported all of the features from CodeLab version 1.9 through 3.3 into CodeLab version 1.8.  Details here: http://boltbait.com/pdn/CodeLab/History/#v1.8f

 

Screenshots:

CodeLab33UI.png

 

  • Upvote 6
Link to comment
Share on other sites

  • BoltBait changed the title to CodeLab v3.3 (for advanced users) Released February 1, 2018

The easy workaround, of course, is to define your variables separately.

 

After working on CodeLab v3.0-3.3 and v1.8f, user toe_head2001 and I are a little burned out on CodeLab development right now.  So, I imagine version 3.3 will live for a while.

 

(I'm going to be working on rewriting my tutorials, updating my plugins, and trying to get my plugins into the Windows Store.)

 

  • Upvote 4
Link to comment
Share on other sites

Hi @BoltBait, You should take some rest, Changes between Codelab 3.0 & 2.x is as drastic as between pdn 3.x and 4.0. I have a question how to use radio button from codelab.

Also, can you help how to use radio button, when there are more and one options. This time I did it using if-else since it was only two option, but can you explain how more options can be included in coding.

Rl7un0O.png

Link to comment
Share on other sites

5 minutes ago, Pratyush said:

Also, can you help how to use radio button, when there are more and one options. This time I did it using if-else since it was only two option, but can you explain how more options can be included in coding.

 

Use a switch.

switch (Amount3)
{
  case 0:
    // do something cool
    break;
  case 1:
    // do something cooler
    break;    
  case 2:
    // do something more cooler
    break;
  case 3:
    // do the coolest thing
    break;
}
  • Like 1

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

2 minutes ago, toe_head2001 said:

Use a switch.

 

Thanks @toe_head2001. That's exactly what I needed. I was not sure so I simply copied 'Amount3 = 0' from UI on If else block, did my work. I was not sure what to use in switch case i.e. use "case first option, case 2nd option" or was it like "use case 1, case 2 or".

Many thank.

Rl7un0O.png

Link to comment
Share on other sites

On 2/2/2018 at 10:28 AM, BoltBait said:

After working on CodeLab v3.0-3.3 and v1.8f, user toe_head2001 and I are a little burned out on CodeLab development right now.  So, I imagine version 3.3 will live for a while.

 

Lies.

 

I purchased a new laptop last week.  It has a 4K screen which looks amazing.  However, it requires me to run at 200% (minimum, 300% comfortably).  This has uncovered some high DPI issues within CodeLab.

 

I fixed some of those and toe_head2001 is working on the others... plus a cool new feature.

 

So, expect a new build sometime soon.  (This week?)

  • Like 1
  • Upvote 2
Link to comment
Share on other sites

2 hours ago, BoltBait said:

plus a cool new feature

 

It makes coffee??

Link to comment
Share on other sites

Concerning variables declared in sequence... I got the variable parser to successfully detect them.

 

It even works on complex cases like this:

PointF selCenter = new PointF
{
    X = selection.Left + selection.Width / 2f,
    Y = selection.Top + selection.Height / 2f
},
VP = new PointF
{
    X = (float)(selCenter.X + Amount4.First * selCenter.X),
    Y = (float)(selCenter.Y + Amount4.Second * selCenter.Y),
};

selCenter and VP both detected, without any false positives. B)

 

@Pratyush

  • Like 1

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

I have implemented proper detection of Method overloads.

 

Here are some screenshots:

Spoiler

First, here's how it works in v3.3.  It always shows the return type of the 1st overload, and lists no parameters.

oldOverloads.png

 

Here's how it will work in v3.4. It shows the proper return type, and lists parameters.

newOverloads.png

 

Here's another example showing two different overloads for Graphics.FillPolygon()

fillPolyOverloads.png

 

That was the last item on my ToDo list for CodeLab.  ✔️

  • Like 2

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

14 hours ago, toe_head2001 said:

That was the last item on my ToDo list for CodeLab.  ✔️

 

Time for a request then :) I tried the new Switch/Case logic included with C#7.

 

switch (mystring.length)
{
    case int n when (n >= 0 && n <= 25):
    //do this
    break;

    case int n when (n >= 26 && n <= 50 ):
    //do this
    break;
}

 

Didn't work. Any chance this could be implemented please?

 

Thank you for all your work updating CodeLab!

 

 

Link to comment
Share on other sites

48 minutes ago, Ego Eram Reputo said:

Any chance this could be implemented please?

 

Nope.

 

Here's why:

 

CodeLab relies on the compiler that ships with the .NET framework and NOT the compiler that ships with Visual Studio.  This allows CodeLab to work on systems that do not have Visual Studio installed.

 

The .NET compiler (csc.exe) is stuck at C# version 5.0 or 6.0 (I can't remember which).

Link to comment
Share on other sites

That makes sense. Thanks for the informative answer.

 

I'll return to doing multiple cases as I used to.

Link to comment
Share on other sites

I wanted to move a project to outside Codelab in my IDE but got following error

 

"The primary reference "PaintDotNet.Base" could not be resolved because it was built against the ".NETFramework,Version=v4.7" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.2". (MSB3274)"

Rl7un0O.png

Link to comment
Share on other sites

3 minutes ago, Pratyush said:

"The primary reference "PaintDotNet.Base" could not be resolved because it was built against the ".NETFramework,Version=v4.7" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5.2". (MSB3274)"

 

In Visual Studio, you need to open the project properties, and change the Target Framework to .NET v4.7.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

3 minutes ago, Pratyush said:

When I start a project and device to choose a .NET version in latest visual studio, the latest .NET framework version I have is 4.6.2. 

https://www.microsoft.com/en-us/download/details.aspx?id=56119

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Also, in the Visual Studio project properties, as the last item in the list of frameworks, there's an entry "Install other frameworks..." As I recall, it just opens in your browser about the same thing that toe_head2001 linked to. I also recall it was kind of confusing, because there are two things I could do, and I wasn't sure which was the right one to install the framework.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...