Click here to Skip to main content
15,909,242 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: check if windows service is stopped. Pin
arkiboys1-Mar-11 1:10
arkiboys1-Mar-11 1:10 
GeneralRe: check if windows service is stopped. Pin
Pete O'Hanlon1-Mar-11 1:19
mvePete O'Hanlon1-Mar-11 1:19 
GeneralRe: check if windows service is stopped. Pin
arkiboys1-Mar-11 1:59
arkiboys1-Mar-11 1:59 
GeneralRe: check if windows service is stopped. Pin
Pete O'Hanlon1-Mar-11 2:51
mvePete O'Hanlon1-Mar-11 2:51 
GeneralRe: check if windows service is stopped. Pin
arkiboys1-Mar-11 3:09
arkiboys1-Mar-11 3:09 
GeneralRe: check if windows service is stopped. Pin
Pete O'Hanlon1-Mar-11 3:28
mvePete O'Hanlon1-Mar-11 3:28 
GeneralRe: check if windows service is stopped. Pin
arkiboys1-Mar-11 6:15
arkiboys1-Mar-11 6:15 
GeneralRe: check if windows service is stopped. Pin
RobCroll1-Mar-11 13:25
RobCroll1-Mar-11 13:25 
Without knowing more about the MyWinService object, it is impossible to answer the question to avoid throwing an exception. You could however catch the exception that is thrown and handle it in the GetSettings method.
private void GetSettings()
{
    try
    {
        MyWinService.myClassClient client = new MyWinService.myClassClient();
        client.GetSettingsCompleted += new EventHandler<MyWinService.GetSettingsCompletedEventArgs>(client_GetSettingsCompleted);
        client.GetSettingsAsync();
    }
    catch (TheActualExceptionException e)
    {
        //Do stuff or just swallow exception and do nothing
    }
}


You may want to start with catching Exception and refine your catch statement once you know the type of exception is being throw.
"You get that on the big jobs."

GeneralRe: check if windows service is stopped. Pin
Mycroft Holmes1-Mar-11 19:53
professionalMycroft Holmes1-Mar-11 19:53 
GeneralRe: check if windows service is stopped. Pin
Pete O'Hanlon1-Mar-11 22:21
mvePete O'Hanlon1-Mar-11 22:21 
GeneralRe: check if windows service is stopped. Pin
RobCroll2-Mar-11 2:32
RobCroll2-Mar-11 2:32 
GeneralRe: check if windows service is stopped. Pin
Pete O'Hanlon2-Mar-11 3:55
mvePete O'Hanlon2-Mar-11 3:55 
QuestionIs Custom ValueConverter class ,inside wpf userControl codebehind Proper. Pin
o1010wanabe28-Feb-11 5:37
o1010wanabe28-Feb-11 5:37 
AnswerRe: Is Custom ValueConverter class ,inside wpf userControl codebehind Proper. Pin
_Maxxx_28-Feb-11 13:59
professional_Maxxx_28-Feb-11 13:59 
AnswerRe: Is Custom ValueConverter class ,inside wpf userControl codebehind Proper. Pin
Abhinav S28-Feb-11 18:05
Abhinav S28-Feb-11 18:05 
Questionvideo manipulation in silverlight web application Pin
Nilesh Kshetre27-Feb-11 22:26
Nilesh Kshetre27-Feb-11 22:26 
AnswerRe: video manipulation in silverlight web application Pin
Richard MacCutchan27-Feb-11 22:34
mveRichard MacCutchan27-Feb-11 22:34 
Questioncopy cell data into clipboard Pin
arkiboys27-Feb-11 22:13
arkiboys27-Feb-11 22:13 
AnswerRe: copy cell data into clipboard Pin
Abhinav S27-Feb-11 22:16
Abhinav S27-Feb-11 22:16 
GeneralRe: copy cell data into clipboard Pin
arkiboys28-Feb-11 10:56
arkiboys28-Feb-11 10:56 
Questionvideo manipulation in silverlight web application Pin
Nilesh Kshetre27-Feb-11 21:53
Nilesh Kshetre27-Feb-11 21:53 
AnswerRe: video manipulation in silverlight web application Pin
Richard MacCutchan27-Feb-11 22:32
mveRichard MacCutchan27-Feb-11 22:32 
AnswerRe: video manipulation in silverlight web application Pin
Vimalsoft(Pty) Ltd1-Mar-11 1:27
professionalVimalsoft(Pty) Ltd1-Mar-11 1:27 
QuestionIt takes some long time to open my Silverlight web site at 1st visit [modified] Pin
Jun Du26-Feb-11 15:02
Jun Du26-Feb-11 15:02 
AnswerRe: It takes some long time to open my Silverlight web site at 1st visit Pin
SledgeHammer0126-Feb-11 17:36
SledgeHammer0126-Feb-11 17:36 

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.