Esempio n. 1
0
        public void HTMLMessagesFormatterTest()
        {
            //HtmlMessagesFormatter formatter = new HtmlMessagesFormatter(null);
            //List<SkypeMessage> messages = new List<SkypeMessage>(new[]
            //{
            //    new SkypeMessage()
            //    {
            //        Message = "test'test",
            //        Author = "test"
            //    }
            //});

            //Console.WriteLine(formatter.FormatMessages(messages));
            SkypeDAL dal = new SkypeDAL();
            SkypeDAL.ConnectionString = @"Data Source=C:\Users\user\AppData\Roaming\Skype\victor.hytyk.prl\main.db;Version=3;";
            SkypeContact nauroskype = dal.GetAllContacts().Find(contact => contact.Name.Contains("nauroskype"));
            HtmlMessagesFormatter formatter = new HtmlMessagesFormatter(null);
            string f = formatter.FormatMessages(new List<SkypeMessage>(new [] {dal.GetAllMessages(-1, nauroskype).Last()}));
            Console.WriteLine(f);
        }
Esempio n. 2
0
        public void HTMLMessagesFormatterTest()
        {
            //HtmlMessagesFormatter formatter = new HtmlMessagesFormatter(null);
            //List<SkypeMessage> messages = new List<SkypeMessage>(new[]
            //{
            //    new SkypeMessage()
            //    {
            //        Message = "test'test",
            //        Author = "test"
            //    }
            //});

            //Console.WriteLine(formatter.FormatMessages(messages));
            SkypeDAL dal = new SkypeDAL();

            SkypeDAL.ConnectionString = @"Data Source=C:\Users\user\AppData\Roaming\Skype\victor.hytyk.prl\main.db;Version=3;";
            SkypeContact          nauroskype = dal.GetAllContacts().Find(contact => contact.Name.Contains("nauroskype"));
            HtmlMessagesFormatter formatter  = new HtmlMessagesFormatter(null);
            string f = formatter.FormatMessages(new List <SkypeMessage>(new [] { dal.GetAllMessages(-1, nauroskype).Last() }));

            Console.WriteLine(f);
        }
Esempio n. 3
0
        public void Init()
        {
            LoadSettings();
            SkypeDAL.ConnectionString = string.Format(@"Data Source={0};Version=3;", Settings.DbPath);
            dal = new SkypeDAL();
            IsConnected = dal.IsConnected();
            if (IsConnected)
            {
                InitializeDigest();
                dal.GetAllContacts().OrderBy(contact => contact.DisplayName).ToList().ForEach(contact => allContacts.Add(contact.ID, contact));
                dal.GetAllChats().OrderBy(chat => chat.DisplayName).ToList().ForEach(chat => allChats.Add(chat.ID, chat));

            }
        }