Many people who post to this forum paste code snippets in their postings. This is great, but unfortunately, the code always looks pretty bad unformatted on the forum. Well, thanks to team member Shade1974, we have now learned that code can be formatted to look good in a posting using the commands (code) (/code) and (color) (/color) in your posting. Note that instead of using the open and closed parentheses () you use the open and closed SQUARE BRACKETS. I can't indicate that here. In any case, Shade1974 wrote some code in .net 2003 that automatically takes your color formatted RTF text and formats it in Phorum-friendly style.
To put it another way, if you are going to post a code sample and you don't want it to look like this:
Private Sub btnZoomOut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
'set the map cursor mode to zoom out
Map.CursorMode = MapWinGIS.tkCursorMode.cmZoomOut
But would rather have it look like this:
Private Sub btnZoomOut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 'set the map cursor mode to zoom out Map.CursorMode = MapWinGIS.tkCursorMode.cmZoomOut End Sub
Then, use this program to format your code snippet:
The source code to this tool is also available from our Subversion repository: [svn.mapwindow.org]
Daniel P. Ames, Ph.D. P.E.
MapWindow Project Team Lead
Civil and Environmental Engineering
Brigham Young University
Edited 5 time(s). Last edit at 07/25/2007 03:07AM by Dan Ames.
But, I need to know how to :
- convert my C# code in RTF
- and "disassemble" the RTF in a forum-parsable format
There's certainly tools or Visual Studio plugings for doing those conversions ? Adding that information to this post will make that feature more useful and interesting.
Thanks for any contribution.
You only need to copy the code and then convert to phorum format.
Copy the result code and paste into the message.
Hope it serves you.
I did download the tool's executable and tried it.
If you don't have your source code transformed with (color)... (/color) commands for keeping the colors of your code, all the tool does is adding a (code) command at the beginning of your source code and (/code) command at the end of your source code, when you run the transformation.
I think before pasting your code, you need to put (by tool or by hand) the color commands and other commands you need for making your code feel nice.
You need to copy the code from VS2005/2008 and past in in the top frame.
Next you hit the convert button and the code is converted and shown in the bottom frame.
Copy the code from the bottom frame in your post and you'll get source code with coloring.
If it is still not clear, mail me at bontepaarden [AT] gmail [D0T] com and I'll make some screenshots and mail it to you.
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
Follow me on Twitter MapWindow_nl to read when a new installer is published.
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
View my profile on LinkedIn
Edited 1 time(s). Last edit at 07/12/2011 05:05PM by Sergei.