private static void DoStraightLookup(object sender, GetSolutionDetailsCompletedEventArgs e) { Service.GetSolutionDetailsCompleted -= new GetSolutionDetailsCompletedEventHandler(Solution.DoStraightLookup); Solution solution = new Solution((int) e.UserState, e.title); solution.Author = e.author; solution.Description = e.Result; solution.Keywords = e.keywords; AsyncOps.Add(solution.ID, solution); }
private void Service_GetSolutionDetailsCompleted(object sender, GetSolutionDetailsCompletedEventArgs e) { VGen0 method = null; if ((base.InvokeRequired && !base.Disposing) && !base.IsDisposed) { if (method == null) { method = delegate { this.Service_GetSolutionDetailsCompleted(sender, e); }; } base.BeginInvoke(method); } else if (!base.Disposing && !base.IsDisposed) { if (e.Error != null) { ErrorLog.WriteLine(e.Error); } else if (!e.Cancelled) { this.Service.GetSolutionDetailsCompleted -= new GetSolutionDetailsCompletedEventHandler(this.Service_GetSolutionDetailsCompleted); this.CurrentSolution.Author = e.author; this.CurrentSolution.Description = e.Result; this.CurrentSolution.Keywords = e.keywords; this.gpgLabelAuthor.Text = this.CurrentSolution.Author; if ((this.CurrentSolution.Description != null) && (this.CurrentSolution.Description.Length > 0)) { this.richTextBoxContent.Rtf = this.CurrentSolution.Description; } this.listBoxKeywords.DataSource = null; this.listBoxKeywords.DataSource = this.CurrentSolution.Keywords; } } }
private void DoStraightLookup(object sender, GetSolutionDetailsCompletedEventArgs e) { if (e.Error != null) { ErrorLog.WriteLine(e.Error); } else if (!e.Cancelled) { int userState = (int) e.UserState; this.LookupsInProgress.Remove(userState); this.Service.GetSolutionDetailsCompleted -= new GetSolutionDetailsCompletedEventHandler(this.DoStraightLookup); Solution solution = new Solution(userState, e.title); solution.Author = e.author; solution.Description = e.Result; solution.Keywords = e.keywords; this.SolutionHistory.AddLast(solution); this.mCurrentSolution = solution; this.LookupSolution(); } }