Click here to Skip to main content
15,881,204 members
Home / Discussions / C#
   

C#

 
QuestionGlobalization and Localization in common dll C# Pin
ISharda26-Jul-10 22:41
ISharda26-Jul-10 22:41 
AnswerRe: Globalization and Localization in common dll C# Pin
Peace ON27-Jul-10 0:59
Peace ON27-Jul-10 0:59 
QuestionTo use or not to use worker thread in Windows Service? Pin
JoeSchmoe00726-Jul-10 8:39
JoeSchmoe00726-Jul-10 8:39 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
Luc Pattyn26-Jul-10 8:43
sitebuilderLuc Pattyn26-Jul-10 8:43 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
JoeSchmoe00726-Jul-10 8:47
JoeSchmoe00726-Jul-10 8:47 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
Luc Pattyn26-Jul-10 8:49
sitebuilderLuc Pattyn26-Jul-10 8:49 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
PIEBALDconsult26-Jul-10 8:51
mvePIEBALDconsult26-Jul-10 8:51 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
JoeSchmoe00726-Jul-10 9:00
JoeSchmoe00726-Jul-10 9:00 
Would this be a correct approach to prevent more than one execution:

protected override void OnStart(string[] args)
{
    WriteEventEntry("TestService starting...", EventLogEntryType.Information, 100, 100);
    timer.Elapsed += new ElapsedEventHandler(timer_Tick);
    timer.Interval = 5000;
    timer.Enabled = true;
}

private void timer_Tick(object sender, EventArgs e)
{
    timer.Enabled = false; // stop timer to prevent more than one execution
    WriteEventEntry(DateTime.Now.ToString() + " timer ticked...", EventLogEntryType.Information, 100, 100);
    // do something useful here
    timer.Enabled = true; // start timer again

}


?
GeneralRe: To use or not to use worker thread in Windows Service? Pin
PIEBALDconsult26-Jul-10 9:20
mvePIEBALDconsult26-Jul-10 9:20 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
Gonzalo Cao26-Jul-10 20:46
Gonzalo Cao26-Jul-10 20:46 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
Chris Trelawny-Ross27-Jul-10 5:37
Chris Trelawny-Ross27-Jul-10 5:37 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
Gonzalo Cao27-Jul-10 8:28
Gonzalo Cao27-Jul-10 8:28 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
RugbyLeague26-Jul-10 23:34
RugbyLeague26-Jul-10 23:34 
AnswerRe: To use or not to use worker thread in Windows Service? Pin
N a v a n e e t h27-Jul-10 0:54
N a v a n e e t h27-Jul-10 0:54 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
JoeSchmoe00727-Jul-10 3:04
JoeSchmoe00727-Jul-10 3:04 
GeneralRe: To use or not to use worker thread in Windows Service? Pin
N a v a n e e t h27-Jul-10 4:51
N a v a n e e t h27-Jul-10 4:51 
QuestionResolved C# Socket programming with linux machine. [modified] Pin
jobin00700726-Jul-10 5:10
jobin00700726-Jul-10 5:10 
AnswerRe: C# Socket programming with linux machine. Pin
Richard MacCutchan26-Jul-10 6:13
mveRichard MacCutchan26-Jul-10 6:13 
AnswerRe: C# Socket programming with linux machine. Pin
PIEBALDconsult26-Jul-10 7:21
mvePIEBALDconsult26-Jul-10 7:21 
AnswerRe: Resolved C# Socket programming with linux machine. Pin
jobin00700727-Jul-10 5:33
jobin00700727-Jul-10 5:33 
QuestionWindows or Console application target for Windows Service? Pin
JoeSchmoe00726-Jul-10 3:43
JoeSchmoe00726-Jul-10 3:43 
AnswerRe: Windows or Console application target for Windows Service? Pin
darkelv26-Jul-10 4:04
darkelv26-Jul-10 4:04 
AnswerRe: Windows or Console application target for Windows Service? [modified] Pin
PIEBALDconsult26-Jul-10 6:55
mvePIEBALDconsult26-Jul-10 6:55 
QuestionMouse Hover/Leave with many controls and status strip message Pin
Blubbo26-Jul-10 3:05
Blubbo26-Jul-10 3:05 
AnswerRe: Mouse Hover/Leave with many controls and status strip message Pin
Blubbo26-Jul-10 4:16
Blubbo26-Jul-10 4:16 

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.