8 Replies - 633 Views - Last Post: 06 October 2015 - 07:24 AM Rate Topic: -----

#1 Akerr315  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 01-October 15

Display & Record Data Stings in C# Form

Posted 05 October 2015 - 10:14 AM

Hello,

I am new to C# and trying to create a windows based application that records information / data from a device that displays weight readings. I plan to connect via Ethernet TCP/IP to retrieve the data from my device. My questions is: How do I go about displaying the actual weight reading in my Form? The idea is to have a print key in the application that an operator would press to capture the weight and then record it to a MS database. Any help would be greatly appreciated.

Thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: Display & Record Data Stings in C# Form

#2 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Display & Record Data Stings in C# Form

Posted 05 October 2015 - 10:21 AM

The problem here is that all you have an idea. A "what I want to do". What's your programming background? How much C# do you know? Does the device already support the mechanism you want to communicate on?

There's so many open questions at this stage. Without knowing what kind of device at the very least, we literally have no advice we can give. You're not there yet.

Here's how I deal with new projects: I break them down into their various parts and try to prove them individually. Then I work to put them together.

The real "meat" of your problem is going to be reading from your device on command. So, start by making a simple console application that reads from the device when run, then prints the results to a console screen.

Then mock up a UI. Don't worry about making all the parts work, just learn how to use WPF or Windows Forms or ASP.NET (depending on which tech you choose).

Once you know about UIs and you've been able to get the values from your device, it should be easy to put them together.
Was This Post Helpful? 0
  • +
  • -

#3 Akerr315  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 01-October 15

Re: Display & Record Data Stings in C# Form

Posted 05 October 2015 - 10:28 AM

Curtis,

I really appreciate the positive feedback and thanks for the support. I am very new to programming as you can tell. I will take you up on your advice regarding new projects. I hope to be back soon with an update. Do you have any recommendations on where a beginner should start?

Take care!
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • the case is sol-ved
  • member icon

Reputation: 6379
  • View blog
  • Posts: 25,772
  • Joined: 12-December 12

Re: Display & Record Data Stings in C# Form

Posted 05 October 2015 - 10:28 AM

post deleted

This post has been edited by andrewsw: 05 October 2015 - 10:28 AM

Was This Post Helpful? 0
  • +
  • -

#5 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Display & Record Data Stings in C# Form

Posted 05 October 2015 - 10:47 AM

Quote

I am very new to programming as you can tell. I will take you up on your advice regarding new projects. I hope to be back soon with an update. Do you have any recommendations on where a beginner should start?


Well, the first thing I'd suggest is put this project temporarily on hold. It involves a lot of what I'd call "intermediate" skills, like reading from a TCP/IP stream and using a GUI. If I were you, I'd get a beginner's C# book or find a beginner's tutorial series to get more familiar with the concepts involved. If you're looking for a book, the more recently published, the better. C# doesn't evolve as fast as some other languages out there, but faster than many others (Java, to name a big example). A new version was released this year.

Programming isn't like building with LEGOs. It's not just about snapping the pieces that fit together. It involves a fair amount of planning and a more than fair amount of understanding not only the components involved, but the concepts of the particular programming paradigm that your language uses. C# is primarily Object Oriented, with some Functional aspects, for example. So we can't just tell you "you need X, Y, and Z to do the job."
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6507
  • View blog
  • Posts: 14,373
  • Joined: 02-June 10

Re: Display & Record Data Stings in C# Form

Posted 05 October 2015 - 03:37 PM


My standard beginner resources post - Updated June 2013


Plan your study route:
There are three routes people seem to take when learning programming.
  • Just start trying to create programs, commonly text adventures or DnD or some other game. Games are truly the worst thing to start with.
  • Start taking apart other programs and try to figure out the language by reverse engineering
  • Follow a guided learning course (school or self-teaching books)


For the life of me I can't figure out why people try 1 & 2. I strongly suggest taking the guided learning approach. Those book authors go in a certain order for a reason: They know what they're doing and they know the best order to learn the materials.

  • First learn the language by working 2-5 "Learn C# in 30 days" type books cover to cover.
  • Do a dozen on-line tutorial projects where you build what you're told to build, the way you are told to build it WITH AN EXPLANATION OF WHY so you can learn.
  • Learn to plan before you type.
  • THEN you start designing software with a purpose.


Why are you still building in WinForms?

Quote

"old 1990's WinForms"? i just use visual studio 2015 and started up with a windows form. didn't know there was an option for a newer winform?

WinForms is OLD. Virtually 'legacy' and to many of us nearly considered end-of-life. There are still placing building new projects in it, but I wouldn't work for anyplace that wanted to hold me back by two decades. There are probably tens of thousands of legacy WinForms applications in use in countless companies. "If it ain't broke, don't fix it." in other words: If there isn't a financial gain to be made in re-writing them right now why invest the time and money?

But with decades of WinForms comes developers with decades more experience than you'll have and you have no way to compete with them. Let the legacy developer maintain the legacy applications. Many of them are too stuck in their ways to move forward to WPF. Which is why if you look at job boards, what companies are hiring for and have been looking for, for the last several years its: WPF/MVVM.

So if I were you I would just jump right to WPF. Don't worry about WinForms unless you have a deliberate need for it down the line. Otherwise you spend 10,000 hours getting good at WinForms only to find you need to spend another 7,500 hours bringing your skillset forward several years into WPF - And at the same time break all the bad habits you learned in WinForms.

If some company hires you for WPF development, but would also like it if you could maintain some legacy applications THEN learn WinForms; and take your good habits from WPF with you.




I don't learn from reading books: I learn by doing.
Spoiler


Newbie/Rookie said:

I have little/no programming experience but I need to write a program by Friday that does XYZ.
Spoiler



Resources, references and suggestions for new programmers.
Spoiler

Was This Post Helpful? 0
  • +
  • -

#7 Akerr315  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 01-October 15

Re: Display & Record Data Stings in C# Form

Posted 06 October 2015 - 06:23 AM

tlhIn`toq Icon,

Thank you for your response. In all honesty I wasn't expecting this level of feed back so I appreciate it. There are similar applications on the market today that I have worked with and have seen developers use something similar to the WPF programming. I did some research and have decided to take your advice and start learning WPF. There seems to be a lot of references to MVVM. Do you recommend I get familiar with MVVM?

Thanks again!
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5895
  • View blog
  • Posts: 20,130
  • Joined: 05-May 12

Re: Display & Record Data Stings in C# Form

Posted 06 October 2015 - 07:22 AM

If you want to use WPF the way it was meant to be used, the MVVM is essential. You could use WPF following a MVP or MVC pattern but people will look at you funny, but accept it. You could use WPF using the old Win32 or WinForms style of programming and people will laugh at you.
Was This Post Helpful? 0
  • +
  • -

#9 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: Display & Record Data Stings in C# Form

Posted 06 October 2015 - 07:24 AM

Quote

Do you recommend I get familiar with MVVM


WPF embraces the MVVM, so if you're going to learn WPF (which I'd suggest over Windows Forms), then you absolutely should. On the other hand, start by learning C# with no UI framework; just the console. That will help you solidify certain concepts without the distraction of higher concepts like design patterns (which MVVM is).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1