Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is there any technique available for copying one object of class A to another object of class B ? Pin
Giorgi Dalakishvili5-Aug-10 20:27
mentorGiorgi Dalakishvili5-Aug-10 20:27 
AnswerRe: Is there any technique available for copying one object of class A to another object of class B ? Pin
Bernhard Hiller5-Aug-10 20:33
Bernhard Hiller5-Aug-10 20:33 
GeneralRe: Is there any technique available for copying one object of class A to another object of class B ? [modified] Pin
Nadia Monalisa5-Aug-10 20:41
Nadia Monalisa5-Aug-10 20:41 
GeneralRe: Is there any technique available for copying one object of class A to another object of class B ? Pin
PIEBALDconsult7-Aug-10 4:21
mvePIEBALDconsult7-Aug-10 4:21 
GeneralRe: Is there any technique available for copying one object of class A to another object of class B ? Pin
il_manti3-Nov-10 23:36
il_manti3-Nov-10 23:36 
AnswerRe: Is there any technique available for copying one object of class A to another object of class B ? Pin
Łukasz Nowakowski5-Aug-10 21:41
Łukasz Nowakowski5-Aug-10 21:41 
QuestionBest Way to Go About Updating Forms When A Piece of Data Is Changed Pin
Matt U.5-Aug-10 11:44
Matt U.5-Aug-10 11:44 
AnswerRe: Best Way to Go About Updating Forms When A Piece of Data Is Changed Pin
Chris Trelawny-Ross9-Aug-10 8:23
Chris Trelawny-Ross9-Aug-10 8:23 
Without an in-depth spoken conversation about your application & design, it's hard to be sure what problem you are trying to solve. So, in lieu of that, here's how I might implement your app:

1. Have your artist class (in fact, any class whose data appears in more than one place) implement INotifyPropertyChanged.

2. Any form that modifies data must do it by assigning to a property on the object whose data it displays. You're probably doing this already. (Note - you'll need to use properties, not fields, since the event INotifyPropertyChanged exposes must be raised in a property set accessor).

3. Now, any form that presents artist information must register a handler with the event exposed by that interface; that event handler identifies what property changed and updates the UI accordingly.

By using property notify events at the 'displayed object instance' level, your main application does not need to be involved in the synchronization of content between windows. This will make the main app form 'cleaner' by reducing its responsibilities to ones that are 'application level' - namely selecting what artists/sessions to display, managing windows, etc.

Note that this architecture will cause an immediate refresh of windows showing related data - i.e. it does not wait for the data to be saved. If you want the 'to be refreshed' windows to be updated only after a save, then the the 'modifying' window will need a local copy of the object it is displaying, and must only modify the shared one when saving the new values.

Hope that helps.
QuestionInterface Events Pin
Ian Grech5-Aug-10 10:52
Ian Grech5-Aug-10 10:52 
AnswerRe: Interface Events Pin
PIEBALDconsult5-Aug-10 16:56
mvePIEBALDconsult5-Aug-10 16:56 
AnswerRe: Interface Events Pin
Chris Trelawny-Ross9-Aug-10 8:53
Chris Trelawny-Ross9-Aug-10 8:53 
GeneralRe: Interface Events Pin
Ian Grech13-Aug-10 0:34
Ian Grech13-Aug-10 0:34 
QuestionEfficient way to create a bitmap from a stream of bits in a file Pin
Adam Covitch5-Aug-10 10:50
Adam Covitch5-Aug-10 10:50 
AnswerRe: Efficient way to create a bitmap from a stream of bits in a file Pin
Eddy Vluggen5-Aug-10 11:31
professionalEddy Vluggen5-Aug-10 11:31 
AnswerRe: Efficient way to create a bitmap from a stream of bits in a file Pin
harold aptroot5-Aug-10 11:43
harold aptroot5-Aug-10 11:43 
AnswerRe: Efficient way to create a bitmap from a stream of bits in a file [modified] Pin
Luc Pattyn5-Aug-10 12:03
sitebuilderLuc Pattyn5-Aug-10 12:03 
GeneralRe: Efficient way to create a bitmap from a stream of bits in a file Pin
Adam Covitch9-Aug-10 7:02
Adam Covitch9-Aug-10 7:02 
GeneralRe: Efficient way to create a bitmap from a stream of bits in a file Pin
Luc Pattyn9-Aug-10 7:28
sitebuilderLuc Pattyn9-Aug-10 7:28 
GeneralRe: Efficient way to create a bitmap from a stream of bits in a file Pin
Adam Covitch9-Aug-10 7:34
Adam Covitch9-Aug-10 7:34 
GeneralRe: Efficient way to create a bitmap from a stream of bits in a file Pin
Luc Pattyn9-Aug-10 7:48
sitebuilderLuc Pattyn9-Aug-10 7:48 
Questionclass function Pin
v_neil875-Aug-10 10:46
v_neil875-Aug-10 10:46 
AnswerRe: class function Pin
Pete O'Hanlon5-Aug-10 12:16
mvePete O'Hanlon5-Aug-10 12:16 
QuestionInvoking C code from C# Pin
tamash_ionut5-Aug-10 9:59
tamash_ionut5-Aug-10 9:59 
AnswerRe: Invoking C code from C# Pin
DaveyM695-Aug-10 10:06
professionalDaveyM695-Aug-10 10:06 
AnswerRe: Invoking C code from C# Pin
Luc Pattyn5-Aug-10 12:15
sitebuilderLuc Pattyn5-Aug-10 12:15 

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.