Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Visual Studio - Make a quick front end

Posted on 2012-03-22
8
Medium Priority
?
265 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
ID: 37751330
BTW - I'm looking for a starting point, not a solution.

Which may be MFC...
0
 
LVL 14

Expert Comment

by:quizwedge
ID: 37751398
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
ID: 37756499
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

by:JamesonJendreas
ID: 37758235
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
 
LVL 14

Expert Comment

by:quizwedge
ID: 37759215
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
ID: 37759382
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
ID: 37761193
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 2000 total points
ID: 37761894
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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

963 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