Пример #1
0
        public Form2()
        {
            InitializeComponent();

            _m = new Manager();

            var users = _m.GetUsers();

            foreach (var user in users)
            {
                D($"{user.Username} ({user.Messenger})");
            }

            //step 2
            foreach (var user in users)
            {
                D($" ----- Conversations for: {user.Username} ({user.Messenger})----");

                List<Conversation> conversations = _m.GetConversation(user);

                foreach (var conversation in conversations)
                {
                    D($"+{conversation.Title}");
                }
            }

            //step 3
            foreach (var user in users)
            {
                D($" ----- Conversations for: {user.Username} ({user.Messenger})----");

                List<Conversation> conversations = _m.GetConversation(user);

                foreach (var conversation in conversations)
                {
                    D($"+ {conversation.Title}");

                    List<ViewModels.Message> messages = _m.GetMessages(conversation);

                    foreach (var message in messages)
                    {
                        D($" > {message.Date} {message.Author} \r\n\t {message.Content} ");
                    }
                }
            }
        }