public void getMailUserSearchCallback(GetMailUserSearch_ReturnType returnData) { if (returnData.Success) { this.listBoxSearch.Items.Clear(); if (returnData.mailUsersSearch != null) { foreach (string str in returnData.mailUsersSearch) { this.listBoxSearch.Items.Add(str); } } } }
public void OurRemoteAsyncCallBack_GetMailUserSearch(IAsyncResult ar) { RemoteAsyncDelegate_GetMailUserSearch asyncDelegate = (RemoteAsyncDelegate_GetMailUserSearch) ((AsyncResult) ar).AsyncDelegate; try { this.storeRPCresult(ar, asyncDelegate.EndInvoke(ar)); } catch (Exception exception) { GetMailUserSearch_ReturnType returnData = new GetMailUserSearch_ReturnType(); this.manageRemoteExpection(ar, returnData, exception); } }
private void getMailUserSearchCallback(GetMailUserSearch_ReturnType returnData) { if (returnData.Success) { List<CustomSelfDrawPanel.CSDListItem> items = new List<CustomSelfDrawPanel.CSDListItem>(); if (returnData.mailUsersSearch != null) { this.playerSearchList.highlightedItems.Clear(); foreach (string str in returnData.mailUsersSearch) { CustomSelfDrawPanel.CSDListItem item = new CustomSelfDrawPanel.CSDListItem { Text = str }; items.Add(item); foreach (MailLink link in this.linkList) { if ((link.linkType == 1) && (link.objectName.ToLower() == str.ToLower())) { this.playerSearchList.highlightedItems.Add(item); } } } } string userName = RemoteServices.Instance.UserName; if (userName.ToLower().Contains(this.searchText.ToLower())) { CustomSelfDrawPanel.CSDListItem item2 = new CustomSelfDrawPanel.CSDListItem { Text = userName }; items.Add(item2); foreach (MailLink link2 in this.linkList) { if ((link2.linkType == 1) && (link2.objectName.ToLower() == userName.ToLower())) { this.playerSearchList.highlightedItems.Add(item2); } } } this.playerSearchList.populate(items); this.playerAddButton.Enabled = this.playerSearchList.getSelectedItem() != null; this.villageTabButton.Active = this.playerAddButton.Enabled; this.villageTabButton.Alpha = this.playerAddButton.Enabled ? 1f : 0.5f; this.villageTabButton.CustomTooltipID = this.playerAddButton.Enabled ? 0x1ff : 0x206; } }