当前位置: 首页>>代码示例>>C++>>正文


C++ PWSprefs::UpdateFromCopyPrefs方法代码示例

本文整理汇总了C++中PWSprefs::UpdateFromCopyPrefs方法的典型用法代码示例。如果您正苦于以下问题:C++ PWSprefs::UpdateFromCopyPrefs方法的具体用法?C++ PWSprefs::UpdateFromCopyPrefs怎么用?C++ PWSprefs::UpdateFromCopyPrefs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PWSprefs的用法示例。


在下文中一共展示了PWSprefs::UpdateFromCopyPrefs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UpdateCopyPreferences


//.........这里部分代码省略.........
                   m_OPTMD.ConfirmCopy == FALSE, true);
    prefs->SetPref(PWSprefs::LockOnWindowLock,
                   m_OPTMD.LockOnWindowLock == TRUE, true);
    prefs->SetPref(PWSprefs::CopyPasswordWhenBrowseToURL,
                   m_OPTMD.CopyPswdBrowseURL == TRUE, true);

    prefs->SetPref(PWSprefs::UseSystemTray,
                   m_OPTMD.UseSystemTray == TRUE, true);
    prefs->SetPref(PWSprefs::HideSystemTray,
                   m_OPTMD.HideSystemTray == TRUE, true);

    prefs->SetPref(PWSprefs::MaxREItems,
                   m_OPTMD.MaxREItems, true);
    prefs->SetPref(PWSprefs::MaxMRUItems,
                   m_OPTMD.MaxMRUItems, true);
    if (m_OPTMD.MaxMRUItems == 0) {
        // Put them on File menu where they don't take up any room
        prefs->SetPref(PWSprefs::MRUOnFileMenu, true, true);
    } else {
        prefs->SetPref(PWSprefs::MRUOnFileMenu,
                       m_OPTMD.MRUOnFileMenu == TRUE, true);
    }
    prefs->SetPref(PWSprefs::DefaultOpenRO,
                   m_OPTMD.DefaultOpenRO == TRUE, true);
    prefs->SetPref(PWSprefs::MultipleInstances,
                   m_OPTMD.MultipleInstances == TRUE, true);

    // Now update database preferences
    // In PropertyPage alphabetic order
    prefs->SetPref(PWSprefs::SaveImmediately,
                   m_OPTMD.SaveImmediately == TRUE, true);

    prefs->SetPref(PWSprefs::ShowPWDefault,
                   m_OPTMD.ShowPasswordInEdit == TRUE, true);
    prefs->SetPref(PWSprefs::ShowUsernameInTree,
                   m_OPTMD.ShowUsernameInTree == TRUE, true);
    prefs->SetPref(PWSprefs::ShowPasswordInTree,
                   m_OPTMD.ShowPasswordInTree == TRUE, true);
    prefs->SetPref(PWSprefs::TreeDisplayStatusAtOpen,
                   m_OPTMD.TreeDisplayStatusAtOpen, true);
    prefs->SetPref(PWSprefs::ShowNotesDefault,
                   m_OPTMD.NotesShowInEdit == TRUE, true);

    prefs->SetPref(PWSprefs::MaintainDateTimeStamps,
                   m_OPTMD.MaintainDatetimeStamps == TRUE, true);

    prefs->SetPref(PWSprefs::UseDefaultUser,
                   m_OPTMD.UseDefuser == TRUE, true);
    prefs->SetPref(PWSprefs::DefaultUsername,
                   LPCWSTR(m_OPTMD.DefUsername), true);

    if (m_OPTMD.AutotypeText.IsEmpty() || m_OPTMD.AutotypeText == DEFAULT_AUTOTYPE)
        prefs->SetPref(PWSprefs::DefaultAutotypeString, L"", true);
    else if (m_OPTMD.AutotypeText != DEFAULT_AUTOTYPE)
        prefs->SetPref(PWSprefs::DefaultAutotypeString,
                       LPCWSTR(m_OPTMD.AutotypeText), true);
    prefs->SetPref(PWSprefs::DefaultAutotypeDelay,
                   m_OPTMD.AutotypeDelay,
                   true);

    prefs->SetPref(PWSprefs::SavePasswordHistory,
                   m_OPTMD.SavePWHistory == TRUE, true);
    if (m_OPTMD.SavePWHistory == TRUE)
        prefs->SetPref(PWSprefs::NumPWHistoryDefault,
                       m_OPTMD.PWHistoryNumDefault, true);

    prefs->SetPref(PWSprefs::LockDBOnIdleTimeout,
                   m_OPTMD.LockOnIdleTimeout == TRUE, true);
    prefs->SetPref(PWSprefs::IdleTimeout,
                   m_OPTMD.IdleTimeOut, true);

    GetMainDlg()->SetHashIters(m_OPTMD.HashIters);

    // Changing ExplorerTypeTree changes order of items,
    // which DisplayStatus implicitly depends upon
    if (m_save_bExplorerTypeTree != m_OPTMD.ExplorerTypeTree)
        m_bSaveGroupDisplayState = m_bRefreshViews = true;

    // If user has turned on/changed warnings of expired passwords - check now
    if (m_OPTMD.PreExpiryWarn      == TRUE   &&
            (m_save_bPreExpiryWarn     == FALSE  ||
             m_save_iPreExpiryWarnDays != m_OPTMD.PreExpiryWarnDays))
        m_bCheckExpired = m_bRefreshViews = true;

    // Deal with shortcuts
    prefs->SetPref(PWSprefs::HotKey,
                   m_OPTMD.AppHotKeyValue, true);
    prefs->SetPref(PWSprefs::HotKeyEnabled,
                   m_OPTMD.AppHotKeyEnabled == TRUE, true);

    if (m_pp_shortcuts->HaveShortcutsChanged())
        m_bUpdateShortcuts = true;

    // Now copy across application preferences
    // Any changes via Database preferences done via call to UpdateGUI from Command
    prefs->UpdateFromCopyPrefs(PWSprefs::ptApplication);

    // Keep prefs file updated
    prefs->SaveApplicationPreferences();
}
开发者ID:bwilcox,项目名称:pwsafe,代码行数:101,代码来源:Options_PropertySheet.cpp


注:本文中的PWSprefs::UpdateFromCopyPrefs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。