Snippet - N18 Display and Joytick Menu

I just posted N18 Display and Joytick Menu on Codeshare. Feel free to discuss and make suggestions here.

Hey Guys,
im right now working on improving the titling of the Menu items. I already solved how I’m going to do this but i cant add the “System.Text.RegularExpression”

    Method = MenuP[selecteditem - 1];
    Method = Method.Replace(" ", "_");

This is my code, this should replace the spaces with underscores so the Menu Items can have spaces. But I cant use .Replace. I looked it up, I need to add this namespace but it ins’t located in the System assembly

No RegEx on NETMF.

Oh … damn. Do you have any other idea how to resolve this kind of problem

EDIT: My understanding of those things ins’t that high but i was just browsing trough the .NET MF Files and found a System.Text.RegularExpressions.pdb

Here: C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\be

So can’t i just reference this file and can use regex ?

Thats really weird, I looket at this post earlier added the reference and added the using System.Text.RegularExpression, but when i want to use Regex the .Replace doesnt show up :S

EDIT: lol it didn’t save the reference needed to add it again. Now it is working thanks

Hi -Encore-,

Looks like you got my wishlist done except the time/date stuff! Thanks for the kudos in your post.

I scrapped using my code in the project I created it for due to RAM memory issues. The lack of. I was attempting to make a 4 channel 4 to 20mA and 4 digital input data logger with it. I fortunately got the logger going with out it. I was using the Fez Cerberus board. Did you run into any memory issues? I’m now thinking about using this menu system again now.



Yes im am using the cerberus board. Sometimes when im debugging i get messages like “Failed allocation of x blocks, x bytes” , but i dont know if this is a ram issue.

@ -Encore-

Thanks for sharing. Your project gave me an idea, so I looked at your code.

I noticed you have this in the lcdwritetext method:

_font = Resources.GetFont(Resources.FontResources.NinaB);

Doesn’t look like you’re changing the font anywhere else.

Any reason not to put that in the ProgramStarted method so that it’s not called everytime?

@ mhectorgato - That was intentionally, in my current build which is not released right now, you’re able to change the font in the settings. But i still need to fix something, thats why it isn’t out yet.