private void LoadMessages(List <Message> messages) { foreach (Message message in messages) { if (message.IsMine) { TypeText("Ja", message.Text, message.DateTime); } else { TypeText(trafficController.FindName(message.Number.ToString()), message.Text, message.DateTime); } } }
private void LoadMessages(List <Message> messages) { foreach (Message message in messages) { if (message.Text.Contains(confSzyfr) || message.Text.Contains("CONVERSATION")) { } else { if (message.IsMine) { TypeText("Ja", message.Text, message.DateTime); } else { TypeText(trafficController.FindName(message.Number.ToString()), message.Text, message.DateTime); } } } }
public void SetConversationBook(List <ConversationPage> conversations, int[] numbersConv) { string osobyWKonwersacj = ""; numbersConv = numbersConv.Where(val => val != myNumber).ToArray(); for (int i = 0; i < numbersConv.Length; i++) { osobyWKonwersacj += trafficController.FindName(numbersConv[i].ToString()) + " "; } if (ListViewConversations.Dispatcher.Thread == Thread.CurrentThread) { foreach (var item in conversations) { if (ListViewConversations.HasItems) { foreach (ConversationsItem listitem in ListViewConversations.Items) { if (listitem.UsersNumbers == item.Mynumber) { } else { ListViewConversations.Items.Add(new ConversationsItem { idConversation = i + 1, UsersNames = "Konwersacja z " + osobyWKonwersacj, UsersNumbers = item.Mynumber }); } } } else { ListViewConversations.Items.Add(new ConversationsItem { idConversation = i + 1, UsersNames = "Konwersacja z " + osobyWKonwersacj, UsersNumbers = item.Mynumber }); } } } }
public void Wypelnij(ListView listView) { string myname = trafficController.FindName(myNumber.ToString()); foreach (MyItem item in listView.Items) { if (item.UserName.Equals(myname)) { } else { if (item.UserState.Equals("AVAILABLE") || item.UserState.Equals("BUSY")) { ActiveUsers.Items.Add(item); } } } //MyItem selectedItem = (MyItem)ActiveUsers.SelectedItems[0]; //currentNumber = trafficController.FindNumber(selectedItem.UserName); //trafficController.SetState(State.OpenedGate); }