Click here to Skip to main content
15,897,273 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to return the value in Silverlight? [modified] Pin
Tesic Goran13-Feb-11 22:52
professionalTesic Goran13-Feb-11 22:52 
AnswerRe: How to return the value in Silverlight? Pin
Pete O'Hanlon14-Feb-11 0:32
mvePete O'Hanlon14-Feb-11 0:32 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 0:56
professionalTesic Goran14-Feb-11 0:56 
GeneralRe: How to return the value in Silverlight? Pin
Pete O'Hanlon14-Feb-11 0:58
mvePete O'Hanlon14-Feb-11 0:58 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 2:04
professionalTesic Goran14-Feb-11 2:04 
GeneralRe: How to return the value in Silverlight? Pin
Mycroft Holmes14-Feb-11 13:32
professionalMycroft Holmes14-Feb-11 13:32 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 19:29
professionalTesic Goran14-Feb-11 19:29 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran14-Feb-11 22:12
professionalTesic Goran14-Feb-11 22:12 
With more details.

I have this code in big method:

private void F()
{
        DatabaseServiceClient client = new DatabaseServiceClient();

        client.GetSubsystemsByTestRunIDCompleted +=
          new EventHandler<GetSubsystemsByTestRunIDCompletedEventArgs>(client_GetSubsystemsByTestRunIDCompleted);
        client.GetSubsystemsByTestRunIDAsync(testRunID);

        treeAdditionalInfo.Items.Clear();
        foreach (string subsystemName in lstSubsystems)
        {
          TreeViewItem subsystemItem = new TreeViewItem();
          subsystemItem.Header = subsystemName;
          subsystemItem.FontSize = 14;
          treeAdditionalInfo.Items.Add(subsystemItem);
        }

        List<int> lstIDsForForms = new List<int>();
        client.GetFormsAndActionsCompleted +=
          new EventHandler<GetFormsAndActionsCompletedEventArgs>(client_GetFormsAndActionsCompleted);
        client.GetFormsAndActionsAsync(testRunID);

        ...
}


The code in first 2 callbacks is this:

private void client_GetSubsystemsByTestRunIDCompleted(
  object sender, GetSubsystemsByTestRunIDCompletedEventArgs e)
{
  lstSubsystems = new List<string>();
  if (e.Result != null)
    lstSubsystems = e.Result;
}

private void client_GetFormsAndActionsCompleted(
  object sender, GetFormsAndActionsCompletedEventArgs e)
{
  lstFormsAndActions = new List<KeyValuePair<string, List<TestLogSmall>>>();
  if (e.Result != null)
    lstFormsAndActions = e.Result;
}


I need to get the list after this call:

client.GetSubsystemsByTestRunIDAsync(testRunID);


And after that to get the list after this call:

client.GetFormsAndActionsAsync(testRunID);


How can I do that? What should I write?

Thank you.
GeneralRe: How to return the value in Silverlight? Pin
Mycroft Holmes14-Feb-11 23:14
professionalMycroft Holmes14-Feb-11 23:14 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran15-Feb-11 0:28
professionalTesic Goran15-Feb-11 0:28 
GeneralRe: How to return the value in Silverlight? Pin
Mycroft Holmes15-Feb-11 13:27
professionalMycroft Holmes15-Feb-11 13:27 
GeneralRe: How to return the value in Silverlight? Pin
Pete O'Hanlon16-Feb-11 7:37
mvePete O'Hanlon16-Feb-11 7:37 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran17-Feb-11 1:27
professionalTesic Goran17-Feb-11 1:27 
GeneralRe: How to return the value in Silverlight? Pin
Tesic Goran17-Feb-11 3:18
professionalTesic Goran17-Feb-11 3:18 
GeneralRe: How to return the value in Silverlight? Pin
Pete O'Hanlon17-Feb-11 8:44
mvePete O'Hanlon17-Feb-11 8:44 
Questionwpf mvvm pattern Checkboxes to be checked by default. Pin
Himanshu0614198213-Feb-11 20:40
Himanshu0614198213-Feb-11 20:40 
AnswerRe: wpf mvvm pattern Checkboxes to be checked by default. Pin
Abhinav S13-Feb-11 21:15
Abhinav S13-Feb-11 21:15 
QuestionOpacityMask Brush Pin
HoltDan12-Feb-11 6:14
HoltDan12-Feb-11 6:14 
AnswerRe: OpacityMask Brush Pin
SledgeHammer0112-Feb-11 8:15
SledgeHammer0112-Feb-11 8:15 
GeneralRe: OpacityMask Brush Pin
HoltDan12-Feb-11 8:50
HoltDan12-Feb-11 8:50 
QuestionSilverlight or WPF Pin
Toniyo Jackson10-Feb-11 20:45
Toniyo Jackson10-Feb-11 20:45 
AnswerRe: Silverlight or WPF Pin
Mycroft Holmes10-Feb-11 21:06
professionalMycroft Holmes10-Feb-11 21:06 
GeneralRe: Silverlight or WPF Pin
Toniyo Jackson10-Feb-11 21:39
Toniyo Jackson10-Feb-11 21:39 
AnswerRe: Silverlight or WPF Pin
Abhinav S10-Feb-11 21:40
Abhinav S10-Feb-11 21:40 
GeneralRe: Silverlight or WPF Pin
Toniyo Jackson10-Feb-11 21:42
Toniyo Jackson10-Feb-11 21:42 

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.