I was thinking that I maybe should make some of my code open source?

With all the help that you people have given me on these forums. I was wondering if I could give something back to the community. I was wondering how much of my code that I am willing to make open source would be useful to others.

I was wondering if there are already classes like mine that exist I was also wondering if people would contribute to improving my work if they found any of it useful.

Not the cleverest or coolest contributions but I think they might just help a little.

Here is a list of some of the things:

  • Input validation textfield
    This class checks if your input is valid and colours red with invalid input and colours white if the input is valid. It can check whether the input has a numeric value, whether it is appropriate for an unsigned value (basically if it is 0 or over) and it even allows you to perform your own custom validation checks over the top of what is built-in. I also have a class similar to this to check if your input is above 0 and below 100 for needs involving percentages.

Some of these classes are separate and works needs to be done to combine these classes which is what I have partially done in the past.

  • Improved and updated version of UltraToolbar
    I have made changes to UltraToolbar so that it looks better (not so much a native look though). I have also made changes so it does not use any deprecated items (as far as ‘Analyse Project’ tells me anyway).
    I have gotten rid of the locking feature so that I could make the control movement work inside container controls. So I kind of improved it for people’s certain needs but also got rid of a useful feature.

  • A bunch of useful methods (some of which I did not write but where written for me - a may have to backtrack the authors to give credit)
    Methods include:

  • Clone Picture
    This method saves you the time of having to manually create an instance of a picture with the same width and height of the original picture and then drawing onto that picture. This method allows you to disable alpha (if needed).

  • Convert to boolean
    This method converts string to boolean.

  • Draw Picture (without X and Y parameters)
    This method works exactly the same as the DrawPicture method but does not force to specify X and Y coordinates. It defaults the X and coordinates to 0.

  • GetChar
    Tbh, I cannot remember what this one does. It might even be faulty but if show the code someone might be able to work out what it is for.

  mb = mb.LeftB(index) + mb.RightB(index + 1)
  return mb.Byte(index) + 1
  • MirrorH, Mirror and MirrorV
    I will need to backtrack the person who helped me write this. Basically it mirrors and image vertically or horizontally. This could be good for somebody who is just a hobbyist or is trying grow into a professional. This is a little slow so I would recommend the MBS equivalents once that is in budget.

  • Convert to colour
    Converts string without “&c” written at the start to a colour.

  • Convert to pure hex string
    I believe this method is the opposite of the ‘Convert to colour’. It converts colour to a string and takes the first 6 characters off.

Thanks and please tell me what you think to me making this public

Why not put them on Github or some other source code repository?

Someone else might then improve them as well, benefiting both you and him.

I forget to mention I have a method which can move multiple items in an array left or right. I did not write this method though.

And thanks Markus. I may give it a try. I have never used Github my whole life apart from to download other people’s items.

[quote=115458:@Oliver Scott-Brown]I forget to mention I have a method which can move multiple items in an array left or right. I did not write this method though.

And thanks Markus. I may give it a try. I have never used Github my whole life apart from to download other people’s items.[/quote]
It’s not too hard. DOwnload the desktop app. I’d never used it until this year and I’ve made a small start with 2 repositories.

I have heard it is a little hard to setup but that does not worry me because I do not see how it could be so hard espeically with it being so popular. If something is hard I would expect a third-party script to automate it.

Thanks

No it’s really not hard. Download, point it at a folder, push repository, write your read me file. Done

Obviously there is more to it but it’s pretty easy to get up and running.

[quote=115485:@Mike Charlesworth]No it’s really not hard. Download, point it at a folder, push repository, write your read me file. Done

Obviously there is more to it but it’s pretty easy to get up and running.[/quote]
No worries. Got started already. Thanks

Only posted my ArrayMod though (so far).
https://github.com/oliversb