本文整理汇总了C#中KeePassLib.PwUuid类的典型用法代码示例。如果您正苦于以下问题:C# PwUuid类的具体用法?C# PwUuid怎么用?C# PwUuid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PwUuid类属于KeePassLib命名空间,在下文中一共展示了PwUuid类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetIconDrawable
public Drawable GetIconDrawable(Resources res, PwDatabase db, PwIcon icon, PwUuid customIconId)
{
if (!customIconId.Equals(PwUuid.Zero)) {
return GetIconDrawable (res, db, customIconId);
}
return GetIconDrawable (res, icon);
}
示例2: GetConfigEntry
private PwEntry GetConfigEntry(PwDatabase db)
{
var kphe = new KeePassHttpExt();
var root = db.RootGroup;
var uuid = new PwUuid(kphe.KEEPASSHTTP_UUID);
var entry = root.FindEntry(uuid, false);
return entry;
}
示例3: OnFormLoad
private void OnFormLoad(object sender, EventArgs e)
{
Debug.Assert(m_pwGroup != null); if(m_pwGroup == null) throw new InvalidOperationException();
Debug.Assert(m_pwDatabase != null); if(m_pwDatabase == null) throw new InvalidOperationException();
GlobalWindowManager.AddWindow(this);
m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width,
m_bannerImage.Height, BannerStyle.Default,
Properties.Resources.B48x48_Folder_Txt, KPRes.EditGroup,
KPRes.EditGroupDesc);
this.Icon = Properties.Resources.KeePass;
UIUtil.SetButtonImage(m_btnAutoTypeEdit,
Properties.Resources.B16x16_Wizard, true);
m_dtExpires.CustomFormat = DateTimeFormatInfo.CurrentInfo.ShortDatePattern +
" " + DateTimeFormatInfo.CurrentInfo.LongTimePattern;
m_pwIconIndex = m_pwGroup.IconId;
m_pwCustomIconID = m_pwGroup.CustomIconUuid;
m_tbName.Text = m_pwGroup.Name;
m_tbNotes.Text = m_pwGroup.Notes;
if(m_pwCustomIconID != PwUuid.Zero)
UIUtil.SetButtonImage(m_btnIcon, m_pwDatabase.GetCustomIcon(
m_pwCustomIconID), true);
else
UIUtil.SetButtonImage(m_btnIcon, m_ilClientIcons.Images[
(int)m_pwIconIndex], true);
if(m_pwGroup.Expires)
{
m_dtExpires.Value = m_pwGroup.ExpiryTime;
m_cbExpires.Checked = true;
}
else // Does not expire
{
m_dtExpires.Value = DateTime.Now;
m_cbExpires.Checked = false;
}
UIUtil.MakeInheritableBoolComboBox(m_cmbEnableAutoType,
m_pwGroup.EnableAutoType, m_pwGroup.GetAutoTypeEnabledInherited());
UIUtil.MakeInheritableBoolComboBox(m_cmbEnableSearching,
m_pwGroup.EnableSearching, m_pwGroup.GetSearchingEnabledInherited());
m_tbDefaultAutoTypeSeq.Text = m_pwGroup.GetAutoTypeSequenceInherited();
if(m_pwGroup.DefaultAutoTypeSequence.Length == 0)
m_rbAutoTypeInherit.Checked = true;
else m_rbAutoTypeOverride.Checked = true;
CustomizeForScreenReader();
EnableControlsEx();
}
示例4: InitEx
public void InitEx(ImageList ilIcons, uint uNumberOfStandardIcons,
PwDatabase pwDatabase, uint uDefaultIcon, PwUuid pwCustomIconUuid)
{
m_ilIcons = ilIcons;
m_uNumberOfStandardIcons = uNumberOfStandardIcons;
m_pwDatabase = pwDatabase;
m_uDefaultIcon = uDefaultIcon;
m_pwDefaultCustomIcon = pwCustomIconUuid;
}
示例5: Find
public EcasEventType Find(PwUuid uuid)
{
if(uuid == null) throw new ArgumentNullException("uuid");
foreach(EcasEventType t in m_events)
{
if(t.Type.Equals(uuid)) return t;
}
return null;
}
示例6: getIcon
public static Image getIcon(PwDatabase db, ImageList imageList, PwUuid customIconId, PwIcon iconId)
{
if (!PwUuid.Zero.Equals(customIconId))
{
return db.GetCustomIcon(customIconId, 16, 16);
}
else
{
return imageList.Images[(int)iconId];
}
}
示例7: Find
public EcasActionType Find(PwUuid uuid)
{
if(uuid == null) throw new ArgumentNullException("uuid");
foreach(EcasActionType t in m_actions)
{
if(t.Type.EqualsValue(uuid)) return t;
}
return null;
}
示例8: IsSupported
public bool IsSupported(PwUuid uuidType)
{
if(uuidType == null) throw new ArgumentNullException("uuidType");
foreach(EcasEventType t in m_events)
{
if(t.Type.Equals(uuidType))
return true;
}
return false;
}
示例9: IsSupported
public bool IsSupported(PwUuid uuidType)
{
if(uuidType == null) throw new ArgumentNullException("uuidType");
foreach(EcasConditionType t in m_conditions)
{
if(t.Type.EqualsValue(uuidType))
return true;
}
return false;
}
示例10: EditGroup
public EditGroup(Context ctx, IKp2aApp app, String name, PwIcon iconid, PwUuid customIconId, PwGroup group, OnFinish finish)
: base(finish)
{
_ctx = ctx;
_name = name;
_iconId = iconid;
Group = group;
_customIconId = customIconId;
_app = app;
_onFinishToRun = new AfterEdit(this, OnFinishToRun);
}
示例11: RemoveFactory
public static bool RemoveFactory(PwUuid u)
{
if(u == null) { Debug.Assert(false); return false; }
List<TsrFactory> l = TsrPool.Factories;
int cInitial = l.Count;
for(int i = l.Count - 1; i >= g_nStdFac; --i)
{
if(u.Equals(l[i].Uuid)) l.RemoveAt(i);
}
return (l.Count != cInitial);
}
示例12: EcasEventType
public EcasEventType(PwUuid uuidType, string strName, PwIcon pwIcon,
EcasParameter[] vParams, EcasEventCompare f)
{
if((uuidType == null) || (uuidType.EqualsValue(PwUuid.Zero)))
throw new ArgumentNullException("uuidType");
if(strName == null) throw new ArgumentNullException("strName");
// if(vParams == null) throw new ArgumentNullException("vParams");
// if(f == null) throw new ArgumentNullException("f");
m_type = uuidType;
m_strName = strName;
m_pwIcon = pwIcon;
m_vParams = (vParams ?? EcasParameter.EmptyArray);
m_fn = (f ?? EcasEventCompareTrue);
}
示例13: EcasConditionType
public EcasConditionType(PwUuid uuidType, string strName, PwIcon pwIcon,
EcasParameter[] vParams, EcasConditionEvaluate f)
{
if((uuidType == null) || PwUuid.Zero.Equals(uuidType))
throw new ArgumentNullException("uuidType");
if(strName == null) throw new ArgumentNullException("strName");
// if(vParams == null) throw new ArgumentNullException("vParams");
// if(f == null) throw new ArgumentNullException("f");
m_type = uuidType;
m_strName = strName;
m_pwIcon = pwIcon;
m_vParams = (vParams ?? EcasParameter.EmptyArray);
m_fn = (f ?? EcasConditionEvaluateTrue);
}
示例14: GetCacheDirectory
public static string GetCacheDirectory(PwUuid pwPluginUuid, bool bEnsureExists)
{
string strPlgID = Convert.ToBase64String(pwPluginUuid.UuidBytes,
Base64FormattingOptions.None);
strPlgID = StrUtil.AlphaNumericOnly(strPlgID);
if(strPlgID.Length > 16) strPlgID = strPlgID.Substring(0, 16);
string strDir = GetCacheRoot() + Path.DirectorySeparatorChar +
strPlgID + "_" + GetAppID();
if(bEnsureExists && !Directory.Exists(strDir))
Directory.CreateDirectory(strDir);
return strDir;
}
示例15: GetConfigEntry
private PwEntry GetConfigEntry(PwDatabase db)
{
var kphe = new KeePassHttpExt();
var root = db.RootGroup;
// Get stored RootGroup from config if any
if (_config.RootGroup != "")
{
var GroupUuid = new PwUuid(StringToByteArray(_config.RootGroupUuid));
root = root.FindGroup(GroupUuid, true);
}
var uuid = new PwUuid(kphe.KEEPASSHTTP_UUID);
var entry = root.FindEntry(uuid, false);
return entry;
}