示例#1
0
 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);
         }
     }
 }
示例#2
0
 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);
             }
         }
     }
 }
示例#3
0
        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
                        });
                    }
                }
            }
        }
示例#4
0
        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);
        }