Click here to Skip to main content
16,005,178 members
Home / Discussions / C#
   

C#

 
AnswerRe: Opening a document from a DataTable Pin
Darkness8413-Feb-07 13:53
Darkness8413-Feb-07 13:53 
QuestionUpdating UI/Dataset from serialport Pin
TheTinSoldier13-Feb-07 12:22
TheTinSoldier13-Feb-07 12:22 
AnswerRe: Updating UI/Dataset from serialport Pin
Ed.Poore13-Feb-07 13:15
Ed.Poore13-Feb-07 13:15 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier13-Feb-07 14:35
TheTinSoldier13-Feb-07 14:35 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier13-Feb-07 14:38
TheTinSoldier13-Feb-07 14:38 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore13-Feb-07 22:53
Ed.Poore13-Feb-07 22:53 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier13-Feb-07 23:54
TheTinSoldier13-Feb-07 23:54 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 0:23
Ed.Poore14-Feb-07 0:23 
The article actually needs an update, which will make it simpler to use (removes generics).  I've got the changed code here[^]. Basically from inside your DataReceived handler all you need to do is call:
InvocationHelper.Invoke(this.ChangeValue);
All the delegate is is a pointer to a function (if you know C), if you don't it's basically a variable which stores information about a particular function or method, you can then pass this variable around as a normal variable, and you can also invoke the function the delegate points to as well.

The helper routine basically just bubbles up through the class hiearchy to see if the class implements the interface ISynchronizewhatever, this just defines the Invoke method and means that the class can do things in a thread-safe manner.

PS, generics are quite simple to understand and incredibly useful once you know how.



GeneralRe: Updating UI/Dataset from serialport [modified] Pin
TheTinSoldier14-Feb-07 8:47
TheTinSoldier14-Feb-07 8:47 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 9:25
Ed.Poore14-Feb-07 9:25 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier14-Feb-07 9:46
TheTinSoldier14-Feb-07 9:46 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 9:49
Ed.Poore14-Feb-07 9:49 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier14-Feb-07 11:43
TheTinSoldier14-Feb-07 11:43 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 11:48
Ed.Poore14-Feb-07 11:48 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier14-Feb-07 12:42
TheTinSoldier14-Feb-07 12:42 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 12:55
Ed.Poore14-Feb-07 12:55 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier14-Feb-07 13:30
TheTinSoldier14-Feb-07 13:30 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 13:41
Ed.Poore14-Feb-07 13:41 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 13:17
Ed.Poore14-Feb-07 13:17 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier14-Feb-07 13:46
TheTinSoldier14-Feb-07 13:46 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore14-Feb-07 15:14
Ed.Poore14-Feb-07 15:14 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier15-Feb-07 12:42
TheTinSoldier15-Feb-07 12:42 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore15-Feb-07 14:47
Ed.Poore15-Feb-07 14:47 
GeneralRe: Updating UI/Dataset from serialport Pin
TheTinSoldier17-Feb-07 22:36
TheTinSoldier17-Feb-07 22:36 
GeneralRe: Updating UI/Dataset from serialport Pin
Ed.Poore18-Feb-07 5:22
Ed.Poore18-Feb-07 5:22 

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.