예제 #1
0
        public void InitEx(PwObjectList <PwEntry> pwObjectList, PwDatabase pdb, ImageList il_icons, PCRConfig m_config)
        {
            this.il_icons = il_icons;
            this.pdb      = pdb;
            this.m_config = m_config;

            if (m_config != null)
            {
                cbCheckStartup.Checked = m_config.checkOnStartup;
                this.Height            = m_config.pcrPasswordsFormHeight;
            }

            lvExpiringPasswords.SmallImageList = il_icons;

            populateExpiringEntries(pwObjectList);
        }
        public void InitEx(PCRConfig m_config)
        {
            this.m_config = m_config;

            if (m_config != null)
            {
                cbCheckStartup.Checked  = m_config.checkOnStartup;
                nUD_startupremind.Value = m_config.checkOnStartupDays;

                pb_great.BackColor     = m_config.pcrPasswordsFormGreatColor;
                pb_tentative.BackColor = m_config.pcrPasswordsFormTentativeColor;
                pb_critical.BackColor  = m_config.pcrPasswordsFormCriticalColor;

                nUD_tentative.Value = m_config.pcrPasswordsFormTentativeState;
                nUD_critical.Value  = m_config.pcrPasswordsFormCriticalState;
            }
        }
예제 #3
0
        public override bool Initialize(IPluginHost host)
        {
            if (host == null)
            {
                return(false);
            }
            m_host = host;

            GlobalWindowManager.WindowAdded += OnWindowAdded;

            m_MainMenuItem        = new ToolStripMenuItem(_PluginName);
            m_MainMenuItem.Click += MainMenuItem_OnClick;
            m_MainMenuItem.Image  = Properties.Resources.PCR_icon_48_48_png;
            m_host.MainWindow.ToolsMenu.DropDownItems.Add(m_MainMenuItem);
            m_host.MainWindow.FileOpened += checkOnStartup_onFileOpened;

            m_config = new PCRConfig(host);

            return(true);
        }