Click here to Skip to main content
16,004,678 members
Home / Discussions / C#
   

C#

 
GeneralRe: Project management Pin
Jonas Beckeman (2)25-Jul-06 0:30
Jonas Beckeman (2)25-Jul-06 0:30 
GeneralRe: Project management Pin
Chris Buckett25-Jul-06 1:03
Chris Buckett25-Jul-06 1:03 
AnswerRe: Project management Pin
Ista24-Jul-06 11:15
Ista24-Jul-06 11:15 
GeneralRe: Project management Pin
Jonas Beckeman (2)24-Jul-06 23:57
Jonas Beckeman (2)24-Jul-06 23:57 
GeneralRe: Project management Pin
Ista25-Jul-06 2:57
Ista25-Jul-06 2:57 
GeneralRe: Project management Pin
Jonas Beckeman25-Jul-06 3:55
Jonas Beckeman25-Jul-06 3:55 
QuestionImplementation of a cancelable event Pin
LongRange.Shooter24-Jul-06 6:04
LongRange.Shooter24-Jul-06 6:04 
AnswerRe: Implementation of a cancelable event Pin
Ed.Poore24-Jul-06 7:08
Ed.Poore24-Jul-06 7:08 
theRealCondor wrote:
implementing a callback is part of the process

Not necessarily, if you have two events for example (or overridable functions, or both) one which is OnClosing and one that is OnClosed then if you have your method which closes the program, e.g. the method Close then something like this may work

public void Close()
{
    CancelEventArgs e = new CancelEventArgs();
    // Should check that there are no null event handlers here
    this.OnCancelling(e);
    // Check that the cancel is still false
    if (e.Cancel == false)
    {
        this.OnClosed(new EventArgs());
    }
    // Close down the program
    this.InternalShutdown();
}
So basically you fire the OnCancelling event (which should be done through an overridable method like in the framework classes).  If cancel in the event args is true then you stop, if it's false then you can continue and close the program.



As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it
GeneralRe: Implementation of a cancelable event Pin
LongRange.Shooter25-Jul-06 10:29
LongRange.Shooter25-Jul-06 10:29 
GeneralRe: Implementation of a cancelable event Pin
Ed.Poore25-Jul-06 11:19
Ed.Poore25-Jul-06 11:19 
QuestionHow I get the name of a textBox? Pin
Schimaera24-Jul-06 4:28
Schimaera24-Jul-06 4:28 
AnswerRe: How I get the name of a textBox? Pin
Stefan Troschuetz24-Jul-06 4:30
Stefan Troschuetz24-Jul-06 4:30 
GeneralRe: How I get the name of a textBox? Pin
Schimaera24-Jul-06 4:37
Schimaera24-Jul-06 4:37 
GeneralRe: How I get the name of a textBox? Pin
Drew McGhie24-Jul-06 8:18
Drew McGhie24-Jul-06 8:18 
AnswerRe: How I get the name of a textBox? Pin
Ista24-Jul-06 11:19
Ista24-Jul-06 11:19 
GeneralRe: How I get the name of a textBox? [modified] Pin
Schimaera24-Jul-06 20:24
Schimaera24-Jul-06 20:24 
GeneralRe: How I get the name of a textBox? Pin
Ista25-Jul-06 3:02
Ista25-Jul-06 3:02 
GeneralRe: How I get the name of a textBox? Pin
Schimaera25-Jul-06 20:50
Schimaera25-Jul-06 20:50 
QuestionReading Characters At MouseLocations Pin
AB777124-Jul-06 4:17
AB777124-Jul-06 4:17 
AnswerRe: Reading Characters At MouseLocations Pin
Gavin Roberts24-Jul-06 5:55
Gavin Roberts24-Jul-06 5:55 
Questionwebbrowser automation in .net 2.0 Pin
Green Fuze24-Jul-06 4:16
Green Fuze24-Jul-06 4:16 
AnswerRe: webbrowser automation in .net 2.0 Pin
LongRange.Shooter24-Jul-06 6:28
LongRange.Shooter24-Jul-06 6:28 
QuestionC# DirectX Overlay Pin
seq-24-Jul-06 4:00
seq-24-Jul-06 4:00 
AnswerRe: C# DirectX Overlay Pin
Gavin Roberts24-Jul-06 5:52
Gavin Roberts24-Jul-06 5:52 
GeneralRe: C# DirectX Overlay Pin
seq-24-Jul-06 7:28
seq-24-Jul-06 7:28 

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.