Click here to Skip to main content
15,560,126 members
Home / Discussions / C#
   

C#

 
AnswerRe: inserting Hyperlink inside windows form Pin
OriginalGriff8-May-09 0:31
mveOriginalGriff8-May-09 0:31 
GeneralRe: inserting Hyperlink inside windows form Pin
shabya8-May-09 2:26
shabya8-May-09 2:26 
AnswerRe: inserting Hyperlink inside windows form Pin
MickCurley8-May-09 1:00
MickCurley8-May-09 1:00 
GeneralRe: inserting Hyperlink inside windows form Pin
shabya8-May-09 2:28
shabya8-May-09 2:28 
AnswerRe: inserting Hyperlink inside windows form Pin
MumbleB8-May-09 1:48
MumbleB8-May-09 1:48 
GeneralRe: inserting Hyperlink inside windows form Pin
shabya8-May-09 2:26
shabya8-May-09 2:26 
QuestionGlobal ( sort of) event ? Pin
Noctris8-May-09 0:19
Noctris8-May-09 0:19 
AnswerRe: Global ( sort of) event ? Pin
Jimmanuel8-May-09 2:08
Jimmanuel8-May-09 2:08 
Classes shouldn't be raising events that are defined in other classes. If a class MyClient contains some event then it should be up to that MyClient object to determine when to fire it.

If other classes need to manipulate the internal members of the MyClient then there should be some methods to allow controlled access to them. Some of those methods could in turn cause the internal events to be fired.

If you want child classes to be able to add/remove/etc stuff from MyClients Q, the first job is to make the MyClient accessible by whatever objects need it, either by passing around a reference to it, making a static singleton, or by some other method. Then you can add methods to the MyClient like this:

class MyClient
{
  public void AddToQueue(object thingToQ)
  {
    // do whatever you need to add the item to the Q

    if (FilecountChanged != null)
    {
      // fire the event to notify other clients
    }
  }
}


P.S. code tags make text red, pre tags preserve formatting so they're better for code snippets



GeneralRe: Global ( sort of) event ? Pin
Noctris9-May-09 9:10
Noctris9-May-09 9:10 
GeneralRe: Global ( sort of) event ? Pin
Jimmanuel9-May-09 11:08
Jimmanuel9-May-09 11:08 
Questionhow to include Sql Server 2000 database in a setup project? Pin
lockepeak7-May-09 23:44
lockepeak7-May-09 23:44 
AnswerRe: how to include Sql Server 2000 database in a setup project? Pin
Noctris8-May-09 1:00
Noctris8-May-09 1:00 
QuestionBrowser content not to visible to user intially for sometime? Pin
svt gdwl7-May-09 23:30
svt gdwl7-May-09 23:30 
QuestionHow to lock the msi setup for a specific period? Pin
svt gdwl7-May-09 23:20
svt gdwl7-May-09 23:20 
QuestionGPS/GSM application Pin
Nanyoe7-May-09 23:09
Nanyoe7-May-09 23:09 
Questionusing printer driver in vb,net Pin
tauras817-May-09 22:06
tauras817-May-09 22:06 
AnswerRe: using printer driver in vb,net Pin
Mycroft Holmes7-May-09 22:39
professionalMycroft Holmes7-May-09 22:39 
Questionc# Trackbar Arrowkeys bug Pin
VoNa197-May-09 21:32
VoNa197-May-09 21:32 
AnswerRe: c# Trackbar Arrowkeys bug Pin
Dave Kreskowiak8-May-09 2:11
mveDave Kreskowiak8-May-09 2:11 
GeneralRe: c# Trackbar Arrowkeys bug Pin
VoNa198-May-09 2:56
VoNa198-May-09 2:56 
QuestionHow to get Data labels In charts using C# Pin
amitabha20077-May-09 21:11
amitabha20077-May-09 21:11 
QuestionVOIP Pin
imranliaqat7-May-09 21:10
imranliaqat7-May-09 21:10 
AnswerRe: VOIP Pin
Mycroft Holmes7-May-09 22:36
professionalMycroft Holmes7-May-09 22:36 
QuestionQuery to get number of tables Pin
arun_pk7-May-09 20:39
arun_pk7-May-09 20:39 
AnswerRe: Query to get number of tables Pin
Spunky Coder7-May-09 21:51
Spunky Coder7-May-09 21:51 

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.