Hi there,
Three days ago I was reading the fedora webpages, two days ago I started
giving some lessions to two of my friends in Gtk-Sharp and C#. Because
while I was reading the fedora webpages I noticed that fedora is looking
for a dhcpd.conf GUI, it gave me the idea to implement this using Gtk-
Sharp and use it for educating those two friends of mine.
So I asked my "students" to create a GUI and created the parser myself.
The first lession was Gtk-Sharp using Glade-Sharp and also glade-2. The
second lession was Exception handing, recursive function calls, Regular
Expressions, etc etc. So, again, I figured that a "dhcpd.conf"-file
parser in C# would be a great way to explain such stuff :). But they
would probably not yet succeed in getting stuff working yet. So I made
it as a sample for them, so they can study it.
Of course is stuff pretty much unfinished but we have decided to go
ahead and finish the complete application at some point ;). Something
like: Just for Fun, and because that way those two friends have a pretty
good way of learning how to write a Gtk-Sharp application: They learn by
writing a real one from scratch.
I understand that fedora is probably not yet shipping with Mono nor Gtk-
Sharp. So it's possible that such a GUI cannot be used (yet).
Nevertheless I want to share it with you guys. That way you can decide
what you want to do with it. The die-hard python gods will probably want
to port it to python, the die-hard C gods will probably want to port it
to plain C and the perl monks will probably want to create 600 versions
of this application which will all use another method of solving the
problem. Probably will 599 versions use perl regular expressions and 1
version will most likely be never understandable by anybody else than
Larry Wall and the original coder of it. And I say to them: go ahead :).
ps. It's also very possible that just nothing will happen at all. Also
good. Yet, we (because, me too) are learning while programming this
application. So don't kill us for trying to write it. In case you
dislike it, we are not doing it for _you_ anyway.
The Class1.cs is a Console application that will actually parse a dhcpd.
conf file into a few classes (build up in a recursive tree-way). It also
prints some values... for testing. It's not yet integrated with a Gtk-
Sharp GUI (and my students/two friends are still working on the Gtk-
Sharp/Glade-Sharp GUI code).
The attached .glade file is highly unfinished and just a tryout,
actually. It (should) look a lot like the redhat-config-samba tool.
Please do let me know what you think of it. Do fix crab and bugs if
thats what you want to do.
--
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
work: Philip dot VanHoof at cronos dot be
http://www.freax.be,
http://www.freax.eu.org