Click here to Skip to main content
15,887,294 members
Home / Discussions / C#
   

C#

 
QuestionRe: Passage of events between WinForms Pin
Eddy Vluggen20-Mar-14 6:37
professionalEddy Vluggen20-Mar-14 6:37 
AnswerRe: Passage of events between WinForms Pin
Mario 5620-Mar-14 7:33
Mario 5620-Mar-14 7:33 
GeneralRe: Passage of events between WinForms Pin
Eddy Vluggen20-Mar-14 10:35
professionalEddy Vluggen20-Mar-14 10:35 
GeneralRe: Passage of events between WinForms Pin
Mario 5620-Mar-14 14:44
Mario 5620-Mar-14 14:44 
GeneralRe: Passage of events between WinForms Pin
Eddy Vluggen21-Mar-14 7:29
professionalEddy Vluggen21-Mar-14 7:29 
AnswerRe: Passage of events between WinForms Pin
BobJanova20-Mar-14 8:06
BobJanova20-Mar-14 8:06 
GeneralRe: Passage of events between WinForms Pin
Mario 5620-Mar-14 9:51
Mario 5620-Mar-14 9:51 
GeneralRe: Passage of events between WinForms Pin
BobJanova21-Mar-14 0:20
BobJanova21-Mar-14 0:20 
You can data bind an instance of this Input class to multiple forms. Data binding to something which implements INPC will result in that control being updated when the event's fired.

I think I might have not understood what the 'inputs' are though. I thought you were reading the state of pins on a serial cable or something similar where on and off were both relevant; it seems like you actually want to fire the same handlers when they go to 'on' as when buttons are clicked, and 'off' doesn't matter.

In that case, you should put your processing code in a single place (you can call that class App or StateManager or Processor or other similarly generic things), and have the event handlers on your many forms do nothing except call methods on this central class. This is a classic 3 tier architecture (separation of view, logic and data), except that your data model is probably quite minimal. You can then attach event handlers to whatever mechanism you use to notify changes to the state of the external inputs, which call the same methods. If you need a UI cue to be reflected back to forms, use data binding to classes in the data model which implement INPC.
GeneralRe: Passage of events between WinForms [Solved] Pin
Mario 5621-Mar-14 6:56
Mario 5621-Mar-14 6:56 
QuestionConvert HTML content to Rtf format or save it into Rtf file without the help of interop dll in c# Pin
Member 1068161419-Mar-14 19:09
Member 1068161419-Mar-14 19:09 
AnswerRe: Convert HTML content to Rtf format or save it into Rtf file without the help of interop dll in c# Pin
Eddy Vluggen20-Mar-14 6:34
professionalEddy Vluggen20-Mar-14 6:34 
Questionc# Transform a pictureBox Pin
Ron Wensley19-Mar-14 14:06
professionalRon Wensley19-Mar-14 14:06 
AnswerRe: c# Transform a pictureBox Pin
Dave Kreskowiak19-Mar-14 14:30
mveDave Kreskowiak19-Mar-14 14:30 
GeneralRe: c# Transform a pictureBox Pin
Ron Wensley19-Mar-14 15:03
professionalRon Wensley19-Mar-14 15:03 
GeneralRe: c# Transform a pictureBox Pin
Dave Kreskowiak19-Mar-14 17:10
mveDave Kreskowiak19-Mar-14 17:10 
QuestionProblem with process.startinfo Pin
turbosupramk319-Mar-14 7:09
turbosupramk319-Mar-14 7:09 
AnswerRe: Problem with process.startinfo Pin
Richard Deeming19-Mar-14 7:28
mveRichard Deeming19-Mar-14 7:28 
GeneralRe: Problem with process.startinfo Pin
turbosupramk319-Mar-14 7:33
turbosupramk319-Mar-14 7:33 
SuggestionRe: Problem with process.startinfo Pin
Richard MacCutchan19-Mar-14 7:30
mveRichard MacCutchan19-Mar-14 7:30 
GeneralRe: Problem with process.startinfo Pin
turbosupramk319-Mar-14 7:35
turbosupramk319-Mar-14 7:35 
GeneralRe: Problem with process.startinfo Pin
Richard MacCutchan19-Mar-14 8:20
mveRichard MacCutchan19-Mar-14 8:20 
AnswerRe: Problem with process.startinfo Pin
Eddy Vluggen19-Mar-14 8:09
professionalEddy Vluggen19-Mar-14 8:09 
GeneralRe: Problem with process.startinfo Pin
turbosupramk319-Mar-14 8:26
turbosupramk319-Mar-14 8:26 
AnswerRe: Problem with process.startinfo Pin
Eddy Vluggen20-Mar-14 10:20
professionalEddy Vluggen20-Mar-14 10:20 
GeneralRe: Problem with process.startinfo Pin
turbosupramk320-Mar-14 10:29
turbosupramk320-Mar-14 10:29 

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.