When I get the time, I'll take a look at the iweb source in the JD section. I've been away for 2 years but I'm
back and have serious programming fever! LoL!
I hope a section like that can be made. I'd be able to keep the community updated on my progress so they'll
know that tools are in active development and is only a matter of time that tools exist for all server types.
Currently, I am working on a universal AIPolicy Editor that will support the above mentioned five servers.
My plans is for a tool that would open the aipolicy.data file and the software will detect what server it
belongs to. Less headache having one tool that handles all rather than one tool for each. My approach
for this tool is using a, currently unknown, number of DLLs that would be the core of the tool. This
approach will allow simpler updates as one (or more) of the core files would be updated rather than the
whole program. Of course, I'd be using my own server/website for the updates as it has been around for
more than 2 yrs and will continue for another decade or more. Fortunately, it has 99.99% uptime (and,
for a VPS with 2GB RAM, paying only $8 per month isn't bad at all!) so, if it's not up, try again in 10 minutes.
Anyway, here is a quick example of my, current, programming style (for those that are curious):
Code:
[COLOR="#0033ff"]using[/COLOR] System;
[COLOR="#0033ff"]using[/COLOR] System.Text;
[COLOR="#0033ff"]namespace[/COLOR] BSW.AIPolicy.Engine
{
[COLOR="#0033ff"]public class[/COLOR] [COLOR="#00cc99"]ActionSet[/COLOR]
{
[COLOR="#0033ff"]public int[/COLOR] Version { [COLOR="#0033ff"]get[/COLOR]; [COLOR="#0033ff"]set[/COLOR]; }
[COLOR="#0033ff"]public int[/COLOR] Id { [COLOR="#0033ff"]get[/COLOR]; [COLOR="#0033ff"]set[/COLOR]; }
[COLOR="#0033ff"]public byte[/COLOR][] Flags { [COLOR="#0033ff"]get[/COLOR]; [COLOR="#0033ff"]set[/COLOR]; }
[COLOR="#0033ff"]public byte[/COLOR][] ActionSetName { [COLOR="#0033ff"]get[/COLOR]; [COLOR="#0033ff"]set[/COLOR]; }
[COLOR="#0033ff"]public[/COLOR] [COLOR="#00cc99"]Condition[/COLOR] Conditions { [COLOR="#0033ff"]get[/COLOR]; [COLOR="#0033ff"]set[/COLOR]; }
[COLOR="#0033ff"]public int[/COLOR] ProceduresCount { [COLOR="#0033ff"]get[/COLOR]; [COLOR="#0033ff"]set[/COLOR]; }
[COLOR="#0033ff"]public[/COLOR] [COLOR="#00cc99"]Procedure[/COLOR][] Procedures { [COLOR="#0033ff"]get[/COLOR]; [COLOR="#0033ff"]set[/COLOR]; }
[COLOR="#0033ff"]public string[/COLOR] Name
{
[COLOR="#0033ff"]get[/COLOR]
{
[COLOR="#0033ff"]return[/COLOR] [COLOR="#00cc99"]Encoding[/COLOR].GetEncoding([COLOR="#ff9900"]"GB18030"[/COLOR]).GetString(ActionSetName);
}
[COLOR="#0033ff"]set[/COLOR]
{
[COLOR="#00cc99"]Array[/COLOR].Copy([COLOR="#00cc99"]Encoding[/COLOR].GetEncoding([COLOR="#ff9900"]"GB18030"[/COLOR]).GetBytes([COLOR="#0033ff"]value[/COLOR]), [COLOR="#0033ff"]new byte[/COLOR][[COLOR="#cc6699"]128[/COLOR]],
([COLOR="#0033ff"]new byte[/COLOR][[COLOR="#cc6699"]128[/COLOR]]).Length > [COLOR="#00cc99"]Encoding[/COLOR].GetEncoding([COLOR="#ff9900"]"GB18030"[/COLOR]).GetBytes([COLOR="#0033ff"]value[/COLOR]).Length
? [COLOR="#00cc99"]Encoding[/COLOR].GetEncoding([COLOR="#ff9900"]"GB18030"[/COLOR]).GetBytes([COLOR="#0033ff"]value[/COLOR]).Length
: ([COLOR="#0033ff"]new byte[/COLOR][[COLOR="#cc6699"]128[/COLOR]]).Length);
ActionSetName = ([COLOR="#0033ff"]new byte[/COLOR][[COLOR="#cc6699"]128[/COLOR]]);
}
}
}
}
That's the beauty of C#; you can do a lot with just a little bit of code. Or, maybe... it's just... if I can get
a lot done with little work, I'm going to take that approach? I prefer compact and tight code (maybe
that trait is from my (ancient) past experience of writing programs in x86 16 and 32 bit assembly).
~Bey