Solved

Visual Studio - Make a quick front end

Posted on 2012-03-22
8
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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 500 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

AWS Certified Solutions Architect - Associate

This course has been developed to provide you with the requisite knowledge to not only pass the AWS CSA certification exam but also gain the hands-on experience required to become a qualified AWS Solutions architect working in a real-world environment.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
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…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

632 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