Link to home
Start Free TrialLog in
Avatar of JamesonJendreas
JamesonJendreas

asked on

Visual Studio - Make a quick front end

I think this should be easy - but I  have text file that I have setup pretty much as an ini or cfg file, and I want to know if it how much time and effort it would be to make a GUI front end on Visual Studio.  It's been a while since I've dived into programming (I'm a network guy) - but I should pick it up fairly quickly.

With that preface - I have an a TXT i've pasted below - All I want is a front end where I can choose to display or change the data in the txt.  I'll start with display - from there I can play around with it to build an actual config generator (I'd just start with a default file that gets and edit).    

No need for anything nice looking, this is all for fun.    I  have visual studio (11 beta and an MSDN copy) , but I almost feel like that is overkill.   Any changes to the syntax of the txt is much appreciated (too many 'scripting' languages that I use muddle my brain)  

;Site Survey Config
;0=NO(Bad) 1=YES(Good) {COMMENT_VALUE}=Example_Equation [X+Y] ;=Line_Comment <null>=Optional ""=Text_String 
;Server Room
;Rack
;	RackUnits
		Patch=1
		SGs=1 
		T1k=1
		V_Switch=0
		SA=0
		Server=X
		Mobility=
		Other=0
		U={1+1+1+X}5	{X=2 U=5}
			
;Power
;	Outles
		SG=1
		V_Switch
		SA=0
		T1K=1
		Mobility=0
		Server=2
		Other=0
		O={1+1+X}=4 {X=2 O=4}
;	UPS
		PDU_Outlets=
		Total_LoadVA=
		PreExisting_Load=
		FL_Runtime=
		MakeModel={"<null>"}
;Ethernet
;	Drops
		Needed=
;	Patch
		Cables=3
		
;	LAN_Switch
		Connect_Switch=
		Connect_Port=
		VLANID=
		MakeModel=""
;	POE_Switch
		Location=""
		MakeModel=""
		Configured=0
;	PRI
		PreExist=1
		Extend_Wiring=0
		Backup_Analog_Trunk={Number1,"Loc<null>";Number2,"Loc<null>";...Number`n,"LOC`n<null>"}
		66_Block=0
		110_Block=0
		Analog_Patch=0

;Install
;	Stage
;		POE_Switch
			Ready=0
			MakeModel={"<null>"}
;	Train
;		Room
			Number={"<null>"}
			Available=1
			POE=1
			MakeModel={"<null>"}

Open in new window

Avatar of JamesonJendreas
JamesonJendreas

ASKER

BTW - I'm looking for a starting point, not a solution.

Which may be MFC...
I'd just build something with one or more simple winforms in VB.NET. If you start with http://www.homeandlearn.co.uk/net/nets8p2.html there are a couple pages in the tutorial that will teach you how to read and write to text files.

Read the file and store everything in variables or just the textboxes in the GUI. On the GUI, drag the text boxes and labels where you want them. When the user clicks save, rewrite the file using all of the input from the text boxes.

That's the quick and dirty way to go about it.
Firstly, I would stay away from VB.NET, it's a broken language. C# is much better.
Secondly, if you are going to work in .NET, it would be far simpler to convert your ini text file into an XML config file. Then you would have access to an entire framework of functions that would do most of the work for you.
Is there any reason why you have to stay with an ini text file?
No reason whatsoever.  As mentioned this is kind of a fun side project, trying to freshen up on my programming - it's been a long time.  I am open to any suggestions, a well as building it multiple times and choosing the one I like the most.
Not sure why Orcbighter says VB.NET is a broken language. In my opinion there's a lot of stigma against VB.NET that's unfounded. It's very good at what it's supposed to be good at: rapid application deployment. That being said, C# programmers tend to make more money and there seem to be more companies looking for C# programmers. If you're looking to just have some fun with programming, I still say VB.NET is an easy way to jump back in. If you're looking to get into programming for a carrier and you want a .NET language, than C# would be the better way to go if for no other reason than C# programmers tend to make more money. Another reason to learn C# is that it is similar to other languages. Once you learn the syntax of C#, learning PHP, C, C++, or other languages becomes easier.

Of course, who knows how long VB.NET or C# will be around given that Microsoft is moving in the direction of HTML5 and Javascript. See http://www.i-programmer.info/professional-programmer/i-programmer/2591-dumping-net-microsofts-madness.html and http://arstechnica.com/microsoft/news/2011/06/html5-centric-windows-8-leaves-microsoft-developers-horrified.ars I haven't heard much of an update on if Microsoft has backed down. Even if they do let .NET wither and die, there are a lot of companies invested in it so it should hold on for a number of years. Heck, even the COBOL programmers had jobs back in 1999. :)

I do agree than an XML file would be cleaner to work with, but working with an ini text file wouldn't be too hard since it's not that long and would teach you more about directly reading and writing to files.
Thanks Quizwedge - and I agree.  I am in not trying to get into any type of professional programming, I'm actually a network engineer.   Like I said, this is a fun side project.  i was actually thinking VB.NET from the begging as I am quite familiar with VB (mostly though scripting)

even the COBOL programmers had jobs back in 1999.
Funny thing, the company I worked for from 2004-2008 used an ERP system that was written in COBOL (or at least parts of it).  It was always funny when you'd get a COBOL error.  Granted, the ERP system was originally developed in the 80's and didn't seem to have been updated al lthat much.
Switching from VB to VB.NET should be relatively easy. I went from VB6 to VB.NET and one of my biggest problems was that it was so familiar I had to figure out what VB.NET offered that I didn't know. Let me know if you have any more questions about this that I can answer.
ASKER CERTIFIED SOLUTION
Avatar of Orcbighter
Orcbighter
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial