Solved

Visual Studio - Make a quick front end

Posted on 2012-03-22
8
255 Views
Last Modified: 2012-03-30
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

0
Comment
Question by:JamesonJendreas
  • 3
  • 3
  • 2
8 Comments
 
LVL 1

Author Comment

by:JamesonJendreas
Comment Utility
BTW - I'm looking for a starting point, not a solution.

Which may be MFC...
0
 
LVL 14

Expert Comment

by:quizwedge
Comment Utility
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.
0
 
LVL 9

Expert Comment

by:Orcbighter
Comment Utility
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?
0
 
LVL 1

Author Comment

by:JamesonJendreas
Comment Utility
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.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 14

Expert Comment

by:quizwedge
Comment Utility
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.
0
 
LVL 1

Author Comment

by:JamesonJendreas
Comment Utility
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.
0
 
LVL 14

Expert Comment

by:quizwedge
Comment Utility
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.
0
 
LVL 9

Accepted Solution

by:
Orcbighter earned 500 total points
Comment Utility
I will have to disagree with the statement made by quizwedge, especially if you are converting VB6 code to VB.NET.
I know you, JamesonJendreas, are probably not converting but are writing new code. However, if you write VB.NET code with the same thinking used in VB6 you are heading for headaches.
That is not to say, not to do it, just be aware of the pitfalls. This article illustrates just some of them:
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/A_3883-Converting-VB6-to-VB-NET.html
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now