Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
AnswerRe: cross thread issue Pin
Bernhard Hiller26-Mar-14 22:04
Bernhard Hiller26-Mar-14 22:04 
GeneralRe: cross thread issue Pin
Member 1068390227-Mar-14 5:51
Member 1068390227-Mar-14 5:51 
GeneralRe: cross thread issue Pin
BobJanova27-Mar-14 6:54
BobJanova27-Mar-14 6:54 
GeneralRe: cross thread issue Pin
Bernhard Hiller27-Mar-14 23:26
Bernhard Hiller27-Mar-14 23:26 
GeneralRe: cross thread issue Pin
BobJanova28-Mar-14 0:26
BobJanova28-Mar-14 0:26 
SuggestionBUILDING a GUI that talks to two energy-meters through the serial port Pin
Henri Aghaei26-Mar-14 7:51
Henri Aghaei26-Mar-14 7:51 
GeneralRe: BUILDING a GUI that talks to two energy-meters through the serial port Pin
Dave Kreskowiak26-Mar-14 8:38
mveDave Kreskowiak26-Mar-14 8:38 
GeneralRe: BUILDING a GUI that talks to two energy-meters through the serial port Pin
V.27-Mar-14 0:04
professionalV.27-Mar-14 0:04 
In good software design you do not attach a GUI to communicate with electrical systems like that.

1.
First of all start of with a prototype class library that you run in debug. Start creating handlers for communicating with the ports and check the results. (also create unit tests for those). Working with ports means you use machine "resources", which implies cleaning up those resources and also making sure you do not use resources used by other applications (potentially blocking those)
Sending data to the port is probably easy, but reading from it requires some loop OR a callback handler of some sort. There is probably a good tutorial or sample code on the internet, but try to understand before using!

2.
Then you work you way up to business layers or something similar that never communicates to the electrical systems directly, but with the class you wrote in 1. (which you cleaned up, foresaw with sufficient commenting, including intellisense and which is preferably a totally different project. The business layer handles workflow and quality checks of the data. The workflow pumps the data up to the next level.

3.
Create yet again a project that will hold your GUI and that uses the business layer assembly. If you want your GUI to remain responsive you´ll need a backgroundworker.

So for me your steps 1-6 are just one step in the process.
If it is to some interest read my article[^] Poke tongue | ;-P .

Hope this helps!
V.

(MQOTD rules and previous solutions)

OriginalGriff wrote:
V is absolutely right

GeneralRe: BUILDING a GUI that talks to two energy-meters through the serial port Pin
BobJanova27-Mar-14 6:53
BobJanova27-Mar-14 6:53 
GeneralRe: BUILDING a GUI that talks to two energy-meters through the serial port Pin
Henri Aghaei7-Apr-14 9:18
Henri Aghaei7-Apr-14 9:18 
QuestionConvert .mp3 file to .vox in vb.net or c# Pin
Member 1070135326-Mar-14 6:46
Member 1070135326-Mar-14 6:46 
AnswerRe: Convert .mp3 file to .vox in vb.net or c# Pin
Eddy Vluggen26-Mar-14 8:02
professionalEddy Vluggen26-Mar-14 8:02 
GeneralRe: Convert .mp3 file to .vox in vb.net or c# Pin
harold aptroot26-Mar-14 8:26
harold aptroot26-Mar-14 8:26 
QuestionC# Web Forms: Add a context menu to a grid and outside grid also. Pin
AshwiniSH25-Mar-14 23:57
professionalAshwiniSH25-Mar-14 23:57 
AnswerRe: C# Web Forms: Add a context menu to a grid and outside grid also. Pin
Pete O'Hanlon26-Mar-14 0:04
mvePete O'Hanlon26-Mar-14 0:04 
GeneralRe: C# Web Forms: Add a context menu to a grid and outside grid also. Pin
AshwiniSH26-Mar-14 0:12
professionalAshwiniSH26-Mar-14 0:12 
Questionstyle close button extra tab Pin
ebrahim.rayatparvar25-Mar-14 22:27
ebrahim.rayatparvar25-Mar-14 22:27 
AnswerRe: style close button extra tab Pin
BillWoodruff25-Mar-14 23:10
professionalBillWoodruff25-Mar-14 23:10 
GeneralRe: style close button extra tab Pin
ebrahim.rayatparvar25-Mar-14 23:50
ebrahim.rayatparvar25-Mar-14 23:50 
AnswerRe: style close button extra tab Pin
Pete O'Hanlon25-Mar-14 23:10
mvePete O'Hanlon25-Mar-14 23:10 
GeneralRe: style close button extra tab Pin
ebrahim.rayatparvar25-Mar-14 23:52
ebrahim.rayatparvar25-Mar-14 23:52 
GeneralRe: style close button extra tab Pin
Pete O'Hanlon26-Mar-14 0:03
mvePete O'Hanlon26-Mar-14 0:03 
AnswerRe: style close button extra tab Pin
Simon_Whale25-Mar-14 23:12
Simon_Whale25-Mar-14 23:12 
QuestionWhere am I send a request about C# new language feature Pin
Higty25-Mar-14 21:52
Higty25-Mar-14 21:52 
AnswerRe: Where am I send a request about C# new language feature Pin
Chris Quinn25-Mar-14 22:05
Chris Quinn25-Mar-14 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.