Exemple #1
0
 public void GetPasswordTest()
 {
     if (!PasswordRegistry.GetPassword("HKEY_CURRENT_CONFIG", "TanganPassword", "HKEY_CURRENT_CONFIG//TanganPassword").Equals("TestOK"))
     {
         Assert.Fail();
     }
 }
Exemple #2
0
        public Statistic()
        {
            InitializeComponent();
            var mailBox = ImapMailBox.Singleton();
            var config  = ConfigService.Singleton();

            mailBox.Connect("tangantasktest",
                            PasswordRegistry.GetPassword("HKEY_CURRENT_CONFIG", "TanganPassword", "HKEY_CURRENT_CONFIG//TanganPassword"),
                            config.ImapServer,
                            config.ImapPort, config.ImapSSL);
            int unread = mailBox.CountUnread();
            var dal    = new DataAccessLayer("Database.db");

            dal.Check(mailBox.LastUnreadDate());
            this.label1.Text = "Количество непрочитанных сообщений: " + unread;
        }