Click here to Skip to main content
15,902,276 members
Home / Discussions / C#
   

C#

 
AnswerRe: Capture Video Pin
leppie27-Aug-08 21:25
leppie27-Aug-08 21:25 
GeneralHide items in a list box but still be able to reference them later Pin
vfrrick27-Aug-08 15:42
vfrrick27-Aug-08 15:42 
GeneralRe: Hide items in a list box but still be able to reference them later Pin
N a v a n e e t h27-Aug-08 19:35
N a v a n e e t h27-Aug-08 19:35 
GeneralRe: Hide items in a list box but still be able to reference them later Pin
DaveyM6927-Aug-08 23:23
professionalDaveyM6927-Aug-08 23:23 
GeneralRe: Hide items in a list box but still be able to reference them later Pin
vfrrick27-Aug-08 23:31
vfrrick27-Aug-08 23:31 
GeneralRe: Hide items in a list box but still be able to reference them later Pin
DaveyM6927-Aug-08 23:53
professionalDaveyM6927-Aug-08 23:53 
GeneralRe: Hide items in a list box but still be able to reference them later Pin
#realJSOP28-Aug-08 3:23
professional#realJSOP28-Aug-08 3:23 
QuestionUsing Events? Pin
Donosguy27-Aug-08 14:43
Donosguy27-Aug-08 14:43 
Hello

I am using Event in my program. Below i am giving the Code thats being used, but somehow this is not working.

// Class from triggering Event

Public class Manager
{
public static Manager myManager;
public delegate TestEventDelegate (object sender, int i);
public event TestEventDelegate TestEvent;

public Manager Initialize() // This initilaize is called
//from another class which gets 1st called
{
if(myManager == null)
myManager = new Manager();
else
myManager;
}

public void RaiseEvent(object sender, int i)
{
TestEventDelegate temp = TestEvent;

if(temp != null)
temp(this, i);
}

// Now inside a function from where i am triggering the Event

public void InitializeEvent()
{
TestEvent = new TestEventDelegate(RaiseEvent);
TestEvent(myManager, 10);
}

}

// Now in another Class

public class Reciever
{
public Reciever() // Constructor
{
Subscribe(Manager.Initialize());
}

public void RecieveEvent( object sender, int i)
{
MessageBox.Show("Event Success!!!");
}

public Subscribe(Manager mgr)
{
mgr.TestEvent += new Manager.TestEventDelegate(RecieveEvent);
}

}

So this is the code i am using. It compiles fine. But doesn't work.

Any idea?

The "Initialize()" in the triggering class makes that class Singleton.
AnswerRe: Using Events? Pin
N a v a n e e t h27-Aug-08 19:20
N a v a n e e t h27-Aug-08 19:20 
Questionqueue method to print out Pin
Angelinna27-Aug-08 12:17
Angelinna27-Aug-08 12:17 
AnswerRe: queue method to print out Pin
JoeRip27-Aug-08 13:02
JoeRip27-Aug-08 13:02 
GeneralRe: queue method to print out Pin
Angelinna27-Aug-08 19:24
Angelinna27-Aug-08 19:24 
GeneralRe: queue method to print out Pin
JoeRip27-Aug-08 19:28
JoeRip27-Aug-08 19:28 
GeneralRe: queue method to print out Pin
Angelinna27-Aug-08 20:08
Angelinna27-Aug-08 20:08 
QuestionWhat is my interim pattern for readonly structs Pin
JoeRip27-Aug-08 12:15
JoeRip27-Aug-08 12:15 
AnswerRe: What is my interim pattern for readonly structs Pin
PIEBALDconsult27-Aug-08 13:25
mvePIEBALDconsult27-Aug-08 13:25 
GeneralRe: What is my interim pattern for readonly structs Pin
JoeRip27-Aug-08 13:37
JoeRip27-Aug-08 13:37 
GeneralRe: What is my interim pattern for readonly structs Pin
JoeRip27-Aug-08 14:40
JoeRip27-Aug-08 14:40 
GeneralRe: What is my interim pattern for readonly structs Pin
PIEBALDconsult27-Aug-08 16:07
mvePIEBALDconsult27-Aug-08 16:07 
GeneralRe: What is my interim pattern for readonly structs Pin
JoeRip27-Aug-08 17:10
JoeRip27-Aug-08 17:10 
GeneralRe: What is my interim pattern for readonly structs Pin
N a v a n e e t h27-Aug-08 17:26
N a v a n e e t h27-Aug-08 17:26 
GeneralRe: What is my interim pattern for readonly structs Pin
JoeRip27-Aug-08 17:57
JoeRip27-Aug-08 17:57 
GeneralRe: What is my interim pattern for readonly structs Pin
N a v a n e e t h27-Aug-08 19:07
N a v a n e e t h27-Aug-08 19:07 
Questionregular expression Pin
netJP12L27-Aug-08 4:42
netJP12L27-Aug-08 4:42 
AnswerRe: regular expression Pin
Guffa27-Aug-08 9:04
Guffa27-Aug-08 9:04 

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.