コード例 #1
0
        private void MainMenuItem_OnClick(object sender, EventArgs e)
        {
            PCRPasswordsForm ep = new PCRPasswordsForm(m_host);

            ep.InitEx(Tools.GetExpiringPasswords(m_host), m_host.Database, m_host.MainWindow.ClientIcons, m_config);
            ep.ShowDialog();
        }
コード例 #2
0
 public override void PerformCellAction(string strColumnName, PwEntry pe)
 {
     if ((strColumnName == RenewInColumnName) && (pe != null))
     {
         PCRPasswordsForm ep = new PCRPasswordsForm(PasswordChangeReminderExt.Host);
         ep.InitEx(Tools.GetExpiringPasswords(PasswordChangeReminderExt.Host), PasswordChangeReminderExt.Host.Database, PasswordChangeReminderExt.Host.MainWindow.ClientIcons, PasswordChangeReminderExt.Config);
         ep.ShowDialog();
     }
 }
コード例 #3
0
        private void checkOnStartup_onFileOpened(object sender, EventArgs e)
        {
            if (m_host != null && m_host.Database != null && m_host.Database.IsOpen && m_config != null && m_config.checkOnStartup)
            {
                foreach (PwEntry pe in Tools.GetExpiringPasswords(m_host))
                {
                    if (pe.Strings.Exists(PasswordChangeReminderExt._EntryStringKey))
                    {
                        PwListItem pli       = new PwListItem(pe);
                        int        iRemindIn = Convert.ToInt32(pe.Strings.Get(PasswordChangeReminderExt._EntryStringKey).ReadString().ToString());
                        int        iPwAge    = Tools.calculateAge(pe);
                        int        iChangeIn = iRemindIn - iPwAge;

                        if (iChangeIn <= 0)
                        {
                            PCRPasswordsForm ep = new PCRPasswordsForm(m_host);
                            ep.InitEx(Tools.GetExpiringPasswords(m_host), m_host.Database, m_host.MainWindow.ClientIcons, m_config);
                            ep.ShowDialog();
                            break;
                        }
                    }
                }
            }
        }