public ObservableCollection <ContactsInfo> GetContactDetails(int incValue)
        {
            ObservableCollection <ContactsInfo> customerDetails = new ObservableCollection <ContactsInfo>();

            for (int i = incValue; i < CustomerNames.Count(); i = i + incValue)
            {
                var dateTime = DateTime.Now.AddHours(-10 * i);
                dateTime = DateTime.Now.AddSeconds(-45 * (i + i));
                dateTime = DateTime.Now.AddSeconds(-2 * i);
                var details = new ContactsInfo()
                {
                    Message         = contactType[(i % 19)],
                    ContactReadType = CustomerNames[i][0].ToString(),
                    ContactName     = CustomerNames[i],
                    ContactNumber   = "123-456-789",

                    ContactImage = imageColor[(i % 5)],
                    Date         = dateTime.ToString(),
                    DateMonth    = dateTime.Minute.ToString() + ":" + dateTime.Second.ToString(),
                    MessageCount = dateTime.DayOfWeek.ToString()
                };
                customerDetails.Add(details);
            }
            return(customerDetails);
        }
Ejemplo n.º 2
0
        public bool AddMessage()
        {
            if (count++ >= 5)
            {
                return(false);
            }

            ReadCount = count.ToString();
            ContactsInfo currentInfo = MessageLogs[MessageLogs.Count - 1];

            currentInfo.Read         = true;
            currentInfo.DateMonth    = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString();
            currentInfo.MessageCount = DateTime.Now.DayOfWeek.ToString();
            MessageLogs.Remove(currentInfo);
            MessageLogs.Insert(0, currentInfo);
            return(true);
        }